ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka ClassPathLoaderTest.java
Date Tue, 11 Mar 2003 10:30:15 GMT
bodewig     2003/03/11 02:30:15

  Modified:    src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka
                        ClassPathLoaderTest.java
  Log:
  Make test more robust.  In particular - make it pass on Mac OS X.
  
  Revision  Changes    Path
  1.3       +6 -4      ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassPathLoaderTest.java
  
  Index: ClassPathLoaderTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassPathLoaderTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClassPathLoaderTest.java	10 Feb 2003 14:14:54 -0000	1.2
  +++ ClassPathLoaderTest.java	11 Mar 2003 10:30:15 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001,2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -57,6 +57,7 @@
   import java.io.File;
   
   import junit.framework.TestCase;
  +import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.taskdefs.optional.sitraka.bytecode.ClassPathLoader;
   
   /**
  @@ -71,9 +72,10 @@
   
       public void testgetClasses() throws Exception {
           // good performance test...load all classes in rt.jar
  -        String path = System.getProperty("java.home") + File.separator + "lib/rt.jar";
  -        ClassPathLoader cl = new ClassPathLoader(path);
  -		Hashtable map = cl.getClasses();
  +        Path p = new Path(null);
  +        p.addJavaRuntime();
  +        ClassPathLoader cl = new ClassPathLoader(p.toString());
  +        Hashtable map = cl.getClasses();
           assertTrue(map.size() > 0);
       }
   
  
  
  

Mime
View raw message