Archives
-
Implementing a declarative mini-language in the C preprocessor
Last time, I announced Check Plus, a declarative language for defining Check tests in C. This time, I want to talk about the tricks I used to implement a declarative minilanguage using the C preprocessor (and some GCC extensions). The Problem We want to write some toplevel declarations that look like: #define SUITE_NAME example BEGIN_SUITE(“Example [...]
Jul 4th, 2010 | Filed under Software Engineering -
Check Plus: An EDSL for writing unit tests in C
Check is an excellent unit-testing framework for C code, used by a number of relatively well-known projects. It includes features such as running all tests in separate address spaces (using fork(2)), which means that the test suite can properly report segfaults or similar crashes without the test runner crashes. My main complaint about Check is [...]
Jun 26th, 2010 | Filed under Software Engineering