7002346: javap test relies on location of scratch directory

Tue, 23 Nov 2010 15:28:34 -0800

author
jjg
date
Tue, 23 Nov 2010 15:28:34 -0800
changeset 755
79d0c48d361e
parent 754
285896f2227a
child 756
d44d6d8493ad

7002346: javap test relies on location of scratch directory
Reviewed-by: ksrini

test/tools/javap/T6729471.java file | annotate | diff | comparison | revisions
     1.1 --- a/test/tools/javap/T6729471.java	Tue Nov 23 13:32:29 2010 -0800
     1.2 +++ b/test/tools/javap/T6729471.java	Tue Nov 23 15:28:34 2010 -0800
     1.3 @@ -39,6 +39,8 @@
     1.4      }
     1.5  
     1.6      void run() {
     1.7 +        File testClasses = new File(System.getProperty("test.classes"));
     1.8 +
     1.9          // simple class
    1.10          verify("java.util.Map",
    1.11                  "public abstract boolean containsKey(java.lang.Object)");
    1.12 @@ -48,11 +50,11 @@
    1.13                  "public abstract K getKey()");
    1.14  
    1.15          // file name
    1.16 -        verify("../classes/tools/javap/T6729471.class",
    1.17 +        verify(new File(testClasses, "T6729471.class").getPath(),
    1.18                  "public static void main(java.lang.String...)");
    1.19  
    1.20          // file url
    1.21 -        verify("file:../classes/tools/javap/T6729471.class",
    1.22 +        verify(new File(testClasses, "T6729471.class").toURI().toString(),
    1.23                  "public static void main(java.lang.String...)");
    1.24  
    1.25          // jar url: rt.jar

mercurial