Skip to content

Add help to testrunner - #1704

Merged
danmar merged 1 commit into
cppcheck-opensource:masterfrom
rikardfalkeborn:add-help-to-testrunner
Mar 2, 2019
Merged

Add help to testrunner#1704
danmar merged 1 commit into
cppcheck-opensource:masterfrom
rikardfalkeborn:add-help-to-testrunner

Conversation

@rikardfalkeborn

Copy link
Copy Markdown
Contributor

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.

Comment thread test/options.h
std::set<std::string> _options;
std::string _which_test;
const bool _quiet;
const bool _help;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to further cleanup this later ... I would like that the variable names are mQuiet, mHelp, etc..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a look, for another PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1720.

Comment thread test/testsuite.cpp Outdated
"\n"
"Syntax:\n"
" testrunner [OPTIONS] [TestClass::TestCase]\n"
" testrunner runs all test cases.\n"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@rikardfalkeborn rikardfalkeborn Mar 1, 2019

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 danmar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@rikardfalkeborn
rikardfalkeborn force-pushed the add-help-to-testrunner branch from e5adbbd to 274ee52 Compare March 1, 2019 19:36
@danmar
danmar merged commit 40ead7f into cppcheck-opensource:master Mar 2, 2019
@rikardfalkeborn
rikardfalkeborn deleted the add-help-to-testrunner branch March 2, 2019 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants