28
Aug
14

Interactive menus for UnitC++

UnitC++ has gone to version 1.1.0. The new feature is the addition of an interactive menu system. You run your tests declared using the TEST macro with the following code.

/=============================================================================
int main(int argc, char** argv)
{
  return UnitCpp::TestRegister::test_register().run_tests_interactive(
    argc,
    argv
  );
}

This will produce a menu which looks something like this;

================================================================================
0) All tests.

================================================================================
1) Maths
  2) "Maths:sqrt_results"
  3) "Maths:is_square"
  4) "Maths:sqrt_precondition"

================================================================================
5) MyString
  6) "MyString:length_test"
  7) "MyString:validity_test"

The numbers which you run the tests with can be input on the command line also, so utest.exe 0 will always run all of the tests.

See more at my sourceforge page


0 Responses to “Interactive menus for UnitC++”



  1. Leave a Comment

What did you think?


Call Me
Endorse davidcorne on Coderwall

Categories

Copyright


© 2013 by David Corne.

Creative Commons License

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.