Disable tests that are broken on windows

This commit is contained in:
Sebastian Messmer 2021-12-11 23:06:01 +01:00
parent 67bd0ed295
commit e524468cc1
1 changed files with 5 additions and 0 deletions

View File

@ -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");