curcuru     00/12/05 10:43:31

  Modified:    test/java/src/org/apache/qetest ConsoleLogger.java
  Log:
  Properly handle check* calls with null Id arg
  
  Revision  Changes    Path
  1.3       +17 -5     
xml-xalan/test/java/src/org/apache/qetest/ConsoleLogger.java
  
  Index: ConsoleLogger.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/ConsoleLogger.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConsoleLogger.java        2000/12/01 22:18:21     1.2
  +++ ConsoleLogger.java        2000/12/05 18:43:28     1.3
  @@ -71,7 +71,7 @@
   /**
    * Logger that prints human-readable output to System.out.
    * @author [EMAIL PROTECTED]
  - * @version $Id: ConsoleLogger.java,v 1.2 2000/12/01 22:18:21 curcuru Exp $
  + * @version $Id: ConsoleLogger.java,v 1.3 2000/12/05 18:43:28 curcuru Exp $
    */
   public class ConsoleLogger implements Logger
   {
  @@ -467,7 +467,10 @@
        */
       public void checkPass(String comment, String id)
       {
  -        outStream.println(sIndent + "PASS!  (" + id + ") " + comment);
  +        if (id != null)
  +            outStream.println(sIndent + "PASS!  (" + id + ") " + comment);
  +        else
  +            outStream.println(sIndent + "PASS!  " + comment);
       }
   
       /**
  @@ -478,7 +481,10 @@
        */
       public void checkAmbiguous(String comment, String id)
       {
  -        outStream.println(sIndent + "AMBG   (" + id + ") " + comment);
  +        if (id != null)
  +            outStream.println(sIndent + "AMBG   (" + id + ") " + comment);
  +        else
  +            outStream.println(sIndent + "AMBG   " + comment);
       }
   
       /**
  @@ -489,7 +495,10 @@
        */
       public void checkFail(String comment, String id)
       {
  -        outStream.println(sIndent + "FAIL!  (" + id + ") " + comment);
  +        if (id != null)
  +            outStream.println(sIndent + "FAIL!  (" + id + ") " + comment);
  +        else
  +            outStream.println(sIndent + "FAIL!  " + comment);
       }
   
       /**
  @@ -500,7 +509,10 @@
        */
       public void checkErr(String comment, String id)
       {
  -        outStream.println(sIndent + "ERROR  (" + id + ") " + comment);
  +        if (id != null)
  +            outStream.println(sIndent + "ERROR  (" + id + ") " + comment);
  +        else
  +            outStream.println(sIndent + "ERROR  " + comment);
       }
   }  // end of class ConsoleLogger
   
  
  
  

Reply via email to