multi-touch-dev team mailing list archive
-
multi-touch-dev team
-
Mailing list archive
-
Message #00279
Re: Check: C Unit Test Framework
On 08/19/2010 11:37 AM, Duncan McGreggor wrote:
> Hey guys,
>
> After some digging around today, Check seems like one of the best
> options available for C unit testing. I'd be interested in hearing any
> other open source C testing frameworks folks have used.
>
> $ sudo apt-get install check
>
> I've been going through the tutorial here, and am quite pleased so far:
> http://check.sourceforge.net/doc/check_html/check_3.html
>
> However, since I haven't coded in C since 1989 and my only unit test
> experience is in Python, I'd appreciated everyone sharing their thoughts.
>
> After a few days of discussion, we'll choose a framework for C unit
> tests, and use that for a bit to see how it goes, uncover any issues, etc.
>
> Thanks!
>
> d
Stephen just mentioned dejagnu on IRC; the GCC project uses it. My only
concern with it so far is that the language that the test runner is
written is also the language that you write the tests in (Expect). Maybe
that's good? I dunno... I'm just used to writing tests in the same
language as the code that's being tested.
Maybe I'm not quite getting how dejagnu works, though?
I also am looking at CUnit right now, and this is looking nice as well:
http://cunit.sourceforge.net/doc/index.html
CUnit uses a different approach to defining unit test functions than
Check does. More than that, though, it seems to offer a very nice set of
higher level capabilities for tests suites. Similar to what I've used in
Python and seen in Java.
d
Follow ups
References