ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/formatter FilterStackFormatter.java XMLFormatter.java
Date Sun, 10 Feb 2002 20:33:40 GMT
sbailliez    02/02/10 12:33:40

  Modified:    proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit
                        ClasspathTestCollector.java JUnitHelper.java
                        ResultFormatterElement.java
               proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/formatter
                        FilterStackFormatter.java XMLFormatter.java
  Log:
  Some cleanup
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/ClasspathTestCollector.java
  
  Index: ClasspathTestCollector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/ClasspathTestCollector.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClasspathTestCollector.java	3 Feb 2002 13:52:31 -0000	1.3
  +++ ClasspathTestCollector.java	10 Feb 2002 20:33:40 -0000	1.4
  @@ -122,8 +122,8 @@
           Project project = getProject();
           DirectoryScanner ds = new DirectoryScanner();
           ds.setBasedir(dir);
  -        ds.setIncludes(patterns.getIncludePatterns(getProject()));
  -        ds.setExcludes(patterns.getExcludePatterns(getProject()));
  +        ds.setIncludes(patterns.getIncludePatterns(project));
  +        ds.setExcludes(patterns.getExcludePatterns(project));
           ds.scan();
           String[] included = ds.getIncludedFiles();
           return testClassNameFromFile(included);
  
  
  
  1.4       +0 -2      jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/JUnitHelper.java
  
  Index: JUnitHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/JUnitHelper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JUnitHelper.java	3 Feb 2002 13:52:31 -0000	1.3
  +++ JUnitHelper.java	10 Feb 2002 20:33:40 -0000	1.4
  @@ -81,7 +81,6 @@
        */
       public static String getTestName(String text){
           int p1 = text.indexOf('(');
  -        int p2 = text.indexOf(')', p1);
           return text.substring(0, p1);
       }
   
  @@ -118,7 +117,6 @@
       /**
        * Extract a test from a given class
        * @param clazz the class to extract a test from.
  -     * @throws Exception a generic exception
        */
       public static Test getTest(Class clazz) {
           try {
  
  
  
  1.2       +0 -1      jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/ResultFormatterElement.java
  
  Index: ResultFormatterElement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/ResultFormatterElement.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResultFormatterElement.java	1 Feb 2002 23:53:22 -0000	1.1
  +++ ResultFormatterElement.java	10 Feb 2002 20:33:40 -0000	1.2
  @@ -117,7 +117,6 @@
       /**
        * Setting a comma separated list of filters in the specified order.
        * @see #addFilter(FilterElement)
  -     * @see FilterAttribute
        */
       public void setFilters(String filters) {
           StringTokenizer st = new StringTokenizer(filters, ",");
  
  
  
  1.3       +1 -1      jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/formatter/FilterStackFormatter.java
  
  Index: FilterStackFormatter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/formatter/FilterStackFormatter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FilterStackFormatter.java	3 Feb 2002 21:14:56 -0000	1.2
  +++ FilterStackFormatter.java	10 Feb 2002 20:33:40 -0000	1.3
  @@ -127,7 +127,7 @@
       }
       /**
        * Check whether or not the line should be accepted.
  -     * @param the line to be check for acceptance.
  +     * @param line the line to be check for acceptance.
        * @return <tt>true</tt> if the line is accepted, <tt>false</tt>
if not.
        */
       protected boolean accept(String line) {
  
  
  
  1.4       +5 -0      jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/formatter/XMLFormatter.java
  
  Index: XMLFormatter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/formatter/XMLFormatter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLFormatter.java	3 Feb 2002 21:14:56 -0000	1.3
  +++ XMLFormatter.java	10 Feb 2002 20:33:40 -0000	1.4
  @@ -211,6 +211,11 @@
           String name = JUnitHelper.getTestName(evt.getName());
           test.setAttribute(ATTR_NAME, name);
           String suiteName = JUnitHelper.getSuiteName(evt.getName());
  +        if ( !suiteName.equals(lastSuiteElement.getAttribute("name")) ){
  +            throw new BuildException("Received testcase from test "
  +                    + suiteName + " and was expecting "
  +                    + lastSuiteElement.getAttribute("name"));
  +        }
           lastSuiteElement.appendChild(test);
           lastTestElement = test;
           lastTestEvent = evt;
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message