tests: suppress colors when running tests

This commit is contained in:
Eric Wasylishen 2022-09-22 00:11:37 -06:00
parent 99ddaf4926
commit 4369cd6313
1 changed files with 15 additions and 0 deletions

View File

@ -4,6 +4,21 @@
#include <type_traits>
#include <catch2/reporters/catch_reporter_event_listener.hpp>
#include <catch2/reporters/catch_reporter_registrars.hpp>
class TestRunListener : public Catch::EventListenerBase {
public:
using Catch::EventListenerBase::EventListenerBase;
void testRunStarting(Catch::TestRunInfo const&) override {
// writing console colors within test case output breaks Catch2/CLion integration
logging::enable_color_codes = false;
}
};
CATCH_REGISTER_LISTENER(TestRunListener)
// test booleans
TEST_CASE("booleanFlagImplicit", "[settings]")
{