Open aghast opened 6 years ago
…to match Opt::parse(). Add test case parsing single Arg, no Opt.
Opt::parse().
Arg,
Opt.
I tried creating "simple" parser using Arg instead of Opt, based on the tutorial:
Arg
Opt
int jumpto = 0; auto jarg = Arg(jumpto, "jump to"); jarg.parse(Args{"exename", "10"});
This failed, because Arg is not using ParserBase::parse the way Opt does. So I added a test case, and the using statement required to resolve it.
using ParserBase::parse
using
/Users/austin/Code/clara/src/ClaraTests.cpp:83:43: error: too few arguments to function call, expected 2, have 1 p.parse( Args{ "TestApp", "foo" } ); ~~~~~~~ ^ /Users/austin/Code/clara/include/clara.hpp:582:9: note: 'parse' declared here auto parse( std::string const &, TokenStream const &tokens ) const -> Int... ^ 1 error generated.
…to match
Opt::parse().
Add test case parsing singleArg,
noOpt.
I tried creating "simple" parser using
Arg
instead ofOpt
, based on the tutorial:This failed, because
Arg
is notusing ParserBase::parse
the wayOpt
does. So I added a test case, and theusing
statement required to resolve it.