Add help to testrunner - #1704
Conversation
| std::set<std::string> _options; | ||
| std::string _which_test; | ||
| const bool _quiet; | ||
| const bool _help; |
There was a problem hiding this comment.
If you want to further cleanup this later ... I would like that the variable names are mQuiet, mHelp, etc..
There was a problem hiding this comment.
I'll take a look, for another PR.
| "\n" | ||
| "Syntax:\n" | ||
| " testrunner [OPTIONS] [TestClass::TestCase]\n" | ||
| " testrunner runs all test cases.\n" |
There was a problem hiding this comment.
I do not like that <command> <comment> is written on the same line with no clear separation.
Putting a # before the comment would be one way to solve it. Putting it on separate lines would be another:
run all test cases:
testrunner
There was a problem hiding this comment.
Agreed, the output was not good. I went with your second suggestion (with an added indentation of the commands). I'm not super happy about the output, but I tried adding a # but it looked even worse.
danmar
left a comment
There was a problem hiding this comment.
I would like to see some tweak of the help text
For now, only print the ways of running testrunner and the few options that are available. Also, refactor to remove an unneeded const_cast and use a range for loop. Partially fixes cppcheck-opensource#8514.
e5adbbd to
274ee52
Compare
For now, only print the ways of running testrunner and the few options
that are available.
Also, refactor to remove an unneeded const_cast and use a range for loop.
Partially fixes #8514.