Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Flush AND sleep

Commit
432695291a0722e9b00c0a76ef2f27b61144506a
Author
Martin Hořeňovský ·
Parents
e63f3cc817ef

Files · Download .tar.gz

Changes

 tests/SelfTest/UsageTests/Tricky.tests.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/SelfTest/UsageTests/Tricky.tests.cpp b/tests/SelfTest/UsageTests/Tricky.tests.cpp
index 041d7867..edb41f81 100644
--- a/tests/SelfTest/UsageTests/Tricky.tests.cpp
+++ b/tests/SelfTest/UsageTests/Tricky.tests.cpp
@@ -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 {