Browse Source

remove debug output

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1514951 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 12 years ago
parent
commit
73b9def757
1 changed files with 0 additions and 20 deletions
  1. +0
    -20
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java

+ 0
- 20
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java View File

@@ -367,8 +367,6 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
Throwable exception = null; Throwable exception = null;
boolean startTestSuiteSuccess = false; boolean startTestSuiteSuccess = false;


savedErr.println("Running test " + junitTest.getName() + " with {loader: " + loader + ", methods: " + methods + "}");

try { try {


try { try {
@@ -389,11 +387,9 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
try { try {
// check if there is a suite method // check if there is a suite method
suiteMethod = testClass.getMethod("suite", new Class[0]); suiteMethod = testClass.getMethod("suite", new Class[0]);
savedErr.println("found suite method");
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
// no appropriate suite method found. We don't report any // no appropriate suite method found. We don't report any
// error here since it might be perfectly normal. // error here since it might be perfectly normal.
savedErr.println("didn't find suite method");
} }
} }


@@ -409,7 +405,6 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
boolean useSingleMethodAdapter = false; boolean useSingleMethodAdapter = false;


if (junit.framework.TestCase.class.isAssignableFrom(testClass)) { if (junit.framework.TestCase.class.isAssignableFrom(testClass)) {
savedErr.println("this is a JUnit3 test");
// Do not use JUnit 4 API for running JUnit 3.x // Do not use JUnit 4 API for running JUnit 3.x
// tests - it is not able to run individual test // tests - it is not able to run individual test
// methods. // methods.
@@ -433,19 +428,12 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
// will avoid UnsupportedClassVersionError. // will avoid UnsupportedClassVersionError.


try { try {
savedErr.println("trying to load java.lang.annotation.Annotation");
Class.forName("java.lang.annotation.Annotation"); Class.forName("java.lang.annotation.Annotation");
savedErr.println("found");
savedErr.println("trying to load org.apache.tools.ant.taskdefs.optional.junit.CustomJUnit4TestAdapterCache");
junit4TestAdapterCacheClass = Class.forName("org.apache.tools.ant.taskdefs.optional.junit.CustomJUnit4TestAdapterCache"); junit4TestAdapterCacheClass = Class.forName("org.apache.tools.ant.taskdefs.optional.junit.CustomJUnit4TestAdapterCache");
savedErr.println("found");
if (loader == null) { if (loader == null) {
savedErr.println("trying to load " + JUNIT_4_TEST_ADAPTER);
junit4TestAdapterClass = junit4TestAdapterClass =
Class.forName(JUNIT_4_TEST_ADAPTER); Class.forName(JUNIT_4_TEST_ADAPTER);
savedErr.println("found");
if (testMethodsSpecified) { if (testMethodsSpecified) {
savedErr.println("trying to load org.apache.tools.ant.taskdefs.optional.junit.JUnit4TestMethodAdapter");
/* /*
* We cannot try to load the JUnit4TestAdapter * We cannot try to load the JUnit4TestAdapter
* before trying to load JUnit4TestMethodAdapter * before trying to load JUnit4TestMethodAdapter
@@ -455,34 +443,27 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
*/ */
junit4TestAdapterClass = Class.forName( junit4TestAdapterClass = Class.forName(
"org.apache.tools.ant.taskdefs.optional.junit.JUnit4TestMethodAdapter"); "org.apache.tools.ant.taskdefs.optional.junit.JUnit4TestMethodAdapter");
savedErr.println("found");
useSingleMethodAdapter = true; useSingleMethodAdapter = true;
} }
} else { } else {
savedErr.println("trying to load " + JUNIT_4_TEST_ADAPTER);
junit4TestAdapterClass = junit4TestAdapterClass =
Class.forName(JUNIT_4_TEST_ADAPTER, Class.forName(JUNIT_4_TEST_ADAPTER,
true, loader); true, loader);
savedErr.println("found");
if (testMethodsSpecified) { if (testMethodsSpecified) {
savedErr.println("trying to load org.apache.tools.ant.taskdefs.optional.junit.JUnit4TestMethodAdapter");
junit4TestAdapterClass = junit4TestAdapterClass =
Class.forName( Class.forName(
"org.apache.tools.ant.taskdefs.optional.junit.JUnit4TestMethodAdapter", "org.apache.tools.ant.taskdefs.optional.junit.JUnit4TestMethodAdapter",
true, loader); true, loader);
savedErr.println("found");
useSingleMethodAdapter = true; useSingleMethodAdapter = true;
} }
} }
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
// OK, fall back to JUnit 3. // OK, fall back to JUnit 3.
savedErr.println("NOT found");
} }
} }
junit4 = junit4TestAdapterClass != null; junit4 = junit4TestAdapterClass != null;


if (junit4) { if (junit4) {
savedErr.println("using JUnit4");
// Let's use it! // Let's use it!
Class[] formalParams; Class[] formalParams;
Object[] actualParams; Object[] actualParams;
@@ -498,7 +479,6 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
.getConstructor(formalParams). .getConstructor(formalParams).
newInstance(actualParams); newInstance(actualParams);
} else { } else {
savedErr.println("using JUnit3");
// Use JUnit 3. // Use JUnit 3.


// try to extract a test suite automatically this // try to extract a test suite automatically this


Loading…
Cancel
Save