3

I'm writing some code (some of which uses W3C's libwww) in C. It's been a while since I've touched ANSI C. Back in the day we rolled our own test framework. Does anybody here have any test frameworks that they recommend for C programming?

Googling around I was inclined to go with Check. It has a page on other unit testing frameworks in C, a few of which I've taken a quick look at. GNU AutoUnit seemed like it might be a good choice since I'm using the GNU build tools (autoconf, automake) but it doesn't look that alive...

Another option would be to use a C++ framework and just write my tests in C++

Anyway, any experienced opinions would be appreciated. Thanks.

Hissohathair
  • 759
  • 1
  • 6
  • 17
  • 1
    Possible duplicate of http://stackoverflow.com/questions/65820/unit-testing-c-code, http://stackoverflow.com/questions/177251/unit-testing-frameworks-for-c, http://stackoverflow.com/questions/2745775/unit-testing-framework-for-c, ... – Péter Török Jun 02 '10 at 11:20
  • Thanks Péter -- I was relying on SO's list of possible duplicates when writing the question and none of those came up. I should have looked harder. Incidentally seems most answers favoured Check. – Hissohathair Jun 03 '10 at 03:01

1 Answers1

2

You might want to take a look at . cppUTest

It is unit test harness framework for C and C++. Here is a blog with some instructions on using cpputest for embedded TDD and C.

CppUtest is fairly light-weight and allows for customization...

ratkok
  • 772
  • 9
  • 15