Skip to content

Commit

Permalink
Remove MSVC specific code as it is no longer needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoconni committed Aug 24, 2024
1 parent 41c01af commit e0f465c
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions tests/unit_tests/FGLogTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,7 @@ void testRedFormat() {
log << JSBSim::LogFormat::RESET;
}
std::cout.rdbuf(cout_buffer);
#ifdef _MSC_VER
TS_ASSERT_EQUALS(buffer.str(), "Hello, World!");
#else
TS_ASSERT_EQUALS(buffer.str(), "\033[31mHello, World!\033[0m");
#endif
}

void testCyanFormat() {
Expand All @@ -337,11 +333,7 @@ void testCyanFormat() {
log << JSBSim::LogFormat::RESET;
}
std::cout.rdbuf(cout_buffer);
#ifdef _MSC_VER
TS_ASSERT_EQUALS(buffer.str(), "Hello, World!");
#else
TS_ASSERT_EQUALS(buffer.str(), "\033[34mHello, World!\033[0m");
#endif
}

void testBoldFormat() {
Expand All @@ -356,11 +348,7 @@ void testBoldFormat() {
log << JSBSim::LogFormat::RESET;
}
std::cout.rdbuf(cout_buffer);
#ifdef _MSC_VER
TS_ASSERT_EQUALS(buffer.str(), "Hello, World!");
#else
TS_ASSERT_EQUALS(buffer.str(), "\033[1mHello, World!\033[0m");
#endif
}

void testNormalFormat() {
Expand All @@ -375,11 +363,7 @@ void testNormalFormat() {
log << JSBSim::LogFormat::RESET;
}
std::cout.rdbuf(cout_buffer);
#ifdef _MSC_VER
TS_ASSERT_EQUALS(buffer.str(), "Hello, World!");
#else
TS_ASSERT_EQUALS(buffer.str(), "\033[22mHello, World!\033[0m");
#endif
}

void testUnderlineFormat() {
Expand All @@ -394,11 +378,7 @@ void testUnderlineFormat() {
log << JSBSim::LogFormat::UNDERLINE_OFF;
}
std::cout.rdbuf(cout_buffer);
#ifdef _MSC_VER
TS_ASSERT_EQUALS(buffer.str(), "Hello, World!");
#else
TS_ASSERT_EQUALS(buffer.str(), "\033[4mHello, World!\033[24m");
#endif
}

void testDefaultFormat() {
Expand All @@ -413,10 +393,6 @@ void testDefaultFormat() {
log << JSBSim::LogFormat::RESET;
}
std::cout.rdbuf(cout_buffer);
#ifdef _MSC_VER
TS_ASSERT_EQUALS(buffer.str(), "Hello, World!");
#else
TS_ASSERT_EQUALS(buffer.str(), "\033[39mHello, World!\033[0m");
#endif
}
};

0 comments on commit e0f465c

Please sign in to comment.