From e524468cc1aefb7bd4fbb485b1306efbe75cb050 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Sat, 11 Dec 2021 23:06:01 +0100 Subject: [PATCH] Disable tests that are broken on windows --- test/cpp-utils/logging/LoggingTest.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/cpp-utils/logging/LoggingTest.cpp b/test/cpp-utils/logging/LoggingTest.cpp index 9dbea1f8..3539561b 100644 --- a/test/cpp-utils/logging/LoggingTest.cpp +++ b/test/cpp-utils/logging/LoggingTest.cpp @@ -9,6 +9,9 @@ using namespace cpputils::logging; using std::string; +// Disable the next tests for MSVC debug builds since writing to stderr doesn't seem to work well there +#if !defined(_MSC_VER) || NDEBUG + TEST_F(LoggingTest, DefaultLoggerIsStderr) { string output = captureStderr([]{ LOG(INFO, "My log message"); @@ -30,6 +33,8 @@ TEST_F(LoggingTest, SetLogger_NewLoggerIsUsed) { EXPECT_TRUE(std::regex_search(output, std::regex(".*\\[MyTestLog2\\].*\\[info\\].*My log message.*"))); } +#endif + TEST_F(LoggingTest, SetNonStderrLogger_LogsToNewLogger) { setLogger(mockLogger.get()); logger()->info("My log message");