Browse Source

Make test more robust. In particular - make it pass on Mac OS X.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274229 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
5fdf0eb22b
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassPathLoaderTest.java

+ 6
- 4
src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassPathLoaderTest.java View File

@@ -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.util.Hashtable;
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 class ClassPathLoaderTest extends TestCase {

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);
}



Loading…
Cancel
Save