7002346: javap test relies on location of scratch directory
authorjjg
Tue, 23 Nov 2010 15:28:34 -0800
changeset 7333 a9ed6bf644fc
parent 7332 3e90e60e4ce8
child 7334 f432af22de29
7002346: javap test relies on location of scratch directory Reviewed-by: ksrini
langtools/test/tools/javap/T6729471.java
--- a/langtools/test/tools/javap/T6729471.java	Tue Nov 23 13:32:29 2010 -0800
+++ b/langtools/test/tools/javap/T6729471.java	Tue Nov 23 15:28:34 2010 -0800
@@ -39,6 +39,8 @@
     }
 
     void run() {
+        File testClasses = new File(System.getProperty("test.classes"));
+
         // simple class
         verify("java.util.Map",
                 "public abstract boolean containsKey(java.lang.Object)");
@@ -48,11 +50,11 @@
                 "public abstract K getKey()");
 
         // file name
-        verify("../classes/tools/javap/T6729471.class",
+        verify(new File(testClasses, "T6729471.class").getPath(),
                 "public static void main(java.lang.String...)");
 
         // file url
-        verify("file:../classes/tools/javap/T6729471.class",
+        verify(new File(testClasses, "T6729471.class").toURI().toString(),
                 "public static void main(java.lang.String...)");
 
         // jar url: rt.jar