-
Notifications
You must be signed in to change notification settings - Fork 2
(DEAD) A simple, lightweight c++ unit-testing framework based on perl's Test::More.
License
etscrivner/lemon
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
~ lemon ~ lemon is a tiny, fast unit-testing framework designed to be small, really small. That way you can worry less about setting up the framework and more about writing tests. ~ download ~ Download the latest stable version from the lemon Git repository (hosted on GitHub): git clone git://github.com/etscrivner/lemon.git ~ compiling ~ Requires Ruby Make (rake), simply run: rake all This will build the examples as well as the unit-tests for lemon itself. ~ installation ~ Just add lemon.h to your project or place it in a common directory for your compiler (On Linux/Mac/Unix this might be /usr/local/include). ~ a not-so-bitter taste of lemon ~ To start writing tests in lemon: 1) initialize lemon (number of planned tests is optional) lemon::test<> lemon(num_tests_which_you_plan_to_run); 2) conduct tests lemon.is(this_one_equal_to, that_one, descriptive_test_name); 3) display results lemon.done(); ~ assertions ~ lemon provides a minimal but complete set of assertions: * ok(boolean_condition, descriptive_test_name) * not_ok(boolean_condition, descriptive_test_name) * is(this_one, that_one, descriptive_test_name) * isnt(this_one, that_one, descriptive_test_name) * pass(descriptive_test_name) * fail(descriptive_test_name) ~ skipping ~ skipping tests is equally easy: lemon::test<> lemon(...); ... LEMON_SKIP(lemon, "These tests don't work at the moment") { lemon.is(a, b, "a is b"); lemon.ok(foo(), "foo is true"); } ~ todo ~ writing tests before you write code? todo blocks can help: lemon::test<> lemon(...); ... LEMON_TODO(lemon) { lemon.is(tumtum(), fizbaz(), "tumtum is fizbaz"); lemon.not_ok(cannibalism(), "cannibalism is not ok"); }
About
(DEAD) A simple, lightweight c++ unit-testing framework based on perl's Test::More.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published