org.apache.taglibs.standard.lang.jstl.test
Class ParserTest

java.lang.Object
  extended by org.apache.taglibs.standard.lang.jstl.test.ParserTest

public class ParserTest
extends Object

This runs a series of tests specifically for the parser. It parses various expressions and prints out the canonical representation of those parsed expressions.

The expressions are stored in an input text file, with one line per expression. Blank lines and lines that start with # are ignored. The results are written to an output file (blank lines and # lines are included in the output file). The output file may be compared against an existing output file to do regression testing.

Version:
$Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: tcfujii $
Author:
Nathan Abramson - Art Technology Group

Constructor Summary
ParserTest()
          Constructor
 
Method Summary
static boolean isDifferentFiles(DataInput pIn1, DataInput pIn2)
          Performs a line-by-line comparison of the two files, returning true if the files are different, false if not.
static boolean isDifferentFiles(File pFile1, File pFile2)
          Performs a line-by-line comparison of the two files, returning true if the files are different, false if not.
static void main(String[] pArgs)
          Runs the parser test
static void runTests(DataInput pIn, PrintStream pOut)
          Runs the tests, reading expressions from pIn and writing the results to pOut.
static void runTests(File pInputFile, File pOutputFile)
          Runs the tests, reading from the given input file and writing to the given output file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParserTest

public ParserTest()
Constructor

Method Detail

runTests

public static void runTests(DataInput pIn,
                            PrintStream pOut)
                     throws IOException
Runs the tests, reading expressions from pIn and writing the results to pOut.

Throws:
IOException

runTests

public static void runTests(File pInputFile,
                            File pOutputFile)
                     throws IOException
Runs the tests, reading from the given input file and writing to the given output file.

Throws:
IOException

isDifferentFiles

public static boolean isDifferentFiles(DataInput pIn1,
                                       DataInput pIn2)
                                throws IOException
Performs a line-by-line comparison of the two files, returning true if the files are different, false if not.

Throws:
IOException

isDifferentFiles

public static boolean isDifferentFiles(File pFile1,
                                       File pFile2)
                                throws IOException
Performs a line-by-line comparison of the two files, returning true if the files are different, false if not.

Throws:
IOException

main

public static void main(String[] pArgs)
                 throws IOException
Runs the parser test

Throws:
IOException


Copyright © 2007 Mort Bay Consulting. All Rights Reserved.