langtools/test/tools/javac/classfiles/ClassVersionChecker.java
changeset 14445 835eb1433d39
parent 12465 095abcf8f637
child 23393 1698e8b53501
equal deleted inserted replaced
14444:2069262b27c5 14445:835eb1433d39
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 7157626
    26  * @bug 7157626 8001112
    27  * @summary Test major version for all legal combinations for -source and -target
    27  * @summary Test major version for all legal combinations for -source and -target
    28  * @author sgoel
    28  * @author sgoel
    29  *
    29  *
    30  */
    30  */
    31 
    31 
    55         /* -source (0=>empty,1=>1.2,...) X -target (0=>empty,1=>1.2,...)
    55         /* -source (0=>empty,1=>1.2,...) X -target (0=>empty,1=>1.2,...)
    56          * ver[0][0] => no -source or -target was given
    56          * ver[0][0] => no -source or -target was given
    57          * -1 => invalid combinations
    57          * -1 => invalid combinations
    58          */
    58          */
    59         int[][] ver =
    59         int[][] ver =
    60                 {{51, -1, -1, -1, -1, -1, -1, -1},
    60                 {{52, -1, -1, -1, -1, -1, -1, -1},
    61                  {48, 46, 47, 48, 49, 50, 51, 51},
    61                  {48, 46, 47, 48, 49, 50, 51, 52},
    62                  {48, 46, 47, 48, 49, 50, 51, 51},
    62                  {48, 46, 47, 48, 49, 50, 51, 52},
    63                  {48, -1, -1, 48, 49, 50, 51, 51},
    63                  {48, -1, -1, 48, 49, 50, 51, 52},
    64                  {51, -1, -1, -1, 49, 50, 51, 51},
    64                  {52, -1, -1, -1, 49, 50, 51, 52},
    65                  {51, -1, -1, -1, -1, 50, 51, 51},
    65                  {52, -1, -1, -1, -1, 50, 51, 52},
    66                  {51, -1, -1, -1, -1, -1, 51, 51},
    66                  {52, -1, -1, -1, -1, -1, 51, 52},
    67                  {51, -1, -1, -1, -1, -1, -1, 51}};
    67                  {52, -1, -1, -1, -1, -1, -1, 52}};
    68 
    68 
    69         // Loop to run all possible combinations of source/target values
    69         // Loop to run all possible combinations of source/target values
    70         for (int i = 0; i< ver.length; i++) {
    70         for (int i = 0; i< ver.length; i++) {
    71             for (int j = 0 ; j< ver[i].length; j++) {
    71             for (int j = 0 ; j< ver[i].length; j++) {
    72                 if(ver[i][j] != -1) {
    72                 if(ver[i][j] != -1) {