On 11/02/2016 22:02, Giulio Paci wrote: > On 10/02/2016 13:18, Tiago Tresoldi wrote: >> For unit testing and other testing, I would like to have tap output >> (https://en.wikipedia.org/wiki/Test_Anything_Protocol), that is simple to >> produce from any language, so >> that the test suite can easily be created in mixed languages. If you >> agree with this idea, I can configure autoconf to support it. >> >> >> I don't really know TAP, but was thinking about something far simples, just >> a sequence of asserts to test function calls, and a bogus corpora generator >> for stressing them >> (particularly in terms of memory allocation, combined with valgrind). Let's >> wait for Ulrik's opinion. > > TAP is just a way to define the output of the tests. The main benefit is that > it is quite general and machine readable. > It is perfect for unit testing (e.g.: to keep track of "just a sequence of > asserts to test function calls"), integration testing and regressions testing. > > Probably it is easier if I setup an example and then eventually revert if you > do not like it.
I set it up (and updated autoconf files a little bit). In order to rebuild autoconf files, use autoreconf -is In order to run tests, compile as usual and run make check To see the test, just read test1.test file (I updated it so that it is not necessary to create it with autoconf anymore and to produce TAP output. The important lines for TAP are: 1) echo 1..4 the above line tells the TAP consumer that 4 tests should be expected. 2) TEST_NO, test_start and test_stop definitions: these are just convenience functions that I think are useful to simplify tests output test_start is used to start a test, it prepare default values for the test and set the description string test_end produce output (and can be used to mark tests that are expected to fail) 3) TEST_RES variable should be set to "ok" on success, before calling test_end. Cheers, Giulio ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ acopost-devel mailing list acopost-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acopost-devel