open source regression suite

I have a program, let's name it a.out, that reads input from a file and writes some output to stdout. For example a file contains the line 2,2 and my program "./a.out file" writes 4 at the screen.

Now in order to be sure that a.out works well after the patch, I am looking for a good regression suite for Linux. I want for every file that contains 2,2 my program to return 4 and I want this to be a test case.

Any ideas on regression packages?


Have a look at TAP for unit testing. Its what Perl uses for testing the innards of Perl (specifically CPAN submissions), CCAN adopted it. I'm assuming C (you did say a.out). Then, simply make your read function fail if 2,2 is read (hinting on 3 bytes) if NDEBUG is not defined.

You could use something else, like -DUNIT_TESTS_RUNNING, just watch out for dependencies.

Then again, if the function you are testing returns a string .. no need to bother the preprocessor, let the test figure that out.

TAP is really, really easy to integrate. You can find my ad-hoc Valgrind aware version here. Note, that is not proper, that repo is a mess, but worth showing how easy it is to make other tools work with TAP.

Incidentally, TAP : (T)est (A)nything (P)rotocol

If this is NOT C, you need to re-tag your question.

Need Your Help

How to edit an Xml file's element values

c# xml settings edit updating

I have this Xml file, and I want to edit any of the elements like homepage or search_provider.

Tangent Space, Tangent / Binormal Calculation

c++ opengl 3d bump-mapping

I have the following code to calculate the tangents , bitangents. And I can successfully render some mesh examples using normal mapping.