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

(maint) Make tests compatible with leatherman 0.4 and 0.5 #396

Merged
merged 1 commit into from
Apr 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/tests/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@
#include <leatherman/logging/logging.hpp>
#endif

int main(int argc, const char** argv) {
int main(int argc, char** argv) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Different signature in Catch 1.4.0.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

#ifdef ENABLE_LOGGING
leatherman::logging::setup_logging(boost::nowide::cout);
leatherman::logging::set_level(leatherman::logging::log_level::debug);
#endif

// Create the Catch session, pass CL args, and start it
Catch::Session test_session {};
test_session.applyCommandLine(argc, argv);

// NOTE(ale): to list the reporters use:
// test_session.configData().listReporters = true;

// Reporters: "xml", "junit", "console", and "compact" (single line)
test_session.configData().reporterNames =
std::vector<std::string> { "console" };
// NOTE(ale): out of the box, Reporters are "xml", "junit", "console",
// and "compact" (single line); "console" is the default
// test_session.configData().reporterNames =
// std::vector<std::string> { "xml" };

// ShowDurations::Always, ::Never, ::DefaultForReporter
test_session.configData().showDurations = Catch::ShowDurations::Always;

// NOTE(ale): enforcing ConfigData::useColour == UseColour::No
// on Windows is not necessary; the default ::Auto works fine

return test_session.run();
return test_session.run(argc, argv);
}