Re: [dev] unit testing

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Thu, 31 Jul 2014 12:05:30 +0100

On Thu, Jul 31, 2014 at 10:57:23AM +0200, Markus Teich wrote:
> Heyho,
>
> I just stumbled upon MinUnit[0], a 3-line unit test framework for C. Do you know
> other similarly simple solutions?

For anything non-trivial I generally test it separately, I simply copy
the function into another .c and use main() as my tester.

This is especially useful if you are doing kernel development or other forms
of development where it is a bit PITA to go through a testing cycle
(kernel panic etc.).

Sometimes it is not easy to abstract the code but in most cases it is doable.
Received on Thu Jul 31 2014 - 13:05:30 CEST

This archive was generated by hypermail 2.3.0 : Thu Jul 31 2014 - 13:12:12 CEST