From 84073af773c83826eca7525d35d7cd92a3658f75 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 24 May 2013 15:29:29 +0300 Subject: [PATCH] Use GetOpt's positional arguments --- source/runner.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/runner.cpp b/source/runner.cpp index a2c291e..c89f572 100644 --- a/source/runner.cpp +++ b/source/runner.cpp @@ -15,10 +15,8 @@ Runner::Runner(int argc, char **argv): 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() -- 2.43.0