Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2011 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2012 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 5265-5270
public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
Link Here
|
5265 |
* @deprecated (Uses getLeadingComment() which is deprecated) |
5265 |
* @deprecated (Uses getLeadingComment() which is deprecated) |
5266 |
*/ |
5266 |
*/ |
5267 |
public void testTryStatement() { |
5267 |
public void testTryStatement() { |
|
|
5268 |
if (this.ast.apiLevel() <= AST.JLS3) { |
5269 |
// node type introduced in 4.0 API |
5270 |
try { |
5271 |
final TryStatement x = this.ast.newTryStatement(); |
5272 |
x.resources(); |
5273 |
assertTrue("should not be reached if jls level <= JLS3", false); |
5274 |
} catch (UnsupportedOperationException e) { |
5275 |
// pass |
5276 |
} |
5277 |
} |
5268 |
long previousCount = this.ast.modificationCount(); |
5278 |
long previousCount = this.ast.modificationCount(); |
5269 |
final TryStatement x = this.ast.newTryStatement(); |
5279 |
final TryStatement x = this.ast.newTryStatement(); |
5270 |
assertTrue(this.ast.modificationCount() > previousCount); |
5280 |
assertTrue(this.ast.modificationCount() > previousCount); |