Skip to content
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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

RAII #36

wants to merge 10 commits into from

Conversation

haschke-felix
Copy link
Contributor

Based on the existing pull request on RAII, improved the resource alloction using shared ptr
Solved exit() problem with template based Policy

ferkulat and others added 10 commits December 21, 2017 19:44
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);
Copy link
Owner

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.

Copy link
Contributor Author

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
Copy link
Owner

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.

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.

3 participants