curcuru     02/02/12 11:52:31

  Modified:    test/java/src/org/apache/qetest/xsl StylesheetTestlet.java
  Log:
  Ensure that checkresult logs have both the testlet name and
  the datalet.flavor that was used in this test; this will make reading
  result.xml logFiles much simpler since the flavor is a critical part of the 
test
  
  Revision  Changes    Path
  1.9       +20 -4     
xml-xalan/test/java/src/org/apache/qetest/xsl/StylesheetTestlet.java
  
  Index: StylesheetTestlet.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/xsl/StylesheetTestlet.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StylesheetTestlet.java    13 Dec 2001 17:38:39 -0000      1.8
  +++ StylesheetTestlet.java    12 Feb 2002 19:52:31 -0000      1.9
  @@ -93,7 +93,7 @@
    * subclassing easier for alternate testing algoritims.
    *
    * @author [EMAIL PROTECTED]
  - * @version $Id: StylesheetTestlet.java,v 1.8 2001/12/13 17:38:39 curcuru 
Exp $
  + * @version $Id: StylesheetTestlet.java,v 1.9 2002/02/12 19:52:31 curcuru 
Exp $
    */
   public class StylesheetTestlet extends TestletImpl
   {
  @@ -206,7 +206,7 @@
           catch (Throwable t)
           {
               logger.logThrowable(Logger.ERRORMSG, t, getDescription() + " 
newWrapper/newProcessor threw");
  -            logger.checkErr(getDescription() + " newWrapper/newProcessor 
threw: " + t.toString());
  +            logger.checkErr(getCheckDescription(datalet) + " 
newWrapper/newProcessor threw: " + t.toString());
               return null;
           }
           return transformWrapper;
  @@ -275,7 +275,7 @@
               != fileChecker.check(logger,
                                    new File(datalet.outputName), 
                                    new File(datalet.goldName), 
  -                                 getDescription() + " " + 
datalet.getDescription())
  +                                 getCheckDescription(datalet))
              )
           {
               // Log a custom element with all the file refs
  @@ -313,8 +313,24 @@
           // Put the logThrowable first, so it appears before 
           //  the Fail record, and gets color-coded
           logger.logThrowable(Logger.ERRORMSG, t, getDescription() + " " + 
datalet.getDescription());
  -        logger.checkErr(getDescription() + " " + datalet.getDescription() 
  +        logger.checkErr(getCheckDescription(datalet) 
                            + " threw: " + t.toString());
  +    }
  +
  +
  +    /** 
  +     * Worker method to construct a description.  
  +     *
  +     * Simply concatenates useful info to override getDescription().
  +     *
  +     * @param datalet to test with
  +     * @param e Throwable that was thrown
  +     */
  +    protected String getCheckDescription(StylesheetDatalet datalet)
  +    {
  +        return getDescription() 
  +                + "{" + datalet.flavor + "} "
  +                + datalet.getDescription();
       }
   }  // end of class StylesheetTestlet
   
  
  
  

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

Reply via email to