Lines 46-52
Link Here
|
46 |
} |
46 |
} |
47 |
|
47 |
|
48 |
static { |
48 |
static { |
49 |
// TESTS_NUMBERS = new int[] { 218 }; |
49 |
// TESTS_NUMBERS = new int[] { 220 }; |
50 |
// TESTS_NAMES = new String[] {"test0204"}; |
50 |
// TESTS_NAMES = new String[] {"test0204"}; |
51 |
} |
51 |
} |
52 |
public static Test suite() { |
52 |
public static Test suite() { |
Lines 6910-6913
Link Here
|
6910 |
IAnnotationBinding annotationBinding = annotation.resolveAnnotationBinding(); |
6910 |
IAnnotationBinding annotationBinding = annotation.resolveAnnotationBinding(); |
6911 |
assertNull("Got a binding", annotationBinding); |
6911 |
assertNull("Got a binding", annotationBinding); |
6912 |
} |
6912 |
} |
|
|
6913 |
|
6914 |
/* |
6915 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=142793 |
6916 |
*/ |
6917 |
public void test0220() throws JavaModelException { |
6918 |
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); |
6919 |
String contents = |
6920 |
"public class X {\n" + |
6921 |
" void bar(String[] c) {\n" + |
6922 |
" for(String s: c) {\n" + |
6923 |
" try {\n" + |
6924 |
" }\n" + |
6925 |
" }\n" + |
6926 |
" }\n" + |
6927 |
"}"; |
6928 |
ASTNode node = buildAST( |
6929 |
contents, |
6930 |
this.workingCopy, |
6931 |
false, |
6932 |
true); |
6933 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
6934 |
CompilationUnit unit = (CompilationUnit) node; |
6935 |
assertProblemsSize(unit, 1, "Syntax error, insert \"Finally\" to complete BlockStatements"); |
6936 |
node = getASTNode(unit, 0, 0, 0); |
6937 |
assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, node.getNodeType()); |
6938 |
EnhancedForStatement statement = (EnhancedForStatement) node; |
6939 |
Statement statement2 = statement.getBody(); |
6940 |
assertEquals("Not an empty statement", ASTNode.EMPTY_STATEMENT, statement2.getNodeType()); |
6941 |
assertEquals("Wrong length", 0, statement2.getLength()); |
6942 |
assertTrue("Not recovered", isRecovered(statement2)); |
6943 |
assertTrue("Not malformed", isMalformed(statement2)); |
6944 |
} |
6913 |
} |
6945 |
} |