RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

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

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in