Skip to content

Commit

Permalink
Fix test for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Oct 18, 2024
1 parent 7a975e0 commit bbb0bca
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions test/test_iostream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,13 @@ void test_cerr()

void test_clog()
{
if(usesNowideRdBufOut)
{
TEST(nw::clog.rdbuf() != std::clog.rdbuf());
TEST(nw::clog.rdbuf() != std::cout.rdbuf());
TEST(nw::clog.rdbuf() != nw::cin.rdbuf());
TEST(nw::clog.rdbuf() != nw::cout.rdbuf());
TEST(nw::clog.rdbuf() != nw::cerr.rdbuf());
}
if(usesNowideRdBufOut) // Only executed when attached to a real terminal, i.e. not on CI
TEST(nw::clog.rdbuf() != std::clog.rdbuf()); // LCOV_EXCL_STOP

TEST(nw::clog.rdbuf() != std::cout.rdbuf());
TEST(nw::clog.rdbuf() != nw::cin.rdbuf());
TEST(nw::clog.rdbuf() != nw::cout.rdbuf());
TEST(nw::clog.rdbuf() != nw::cerr.rdbuf());
}

void test_cerr_single_char()
Expand Down Expand Up @@ -549,7 +548,6 @@ void test_console()
// coverity[root_function]
void test_main(int argc, char** argv, char**)
{
// LCOV_EXCL_START
if(usesNowideRdBufIn)
nw::cout << "Using Nowide input buffer\n";
else
Expand All @@ -558,7 +556,6 @@ void test_main(int argc, char** argv, char**)
nw::cout << "Using Nowide output buffer\n"; // LCOV_EXCL_LINE
else
nw::cout << "NOT using Nowide output buffer\n";
// LCOV_EXCL_STOP

const std::string arg = (argc == 1) ? "" : argv[1];
if(arg == "passthrough") // Read string from cin and write to cout
Expand Down

0 comments on commit bbb0bca

Please sign in to comment.