Lines 122-128
Link Here
|
122 |
static { |
122 |
static { |
123 |
// TESTS_NAMES = new String[] {"test0602"}; |
123 |
// TESTS_NAMES = new String[] {"test0602"}; |
124 |
// TESTS_RANGE = new int[] { 670, -1 }; |
124 |
// TESTS_RANGE = new int[] { 670, -1 }; |
125 |
// TESTS_NUMBERS = new int[] { 693, 694 }; |
125 |
// TESTS_NUMBERS = new int[] { 695, 696 }; |
126 |
} |
126 |
} |
127 |
public static Test suite() { |
127 |
public static Test suite() { |
128 |
return buildModelTestSuite(ASTConverterTestAST3_2.class); |
128 |
return buildModelTestSuite(ASTConverterTestAST3_2.class); |
Lines 9872-9875
Link Here
|
9872 |
assertFalse("Should not get there", true); |
9872 |
assertFalse("Should not get there", true); |
9873 |
} |
9873 |
} |
9874 |
} |
9874 |
} |
|
|
9875 |
/** |
9876 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=245348 |
9877 |
*/ |
9878 |
public void test0695() throws JavaModelException { |
9879 |
ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0695", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
9880 |
|
9881 |
ASTParser parser = ASTParser.newParser(AST.JLS3); |
9882 |
parser.setKind(ASTParser.K_COMPILATION_UNIT); |
9883 |
parser.setSource(unit.getSource().toCharArray()); |
9884 |
Map options = JavaCore.getOptions(); |
9885 |
options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3); |
9886 |
options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4); |
9887 |
options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_2); |
9888 |
parser.setCompilerOptions(options); |
9889 |
|
9890 |
CompilationUnit astRoot = (CompilationUnit) parser.createAST(null); |
9891 |
ASTVisitor visitor = new ASTVisitor() { |
9892 |
public boolean visit(EnumDeclaration node) { |
9893 |
assertFalse("Should not be there", true); |
9894 |
return false; |
9895 |
} |
9896 |
}; |
9897 |
astRoot.accept(visitor); |
9898 |
assertEquals("No problem found", 1, astRoot.getProblems().length); |
9899 |
} |
9900 |
/** |
9901 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=245348 |
9902 |
*/ |
9903 |
public void test0696() throws JavaModelException { |
9904 |
ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0696", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
9905 |
|
9906 |
ASTParser parser = ASTParser.newParser(AST.JLS3); |
9907 |
parser.setKind(ASTParser.K_COMPILATION_UNIT); |
9908 |
parser.setSource(unit.getSource().toCharArray()); |
9909 |
Map options = JavaCore.getOptions(); |
9910 |
options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3); |
9911 |
options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4); |
9912 |
options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_2); |
9913 |
parser.setCompilerOptions(options); |
9914 |
|
9915 |
CompilationUnit astRoot = (CompilationUnit) parser.createAST(null); |
9916 |
ASTVisitor visitor = new ASTVisitor() { |
9917 |
public boolean visit(AnnotationTypeDeclaration node) { |
9918 |
assertFalse("Should not be there", true); |
9919 |
return false; |
9920 |
} |
9921 |
}; |
9922 |
astRoot.accept(visitor); |
9923 |
assertEquals("No problem found", 1, astRoot.getProblems().length); |
9924 |
} |
9875 |
} |
9925 |
} |