hi there,
I'v just checked in some preliminary unit test for the OpenCxx module
into synopsis. You can check it out from the (subversion) repository
at http://synopsis.fresco.org/viewsvn/synopsis-Synopsis/ or a snapshot
at http://synopsis.fresco.org/download/ starting tomorrow.
Here is what I'm doing:
the OpenCxx tests rely on 'resources' that are set up first. These
are little testing applets built specifically for the unit tests.
Right now there are three: one for the Lexer, one for the Parser,
and one for the Encoding class.
For each there is a test suite, consisting of an input (source) file,
as well as an expected output file.
If you run 'python setup.py test -s OpenCxx.Encoding' the OpenCxx.Encoding
test suite will be performed (i.e. first the 'Encoding' applet will be
compiled and then all source files pertaining to this suite will be processed,
and the output compared.
Right now there's only one source file per test suite (read: each suite contains
exactly one test), but that's just because I'm still setting everything up.
You can find the sources for these testing applets at
http://synopsis.fresco.org/viewsvn/synopsis-Synopsis/trunk/tests/OpenCxx/src/ .
I'd suggest we work together to set up something similar for the opencxx project.
Please note that the above applets make use of some important changes I made
to the API, specifically to make the code more modular and unit-testable.
Best regards,
Stefan
|