]> source.dussan.org Git - aspectj.git/commitdiff
force java 1.5 in test
authoraclement <aclement>
Sat, 10 Dec 2011 01:03:40 +0000 (01:03 +0000)
committeraclement <aclement>
Sat, 10 Dec 2011 01:03:40 +0000 (01:03 +0000)
org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java

index 906a192cb3e817ee51aaef70d1c42cedd0ffb57b..ffb9275f8a1a30f9c7b56ce0bf9c432571caf011 100644 (file)
@@ -15,6 +15,7 @@ import java.util.Map;
 
 import junit.framework.TestCase;
 
+import org.aspectj.org.eclipse.jdt.core.JavaCore;
 import org.aspectj.org.eclipse.jdt.core.dom.AST;
 import org.aspectj.org.eclipse.jdt.core.dom.ASTParser;
 import org.aspectj.org.eclipse.jdt.core.dom.AbstractBooleanTypePattern;
@@ -420,7 +421,9 @@ public class ASTVisitorTest extends TestCase {
        
        private void checkJLS3(String source, String expectedOutput) {
                ASTParser parser = ASTParser.newParser(AST.JLS3);
-               parser.setCompilerOptions(new HashMap());
+               HashMap<String,String> options = new HashMap<String,String>();
+               options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5);
+               parser.setCompilerOptions(options);
                parser.setSource(source.toCharArray());
                CompilationUnit cu2 = (CompilationUnit) parser.createAST(null);
                TestVisitor visitor = new TestVisitor();