joliebig/featurehouse — pull request #20 by henzk (2014-05-31 13:03:47+00:00)
Title: Composer tests

Hi Jörg,

i have implemented your idea with the checksums. This adds a small utility class to fstgen so it can be used by fstmerge as well.

I have added a test directory and some Java composition tests to fstcomp. To run the tests, i had to adapt build.xml: there are individual ant-tasks to compile and test fstgen and fstcomp now (fstmerge tasks will need to be added). Also, the test-compile-fstcomp task currently copies the Java GPL example to test/.
I am not sure if this is the right way to do it.

Apparently, there is global state that is not properly reset in the composer at the moment, so one Test class with multiple test methods will not work with FSTGenComposer for now :(

An easy way to add a test is to copy one, adapt it, let it fail with incorrect checksum, sneak the correct checksum from the failed test's output.

To debug fstcomp tests, the output can be inspected at result/fstcomp/output. Diffing the output directory against one generated by a known good version of featureHouse might also be helpful.

Now, i am very interested what the Travis CI has to say about this...