-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RAII #36
base: master
Are you sure you want to change the base?
RAII #36
Conversation
valgrind shows memory as still reachable
in this test value is expected to be false, but should this return true?
now manual resource management anymore
this helped me figuring out that Catch itself includes <memory> and the tests compiled without including memory in CmdParser.hpp to compile this, type make sample now cmdparser.hpp is the first include in tests
const auto value = parser.run(output, errors); | ||
const std::string prefix = "Available parameters:"; | ||
|
||
REQUIRE(parser.has_help() == true); | ||
REQUIRE(parser.app_name() == "myapp"); | ||
REQUIRE(value == false); | ||
REQUIRE(output.str().substr(0, prefix.size()) == prefix); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry cannot accept PRs that break / change existing tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that testcase never been reached beforehand anyway as exit() is called?
#include <functional> | ||
|
||
namespace cli { | ||
/// Class used to wrap integer types to specify desired numerical base for specific argument parsing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too large / too much of a change. Sorry, won't be acceptable.
Based on the existing pull request on RAII, improved the resource alloction using shared ptr
Solved exit() problem with template based Policy