From: Brent F. <bfu...@de...> - 2003-02-17 03:35:04
|
I finally decided to try out Noel's testing framework, and so I cobbled together a rather large set of tests for the Perl-Compatible Regular Expression module, using the test data from the Perl 5.8 release, as well as some of the more interesting tests from the recently-announced Common Lisp implementation. Dorai's PCRE package does fairly well, but there are several cases that just don't work well at all. A few others seem to trigger combinatoric explosion, taking far longer than I was willing to wait to complete, especially when Perl can handle the same routine in a fraction of a second. I'm really happy with Schemeunit, and have just one suggestion. I found myself building a lot of test cases like so: (map assert-pregexp-equal? (list (list exp "abc" (list "abc")) (list exp "abc" (list (cons 0 3))) (list (pregexp "abcd") "abcd" (list "abcd")) (list exp "xabcy" (list "abc")) (list exp "xabcy" (list (cons 1 4))) (list exp "ababc" (list "abc")) (list exp "ababc" (list (cons 2 5))) I was really wanting to build an individual test case for each one, but couldn't get the "make-test-case" macro to handle things properly, as I ended up returning a list of test cases, which "make-test-suite" does not understand. Other than that, Schemeunit works wonderfully. I put the regular expression tests under src/tests in CVS in case anyone else has use for this. I intend to add other test suites in the future as time allows. Thanks, -Brent |