I am a ruby programmer and I really like to do TDD. Right now, I am programming a little bit in C, but I like my tools and the way I program with ruby. So, I am searching for a framework to do unit tests in C. What do you can tell me about it?
I already found some options, like: cunit, cmockery, CuTest and others. The problem is, I don't know how to evaluate the best one. I am writing a simple compiler for my compilers college course.
Could you help me?
You can use any C or C++ unit testing framework. Its easy enough to call C functions from C++.
My opinion is that you want to have as little output as possible from your tests. ie if everything is OK, it should print '100% passed'
. Otherwise it should only print out details of test failures.
see xprogramming.com (original link broken; here it is on the way back machine), scroll down to the Unit Testing table and look for the C Language
or C++
frameworks. The most 'standard' it seems is cppUnit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With