Permalink
Browse files

Make TestEventListenerBase register all verbosities

This is a temporarily workaround until we can nuke the current
verbosities system from the orbit and replace it with something
actually sane.

Fixes #1426
  • Loading branch information...
horenmar committed Nov 5, 2018
1 parent de6bfb5 commit c51f2edfb1c81d2fd53605c0432820b3a329fe1f
Showing with 8 additions and 2 deletions.
  1. +5 −1 include/reporters/catch_reporter_bases.cpp
  2. +3 −1 include/reporters/catch_reporter_bases.hpp
@@ -30,7 +30,7 @@ namespace Catch {
// + 1 for null terminator
const std::size_t maxDoubleSize = DBL_MAX_10_EXP + 1 + 1 + 3 + 1;
char buffer[maxDoubleSize];
// Save previous errno, to prevent sprintf from overwriting it
ErrnoGuard guard;
#ifdef _MSC_VER
@@ -45,6 +45,10 @@ namespace Catch {
TestEventListenerBase::TestEventListenerBase(ReporterConfig const & _config)
:StreamingReporterBase(_config) {}
std::set<Verbosity> TestEventListenerBase::getSupportedVerbosities() {
return { Verbosity::Quiet, Verbosity::Normal, Verbosity::High };
}
void TestEventListenerBase::assertionStarting(AssertionInfo const &) {}
bool TestEventListenerBase::assertionEnded(AssertionStats const &) {
@@ -217,7 +217,7 @@ namespace Catch {
node->children.push_back(m_rootSection);
m_testCases.push_back(node);
m_rootSection.reset();
assert(m_deepestSection);
m_deepestSection->stdOut = testCaseStats.stdOut;
m_deepestSection->stdErr = testCaseStats.stdErr;
@@ -266,6 +266,8 @@ namespace Catch {
struct TestEventListenerBase : StreamingReporterBase<TestEventListenerBase> {
TestEventListenerBase( ReporterConfig const& _config );
static std::set<Verbosity> getSupportedVerbosities();
void assertionStarting(AssertionInfo const&) override;
bool assertionEnded(AssertionStats const&) override;
};

0 comments on commit c51f2ed

Please sign in to comment.