tests: suppress colors when running tests
This commit is contained in:
parent
99ddaf4926
commit
4369cd6313
|
|
@ -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]")
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue