Skip to content

Commit

Permalink
Flush AND sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
horenmar committed Sep 15, 2024
1 parent e63f3cc commit 4326952
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/SelfTest/UsageTests/Tricky.tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,15 @@ TEST_CASE( "X/level/0/b", "[Tricky][fizz]" ){ SUCCEED(""); }
TEST_CASE( "X/level/1/a", "[Tricky]" ) { SUCCEED(""); }
TEST_CASE( "X/level/1/b", "[Tricky]" ) { SUCCEED(""); }

#include <chrono>
#include <thread>

TEST_CASE( "has printf" ) {

// This can cause problems as, currently, stdout itself is not redirected - only the cout (and cerr) buffer
printf( "loose text artifact\n" );
fflush( stdout );
std::this_thread::sleep_for( std::chrono::seconds( 1 ) );
}

namespace {
Expand Down

0 comments on commit 4326952

Please sign in to comment.