curcuru     00/11/09 14:13:17

  Modified:    test/java/src/org/apache/qetest OutputNameManager.java
  Log:
  Fix bug in nextName() where it didn't increment
  Minor Javadoc updates
  
  Revision  Changes    Path
  1.2       +18 -19    
xml-xalan/test/java/src/org/apache/qetest/OutputNameManager.java
  
  Index: OutputNameManager.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/OutputNameManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OutputNameManager.java    2000/11/01 23:30:51     1.1
  +++ OutputNameManager.java    2000/11/09 22:13:17     1.2
  @@ -65,13 +65,13 @@
   /**
    * Simple utility class to manage tests with multiple output names.
    * <p>Starts with a base name and extension, and returns
  - * nextName()s like:<br>
  - * baseName_1.ext<br>
  - * baseName_2.ext<br>
  - * baseName_3.ext<br>
  - * ...<br>
  + * nextName()s like:<pre>
  + * baseName_<i>1</i>.ext
  + * baseName_<i>2</i>.ext
  + * baseName_<i>3</i>.ext
  + * ...<pre>
    * @author [EMAIL PROTECTED]
  - * @version $Id: OutputNameManager.java,v 1.1 2000/11/01 23:30:51 curcuru 
Exp $
  + * @version $Id: OutputNameManager.java,v 1.2 2000/11/09 22:13:17 curcuru 
Exp $
    */
   public class OutputNameManager
   {
  @@ -99,7 +99,7 @@
       /**
        * Construct with just a basename.  
        *
  -     * NEEDSDOC @param base
  +     * @param base basename of file; defaults counter, extension
        */
       public OutputNameManager(String base)
       {
  @@ -109,8 +109,8 @@
       /**
        * Construct with a basename and extension.  
        *
  -     * NEEDSDOC @param base
  -     * NEEDSDOC @param ext
  +     * @param base basename of file; defaults counter
  +     * @param ext extension to use instead of .out
        */
       public OutputNameManager(String base, String ext)
       {
  @@ -121,9 +121,9 @@
       /**
        * Construct with a basename, extension, and set the counter.  
        *
  -     * NEEDSDOC @param base
  -     * NEEDSDOC @param ext
  -     * NEEDSDOC @param ctr
  +     * @param base basename of file; defaults counter
  +     * @param ext extension to use instead of .out
  +     * @param ctr number to start output counting from
        */
       public OutputNameManager(String base, String ext, int ctr)
       {
  @@ -146,12 +146,12 @@
       /**
        * Increment counter and get next name.  
        *
  -     * NEEDSDOC ($objectName$) @return
  +     * @return the next name in the series
        */
       public String nextName()
       {
   
  -        setCounter(counter++);  // Updates names
  +        setCounter(counter + 1);  // Updates names
   
           return currentName();
       }
  @@ -159,7 +159,7 @@
       /**
        * Just get the current name.  
        *
  -     * NEEDSDOC ($objectName$) @return
  +     * @return our current output name
        */
       public String currentName()
       {
  @@ -169,7 +169,7 @@
       /**
        * Get the previous name, even past a reset().  
        *
  -     * NEEDSDOC ($objectName$) @return
  +     * @return last name we calculated
        */
       public String previousName()
       {
  @@ -179,7 +179,7 @@
       /**
        * Get the current counter number.  
        *
  -     * NEEDSDOC ($objectName$) @return
  +     * @return counter
        */
       public int currentCounter()
       {
  @@ -189,11 +189,10 @@
       /**
        * Set the current counter number, including names.  
        *
  -     * NEEDSDOC @param ctr
  +     * @param ctr new counter number to set
        */
       public void setCounter(int ctr)
       {
  -
           counter = ctr;
           previousName = currentName;
           currentName = baseName + SEPARATOR + counter + extension;
  
  
  

Reply via email to