123 createSet("C.class", "C$1.class", "C$Inner.class"), |
123 createSet("C.class", "C$1.class", "C$Inner.class"), |
124 createSet(classesDir.list())); |
124 createSet(classesDir.list())); |
125 } |
125 } |
126 |
126 |
127 @Test |
127 @Test |
|
128 void oldAnnoTest(RunKind rk, GenKind gk) throws Exception { |
|
129 List<File> files = new ArrayList<File>(); |
|
130 files.add(createFile("p/C.java", |
|
131 "@javax.tools.annotation.GenerateNativeHeader class C { }")); |
|
132 |
|
133 Set<String> expect = createSet("C.h"); |
|
134 |
|
135 test(rk, gk, files, expect); |
|
136 } |
|
137 |
|
138 @Test |
128 void annoTest(RunKind rk, GenKind gk) throws Exception { |
139 void annoTest(RunKind rk, GenKind gk) throws Exception { |
129 List<File> files = new ArrayList<File>(); |
140 List<File> files = new ArrayList<File>(); |
130 files.add(createFile("p/C.java", |
141 files.add(createFile("p/C.java", |
131 "@javax.tools.annotation.GenerateNativeHeader class C { }")); |
142 "class C { @java.lang.annotation.Native public static final int i = 1907; }")); |
132 |
143 |
133 Set<String> expect = createSet("C.h"); |
144 Set<String> expect = createSet("C.h"); |
|
145 |
|
146 test(rk, gk, files, expect); |
|
147 } |
|
148 |
|
149 @Test |
|
150 void oldAnnoNestedClassTest(RunKind rk, GenKind gk) throws Exception { |
|
151 List<File> files = new ArrayList<File>(); |
|
152 files.add(createFile("p/C.java", |
|
153 "class C { @javax.tools.annotation.GenerateNativeHeader class Inner { } }")); |
|
154 |
|
155 Set<String> expect = createSet("C_Inner.h"); |
|
156 if (gk == GenKind.FULL) expect.add("C.h"); |
134 |
157 |
135 test(rk, gk, files, expect); |
158 test(rk, gk, files, expect); |
136 } |
159 } |
137 |
160 |
138 @Test |
161 @Test |
139 void annoNestedClassTest(RunKind rk, GenKind gk) throws Exception { |
162 void annoNestedClassTest(RunKind rk, GenKind gk) throws Exception { |
140 List<File> files = new ArrayList<File>(); |
163 List<File> files = new ArrayList<File>(); |
141 files.add(createFile("p/C.java", |
164 files.add(createFile("p/C.java", |
142 "class C { @javax.tools.annotation.GenerateNativeHeader class Inner { } }")); |
165 "class C { class Inner { @java.lang.annotation.Native public static final int i = 1907; } }")); |
143 |
166 |
144 Set<String> expect = createSet("C_Inner.h"); |
167 Set<String> expect = createSet("C_Inner.h"); |
145 if (gk == GenKind.FULL) expect.add("C.h"); |
168 if (gk == GenKind.FULL) expect.add("C.h"); |
146 |
169 |
147 test(rk, gk, files, expect); |
170 test(rk, gk, files, expect); |