Lines 46-52
Link Here
|
46 |
} |
46 |
} |
47 |
|
47 |
|
48 |
static { |
48 |
static { |
49 |
// TESTS_NUMBERS = new int[] { 272 }; |
49 |
// TESTS_NUMBERS = new int[] { 274 }; |
50 |
// TESTS_RANGE = new int[] { 253, -1 }; |
50 |
// TESTS_RANGE = new int[] { 253, -1 }; |
51 |
// TESTS_NAMES = new String[] {"test0204"}; |
51 |
// TESTS_NAMES = new String[] {"test0204"}; |
52 |
} |
52 |
} |
Lines 9098-9101
Link Here
|
9098 |
CompilationUnit unit = (CompilationUnit) node; |
9098 |
CompilationUnit unit = (CompilationUnit) node; |
9099 |
assertProblemsSize(unit, 1, "The type A is not generic; it cannot be parameterized with arguments <?>"); |
9099 |
assertProblemsSize(unit, 1, "The type A is not generic; it cannot be parameterized with arguments <?>"); |
9100 |
} |
9100 |
} |
|
|
9101 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=191908 |
9102 |
public void test0274() throws JavaModelException { |
9103 |
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); |
9104 |
String contents = |
9105 |
"public class X {\n" + |
9106 |
" @Deprecated\n" + |
9107 |
" public static int x= 5, y= 10;\n" + |
9108 |
"}"; |
9109 |
ASTNode node = buildAST( |
9110 |
contents, |
9111 |
this.workingCopy, |
9112 |
true); |
9113 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
9114 |
CompilationUnit unit = (CompilationUnit) node; |
9115 |
assertProblemsSize(unit, 0); |
9116 |
node = getASTNode(unit, 0, 0); |
9117 |
assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType()); |
9118 |
FieldDeclaration fieldDeclaration = (FieldDeclaration) node; |
9119 |
List fragments = fieldDeclaration.fragments(); |
9120 |
assertEquals("Wrong size", 2, fragments.size()); |
9121 |
VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0); |
9122 |
IVariableBinding binding = fragment.resolveBinding(); |
9123 |
assertTrue("Not deprecated", binding.isDeprecated()); |
9124 |
fragment = (VariableDeclarationFragment) fragments.get(1); |
9125 |
binding = fragment.resolveBinding(); |
9126 |
assertTrue("Not deprecated", binding.isDeprecated()); |
9127 |
} |
9101 |
} |
9128 |
} |