Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit Testing Frameworks for C [duplicate]

Tags:

c

unit-testing

Possible Duplicate:
Unit Testing C Code

I've seen a few questions specific to C++, but I'm really curious about C. I'm trying to add a standard unit test framework into our build environment. My primary goals are to encourage our developers to write unit tests, and to standardize those test so others can run them. Ideally I'd like to run the unit tests as part of our nightly build.

We started some work with CUnit, which worked except that everything ran in one thread and any memory faults caused the unit tests to stop running, which was rather annoying. I also found it incredibly difficult to write the tests, but that might just be unit testing for you.

Does anybody know of good alternatives? Has anybody had any experience with the C++ Unit Testers with C-only code?

like image 361
Chris Arguin Avatar asked Oct 07 '08 04:10

Chris Arguin


1 Answers

I write embedded software using C and I decided to write my own framework. It's very simple and written for MS Visual Studio. It's easily ported to other platforms.

http://code.google.com/p/cunitwin32/

If you're targeting linux I think Check might suite your needs.

like image 156
Dushara Avatar answered Oct 19 '22 12:10

Dushara