1 #include <msp/core/getopt.h>
2 #include <msp/io/print.h>
11 Runner::Runner(int argc, char **argv):
16 getopt.add_option('v', "verbose", verbose, GetOpt::NO_ARG).set_help("Show what is being done");
17 getopt.add_option('l', "list", show_list, GetOpt::NO_ARG).set_help("Print a list of available test cases");
18 getopt.add_argument("testcase", tests, GetOpt::OPTIONAL_ARG).set_help("Test case to run");
26 const list<Test::Factory *> &factories = Test::get_factories();
27 for(list<Test::Factory *>::const_iterator i=factories.begin(); i!=factories.end(); ++i)
28 IO::print("%s\n", (*i)->get_name());
30 else if(tests.empty())
31 Test::run_all(verbose);
34 for(list<string>::const_iterator i=tests.begin(); i!=tests.end(); ++i)
35 Test::run_single(*i, verbose);