Re: [dev] Suckless unit testing in C?

From: FRIGN <dev_AT_frign.de>
Date: Tue, 24 Feb 2015 23:21:04 +0100

On Tue, 24 Feb 2015 13:58:16 -0800
Louis Santillan <lpsantil_AT_gmail.com> wrote:

Hey Louis,

> I'm a fan of TAP frameworks [0]. Very minimal, easy to roll you own,
> consumable by many Unix tools, human & machine readable. clibs links
> to a bunch of pre-written libs as well [1]. kazuho had written this
> 35 line example of a lib [2] that exports all you need to basic TAP,
> which is like 75% of all TAP. See an example usage here [3].

you do realize this is written in C++? Come to think of it, what's the
purpose of that? You could use asserts then anyway. And asserts are bad,
same applies to any unit testing in smaller projects.

If you projects grow too large, there might be some reason to have tests,
but as already discussed earlier, if you are careful, things won't out-
grow on a well-designed interface and if you set up tests, they often
end up covering one are but not the other.

Cheers

FRIGN

> [0] http://en.wikipedia.org/wiki/Test_Anything_Protocol
> [1] https://github.com/clibs/clib/wiki/Packages#testingquality-assurance
> [2] https://github.com/kazuho/picogc/blob/master/t/test.h
> [3] https://github.com/lpsantil/picotap/blob/master/t/test.c

-- 
FRIGN <dev_AT_frign.de>
Received on Tue Feb 24 2015 - 23:21:04 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 24 2015 - 23:24:08 CET