Example #1
0
 public void error(String msg) {
   if (!failedTestClasses.contains(currentTestClass)) {
     failedTestClasses.add(currentTestClass);
   }
   if (!quiet) {
     System.err.println(msg);
     new ExpectationFailed().printStackTrace();
     System.err.println();
   }
 }
 protected synchronized Class loadClass(String name, boolean resolve)
     throws ClassNotFoundException {
   if (_excludedNames.contains(name)) {
     print("EXCLUDED: " + name);
     throw new ClassNotFoundException(name);
   }
   if (_cache.containsKey(name)) {
     print("CACHED: " + name);
     return (Class) _cache.get(name);
   }
   if (mustDelegate(name)) {
     print("NATIVE: " + name);
     return super.loadClass(name, resolve);
   }
   Class clazz = findRawClass(name);
   if (resolve) {
     resolveClass(clazz);
   }
   _cache.put(clazz.getName(), clazz);
   print("LOADED: " + name);
   return clazz;
 }