bodewig     2004/09/30 02:55:03

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTask.java
  Log:
  Improved BWC, not that good, though
  
  Revision  Changes    Path
  1.102     +18 -3     
ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- JUnitTask.java    30 Sep 2004 09:42:16 -0000      1.101
  +++ JUnitTask.java    30 Sep 2004 09:55:03 -0000      1.102
  @@ -1474,7 +1474,22 @@
        *
        * @since Ant 1.6.2
        */
  -    protected void actOnTestResult(TestResultHolder result,JUnitTest test, 
  +    protected void actOnTestResult(int exitValue, boolean wasKilled,
  +                                   JUnitTest test, String name) {
  +        TestResult t = new TestResult();
  +        t.exitValue = exitValue;
  +        t.wasKilled = wasKilled;
  +        actOnTestResult(t, test, name);
  +    }
  +
  +    /**
  +     * Logs information about failed tests, potentially stops
  +     * processing (by throwing a BuildException) if a failure/error
  +     * occured or sets a property.
  +     *
  +     * @since Ant 1.7
  +     */
  +    protected void actOnTestResult(TestResultHolder result, JUnitTest test, 
                                      String name) {
           // if there is an error/failure and that it should halt, stop
           // everything otherwise just log a statement
  @@ -1503,7 +1518,7 @@
           }
       }
   
  -    private class TestResultHolder {
  +    protected class TestResultHolder {
           public int exitCode = JUnitTestRunner.ERRORS;
           public boolean timedOut = false;
           public boolean crashed = false;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to