Disable tests that are broken on windows
This commit is contained in:
parent
b01f498a58
commit
875f55ee41
@ -9,6 +9,9 @@
|
|||||||
using namespace cpputils::logging;
|
using namespace cpputils::logging;
|
||||||
using std::string;
|
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) {
|
TEST_F(LoggingTest, DefaultLoggerIsStderr) {
|
||||||
string output = captureStderr([]{
|
string output = captureStderr([]{
|
||||||
LOG(INFO, "My log message");
|
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.*")));
|
EXPECT_TRUE(std::regex_search(output, std::regex(".*\\[MyTestLog2\\].*\\[info\\].*My log message.*")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
TEST_F(LoggingTest, SetNonStderrLogger_LogsToNewLogger) {
|
TEST_F(LoggingTest, SetNonStderrLogger_LogsToNewLogger) {
|
||||||
setLogger(mockLogger.get());
|
setLogger(mockLogger.get());
|
||||||
logger()->info("My log message");
|
logger()->info("My log message");
|
||||||
|
Loading…
Reference in New Issue
Block a user