| java.lang.Object org.apache.regexp.RETest
RETest | public class RETest (Code) | | Data driven (and optionally interactive) testing harness to exercise regular
expression compiler and matching engine.
author: Jonathan Locke author: Jon S. Stevens author: Michael McCallum version: $Id: RETest.java 518156 2007-03-14 14:31:26Z vgritsenko $ |
Constructor Summary | |
public | RETest() |
showSuccesses | final static boolean showSuccesses(Code) | | |
RETest | public RETest()(Code) | | Constructor
|
assertEquals | public void assertEquals(String message, int expected, int actual)(Code) | | |
die | void die(String s)(Code) | | Exit with a fatal error.
Parameters: s - Last famous words before exiting |
fail | void fail(StringBuffer log, String s)(Code) | | Fail with an error. Will print a big failure message to System.out.
Parameters: log - Output before failure Parameters: s - Failure description |
fail | void fail(String s)(Code) | | Fail with an error. Will print a big failure message to System.out.
Parameters: s - Failure description |
main | public static void main(String[] args)(Code) | | Main program entrypoint. If an argument is given, it will be compiled
and interactive matching will ensue. If no argument is given, the
file RETest.txt will be used as automated testing input.
Parameters: args - Command line arguments (optional regular expression) |
runAutomatedTests | void runAutomatedTests(String testDocument) throws Exception(Code) | | Run automated tests in RETest.txt file (from Perl 4.0 test battery)
exception: Exception - thrown in case of error |
runInteractiveTests | void runInteractiveTests(String expr)(Code) | | Compile and test matching against a single expression
Parameters: expr - Expression to compile and test |
say | void say(String s)(Code) | | Say something to standard out
Parameters: s - What to say |
showParens | void showParens(RE r)(Code) | | Dump parenthesized subexpressions found by a regular expression matcher object
Parameters: r - Matcher object with results to show |
test | public static boolean test(String[] args) throws Exception(Code) | | Testing entrypoint.
Parameters: args - Command line arguments exception: Exception - thrown in case of error |
testOther | void testOther() throws Exception(Code) | | Run automated unit test
exception: Exception - thrown in case of error |
|
|