< prev index next >

langtools/test/tools/javac/versions/Versions.java

Print this page

        

@@ -21,11 +21,11 @@
  * questions.
  */
 
 /*
  * @test
- * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610 8028546
+ * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610 8028546 8187296
  * @summary Check interpretation of -target and -source options
  * @modules java.compiler
  *          jdk.compiler
  * @run main Versions
  */

@@ -62,16 +62,17 @@
     void run() {
 
         String TC = "";
         System.out.println("Version.java: Starting");
 
-        check("53.0");
-        check("53.0", "-source 1.6");
-        check("53.0", "-source 1.7");
-        check("53.0", "-source 1.8");
-        check("53.0", "-source 1.9");
-        check("53.0", "-source 1.10");
+        check("54.0");
+        check("54.0", "-source 1.6");
+        check("54.0", "-source 1.7");
+        check("54.0", "-source 1.8");
+        check("54.0", "-source 1.9");
+        check("54.0", "-source 1.10");
+        check("54.0", "-source 11");
 
         check_source_target("50.0", "6", "6");
         check_source_target("51.0", "6", "7");
         check_source_target("51.0", "7", "7");
         check_source_target("52.0", "6", "8");

@@ -80,10 +81,16 @@
         check_source_target("53.0", "6", "9");
         check_source_target("53.0", "7", "9");
         check_source_target("53.0", "8", "9");
         check_source_target("53.0", "9", "9");
         check_source_target("53.0", "10", "10");
+        check_source_target("54.0", "6", "11");
+        check_source_target("54.0", "7", "11");
+        check_source_target("54.0", "8", "11");
+        check_source_target("54.0", "9", "11");
+        check_source_target("54.0", "10", "11");
+        check_source_target("54.0", "11", "11");
 
         checksrc16("-source 1.6");
         checksrc16("-source 6");
         checksrc16("-source 1.6", "-target 1.6");
         checksrc16("-source 6", "-target 6");

@@ -106,17 +113,26 @@
         checksrc110("-source 1.10", "-target 1.10");
         checksrc110("-source 10", "-target 10");
         checksrc110("-target 1.10");
         checksrc110("-target 10");
 
+        checksrc11();
+        checksrc11("-source 11");
+        checksrc11("-source 11", "-target 11");
+        checksrc11("-target 11");
+
         fail("-source 7", "-target 1.6", "Base.java");
         fail("-source 8", "-target 1.6", "Base.java");
         fail("-source 8", "-target 1.7", "Base.java");
         fail("-source 9", "-target 1.7", "Base.java");
         fail("-source 9", "-target 1.8", "Base.java");
         fail("-source 10", "-target 1.7", "Base.java");
         fail("-source 10", "-target 1.8", "Base.java");
+        fail("-source 11", "-target 1.7", "Base.java");
+        fail("-source 11", "-target 1.8", "Base.java");
+        fail("-source 11", "-target 1.9", "Base.java");
+        fail("-source 11", "-target 1.10", "Base.java");
 
         fail("-source 1.5", "-target 1.5", "Base.java");
         fail("-source 1.4", "-target 1.4", "Base.java");
         fail("-source 1.3", "-target 1.3", "Base.java");
         fail("-source 1.2", "-target 1.2", "Base.java");

@@ -214,10 +230,15 @@
     protected void checksrc110(String... args) {
         printargs("checksrc110", args);
         checksrc19(args);
     }
 
+    protected void checksrc11(String... args) {
+        printargs("checksrc11", args);
+        checksrc110(args);
+    }
+
     protected void pass(String... args) {
         printargs("pass", args);
 
         List<String> jcargs = new ArrayList<String>();
         jcargs.add("-Xlint:-options");
< prev index next >