41 import org.testng.annotations.DataProvider;
42 import org.testng.annotations.Test;
43 import static org.testng.Assert.*;
44
45 public class ClassFileVersionsTest {
46
47 // major, minor, modifiers for requires java.base
48 @DataProvider(name = "supported")
49 public Object[][] supported() {
50 return new Object[][]{
51 { 53, 0, Set.of() }, // JDK 9
52 { 53, 0, Set.of(STATIC) },
53 { 53, 0, Set.of(TRANSITIVE) },
54 { 53, 0, Set.of(STATIC, TRANSITIVE) },
55
56 { 54, 0, Set.of() }, // JDK 10
57 { 55, 0, Set.of() }, // JDK 11
58 { 56, 0, Set.of() }, // JDK 12
59 { 57, 0, Set.of() }, // JDK 13
60 { 58, 0, Set.of() }, // JDK 14
61 };
62 }
63
64 // major, minor, modifiers for requires java.base
65 @DataProvider(name = "unsupported")
66 public Object[][] unsupported() {
67 return new Object[][]{
68 { 50, 0, Set.of()}, // JDK 6
69 { 51, 0, Set.of()}, // JDK 7
70 { 52, 0, Set.of()}, // JDK 8
71
72 { 54, 0, Set.of(STATIC) }, // JDK 10
73 { 54, 0, Set.of(TRANSITIVE) },
74 { 54, 0, Set.of(STATIC, TRANSITIVE) },
75
76 { 55, 0, Set.of(STATIC) }, // JDK 11
77 { 55, 0, Set.of(TRANSITIVE) },
78 { 55, 0, Set.of(STATIC, TRANSITIVE) },
79
80 { 56, 0, Set.of(STATIC) }, // JDK 12
|
41 import org.testng.annotations.DataProvider;
42 import org.testng.annotations.Test;
43 import static org.testng.Assert.*;
44
45 public class ClassFileVersionsTest {
46
47 // major, minor, modifiers for requires java.base
48 @DataProvider(name = "supported")
49 public Object[][] supported() {
50 return new Object[][]{
51 { 53, 0, Set.of() }, // JDK 9
52 { 53, 0, Set.of(STATIC) },
53 { 53, 0, Set.of(TRANSITIVE) },
54 { 53, 0, Set.of(STATIC, TRANSITIVE) },
55
56 { 54, 0, Set.of() }, // JDK 10
57 { 55, 0, Set.of() }, // JDK 11
58 { 56, 0, Set.of() }, // JDK 12
59 { 57, 0, Set.of() }, // JDK 13
60 { 58, 0, Set.of() }, // JDK 14
61 { 59, 0, Set.of() }, // JDK 15
62 };
63 }
64
65 // major, minor, modifiers for requires java.base
66 @DataProvider(name = "unsupported")
67 public Object[][] unsupported() {
68 return new Object[][]{
69 { 50, 0, Set.of()}, // JDK 6
70 { 51, 0, Set.of()}, // JDK 7
71 { 52, 0, Set.of()}, // JDK 8
72
73 { 54, 0, Set.of(STATIC) }, // JDK 10
74 { 54, 0, Set.of(TRANSITIVE) },
75 { 54, 0, Set.of(STATIC, TRANSITIVE) },
76
77 { 55, 0, Set.of(STATIC) }, // JDK 11
78 { 55, 0, Set.of(TRANSITIVE) },
79 { 55, 0, Set.of(STATIC, TRANSITIVE) },
80
81 { 56, 0, Set.of(STATIC) }, // JDK 12
|