commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections BulkTest.java
Date Sun, 05 Oct 2003 20:48:29 GMT
scolebourne    2003/10/05 13:48:29

  Modified:    collections/src/test/org/apache/commons/collections
                        BulkTest.java
  Log:
  Renamed ignoredSimpleTests to ignoredTests in BulkTest
  
  Revision  Changes    Path
  1.6       +18 -15    jakarta-commons/collections/src/test/org/apache/commons/collections/BulkTest.java
  
  Index: BulkTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/BulkTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BulkTest.java	2 Oct 2003 22:14:29 -0000	1.5
  +++ BulkTest.java	5 Oct 2003 20:48:29 -0000	1.6
  @@ -167,7 +167,7 @@
    *  A subclass can override a superclass's bulk test by
    *  returning <code>null</code> from the bulk test method.  If you only
    *  want to override specific simple tests within a bulk test, use the
  - *  {@link #ignoredSimpleTests} method.<P>
  + *  {@link #ignoredTests} method.<P>
    *
    *  Note that if you want to use the bulk test methods, you <I>must</I>
    *  define your <code>suite()</code> method to use {@link #makeSuite}.
  @@ -191,7 +191,7 @@
   
       /**
        *  The full name of this bulk test instance.  This is the full name
  -     *  that is compared to {@link #ignoredSimpleTests} to see if this
  +     *  that is compared to {@link #ignoredTests} to see if this
        *  test should be ignored.  It's also displayed in the text runner
        *  to ease debugging.
        */
  @@ -225,39 +225,39 @@
   
   
       /**
  -     *  Returns an array of simple test names to ignore.<P>
  +     *  Returns an array of test names to ignore.<P>
        *
  -     *  If a simple test that's defined by this <code>BulkTest</code> or
  +     *  If a test that's defined by this <code>BulkTest</code> or
        *  by one of its bulk test methods has a name that's in the returned
        *  array, then that simple test will not be executed.<P>
        *
  -     *  A simple test's name is formed by taking the class name of the
  +     *  A test's name is formed by taking the class name of the
        *  root <code>BulkTest</code>, eliminating the package name, then
        *  appending the names of any bulk test methods that were invoked
        *  to get to the simple test, and then appending the simple test
        *  method name.  The method names are delimited by periods:
        *
  -     *  <Pre>
  +     *  <pre>
        *  TestHashMap.bulkTestEntrySet.testClear
  -     *  </Pre>
  +     *  </pre>
        *
        *  is the name of one of the simple tests defined in the sample classes
        *  described above.  If the sample <code>TestHashMap</code> class
        *  included this method:
        *
  -     *  <Pre>
  -     *  public String[] ignoredSimpleTests() {
  +     *  <pre>
  +     *  public String[] ignoredTests() {
        *      return new String[] { "TestHashMap.bulkTestEntrySet.testClear" };
        *  }
  -     *  </Pre>
  +     *  </pre>
        *
        *  then the entry set's clear method wouldn't be tested, but the key
        *  set's clear method would.
        *
  -     *  @return an array of the names of simple tests to ignore, or null if
  +     *  @return an array of the names of tests to ignore, or null if
        *   no tests should be ignored
        */
  -    public String[] ignoredSimpleTests() {
  +    protected String[] ignoredTests() {
           return null;
       }
   
  @@ -341,7 +341,7 @@
   
            BulkTest bulk = makeFirstTestCase(startingClass);
            ignored = new ArrayList();
  -         String[] s = bulk.ignoredSimpleTests();
  +         String[] s = bulk.ignoredTests();
            if (s != null) {
                ignored.addAll(Arrays.asList(s));
            }
  @@ -391,6 +391,9 @@
        *  @param m  The bulk test method
        */
       void addBulk(BulkTest bulk, Method m) {
  +        String verboseName = prefix + "." + m.getName();
  +        if (ignored.contains(verboseName)) return;
  +        
           BulkTest bulk2;
           try {
               bulk2 = (BulkTest)m.invoke(bulk, null);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message