changeset 807:79d0c48d361e

7002346: javap test relies on location of scratch directory Reviewed-by: ksrini
author jjg
date Tue, 23 Nov 2010 15:28:34 -0800
parents 285896f2227a
children d44d6d8493ad
files test/tools/javap/T6729471.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javap/T6729471.java	Tue Nov 23 13:32:29 2010 -0800
+++ b/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