211 String defaultPathString = sb.toString(); |
212 String defaultPathString = sb.toString(); |
212 |
213 |
213 setLocation(CLASS_PATH); // empty |
214 setLocation(CLASS_PATH); // empty |
214 setLocation(SOURCE_PATH); // empty |
215 setLocation(SOURCE_PATH); // empty |
215 |
216 |
|
217 // Use -source 8 -target 8 to enable use of platform class path options |
216 // FIXME: temporarily exclude cases referring to default bootclasspath |
218 // FIXME: temporarily exclude cases referring to default bootclasspath |
217 // for (int i = 1; i <= 10; i++) { |
219 // for (int i = 1; i <= 10; i++) { |
218 int[] cases = new int[] { 1, 2, 4, 5, 6, 7 }; |
220 int[] cases = new int[] { 1, 2, 4, 5, 6, 7 }; |
219 for (int i : cases) { |
221 for (int i : cases) { |
220 File classes = createDir(test + "/" + i + "/classes"); |
222 File classes = createDir(test + "/" + i + "/classes"); |
229 |
231 |
230 File jar; |
232 File jar; |
231 |
233 |
232 switch (i) { |
234 switch (i) { |
233 case 1: |
235 case 1: |
234 options = getOptions("-d", classes.getPath(), "-Xbootclasspath/p:" + testClasses); |
236 options = getOptions("-d", classes.getPath(), |
|
237 "-source", "8", "-target", "8", |
|
238 "-Xbootclasspath/p:" + testClasses); |
235 mode = Mode.STARTS_WITH; |
239 mode = Mode.STARTS_WITH; |
236 match = Arrays.asList(testClasses); |
240 match = Arrays.asList(testClasses); |
237 break; |
241 break; |
238 |
242 |
239 case 2: |
243 case 2: |
240 // the default values for -extdirs and -endorseddirs come after the bootclasspath; |
244 // the default values for -extdirs and -endorseddirs come after the bootclasspath; |
241 // so to check -Xbootclasspath/a: we specify empty values for those options. |
245 // so to check -Xbootclasspath/a: we specify empty values for those options. |
242 options = getOptions("-d", classes.getPath(), |
246 options = getOptions("-d", classes.getPath(), |
243 "-Xbootclasspath/a:" + testClasses, |
247 "-source", "8", "-target", "8", |
244 "-extdirs", "", |
248 "-Xbootclasspath/a:" + testClasses, |
245 "-endorseddirs", ""); |
249 "-extdirs", "", |
|
250 "-endorseddirs", ""); |
246 mode = Mode.ENDS_WITH; |
251 mode = Mode.ENDS_WITH; |
247 match = Arrays.asList(testClasses); |
252 match = Arrays.asList(testClasses); |
248 break; |
253 break; |
249 |
254 |
250 case 3: |
255 case 3: |
256 |
261 |
257 case 4: |
262 case 4: |
258 fileManager.setLocation(PLATFORM_CLASS_PATH, null); |
263 fileManager.setLocation(PLATFORM_CLASS_PATH, null); |
259 jar = new File(testJars, "j" + i + ".jar"); |
264 jar = new File(testJars, "j" + i + ".jar"); |
260 writeJar(jar, testClasses, "C" + i + ".class"); |
265 writeJar(jar, testClasses, "C" + i + ".class"); |
261 options = getOptions("-d", classes.getPath(), "-endorseddirs", testJars.getPath()); |
266 options = getOptions("-d", classes.getPath(), |
|
267 "-source", "8", "-target", "8", |
|
268 "-endorseddirs", testJars.getPath()); |
262 mode = Mode.CONTAINS; |
269 mode = Mode.CONTAINS; |
263 match = Arrays.asList(jar); |
270 match = Arrays.asList(jar); |
264 break; |
271 break; |
265 |
272 |
266 case 5: |
273 case 5: |
267 fileManager.setLocation(PLATFORM_CLASS_PATH, null); |
274 fileManager.setLocation(PLATFORM_CLASS_PATH, null); |
268 jar = new File(testJars, "j" + i + ".jar"); |
275 jar = new File(testJars, "j" + i + ".jar"); |
269 writeJar(jar, testClasses, "C" + i + ".class"); |
276 writeJar(jar, testClasses, "C" + i + ".class"); |
270 options = getOptions("-d", classes.getPath(), "-Djava.endorsed.dirs=" + testJars.getPath()); |
277 options = getOptions("-d", classes.getPath(), |
|
278 "-source", "8", "-target", "8", |
|
279 "-Djava.endorsed.dirs=" + testJars.getPath()); |
271 mode = Mode.CONTAINS; |
280 mode = Mode.CONTAINS; |
272 match = Arrays.asList(jar); |
281 match = Arrays.asList(jar); |
273 break; |
282 break; |
274 |
283 |
275 case 6: |
284 case 6: |
276 fileManager.setLocation(PLATFORM_CLASS_PATH, null); |
285 fileManager.setLocation(PLATFORM_CLASS_PATH, null); |
277 jar = new File(testJars, "j" + i + ".jar"); |
286 jar = new File(testJars, "j" + i + ".jar"); |
278 writeJar(jar, testClasses, "C" + i + ".class"); |
287 writeJar(jar, testClasses, "C" + i + ".class"); |
279 options = getOptions("-d", classes.getPath(), "-extdirs", testJars.getPath()); |
288 options = getOptions("-d", classes.getPath(), |
|
289 "-source", "8", "-target", "8", |
|
290 "-extdirs", testJars.getPath()); |
280 mode = Mode.CONTAINS; |
291 mode = Mode.CONTAINS; |
281 match = Arrays.asList(jar); |
292 match = Arrays.asList(jar); |
282 break; |
293 break; |
283 |
294 |
284 case 7: |
295 case 7: |
285 fileManager.setLocation(PLATFORM_CLASS_PATH, null); |
296 fileManager.setLocation(PLATFORM_CLASS_PATH, null); |
286 jar = new File(testJars, "j" + i + ".jar"); |
297 jar = new File(testJars, "j" + i + ".jar"); |
287 writeJar(jar, testClasses, "C" + i + ".class"); |
298 writeJar(jar, testClasses, "C" + i + ".class"); |
288 options = getOptions("-d", classes.getPath(), "-Djava.ext.dirs=" + testJars.getPath()); |
299 options = getOptions("-d", classes.getPath(), |
|
300 "-source", "8", "-target", "8", |
|
301 "-Djava.ext.dirs=" + testJars.getPath()); |
289 mode = Mode.CONTAINS; |
302 mode = Mode.CONTAINS; |
290 match = Arrays.asList(jar); |
303 match = Arrays.asList(jar); |
291 break; |
304 break; |
292 |
305 |
293 case 8: |
306 case 8: |