Skip to content

Commit

Permalink
Merge pull request #396 from parisiale/maint
Browse files Browse the repository at this point in the history
(maint) Make tests compatible with leatherman 0.4 and 0.5
  • Loading branch information
mruzicka committed Apr 19, 2016
2 parents 4727687 + 7ed6a8d commit 55780f0
Showing 1 changed file with 6 additions and 6 deletions.
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) {
#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);
}

0 comments on commit 55780f0

Please sign in to comment.