quick_unit: A Ruby inspired C++ Unit testing framework
Working with Ruby makes it difficult for me to go back to the verbosity of C++. The amount of ceremony gets me down. At least with quick_unit, I can now write C++ unit tests that are clean and read nicely.
<pre>#include "quick_unit.hpp"
DECLARE_SUITE(My First Tests)
TEST(the compiler can add) { assert(3 == 1 + 2, SHOULD(add numbers)); }
TEST(the compiler can subtract) { assert_equal(1 , 2 - 1, SHOULD(subtract numbers)); }
int main(int argc, char *argv[]) { return RUN_TESTS(); }</pre></code>
Post a comment