X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frunner.cpp;h=c89f572a2c0d77af70b511b0bb029c7e084ef795;hb=HEAD;hp=05083126f9807d324226427c88d6d073f4379f4f;hpb=1d09b14f91000e9e62bd2a0e7f0be53f2077e59c;p=libs%2Ftest.git diff --git a/source/runner.cpp b/source/runner.cpp index 0508312..c89f572 100644 --- a/source/runner.cpp +++ b/source/runner.cpp @@ -8,15 +8,15 @@ using namespace std; namespace Msp { namespace Test { -Runner::Runner(int argc, char **argv) +Runner::Runner(int argc, char **argv): + verbose(false), + show_list(false) { GetOpt getopt; getopt.add_option('v', "verbose", verbose, GetOpt::NO_ARG).set_help("Show what is being done"); getopt.add_option('l', "list", show_list, GetOpt::NO_ARG).set_help("Print a list of available test cases"); + getopt.add_argument("testcase", tests, GetOpt::OPTIONAL_ARG).set_help("Test case to run"); getopt(argc, argv); - - const vector &args = getopt.get_args(); - tests.assign(args.begin(), args.end()); } int Runner::main()