Skip to content

Commit 092ec40

Browse files
committed
Don't use assert() in tests
It pops a dialog on windows and hangs
1 parent 44d5625 commit 092ec40

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/test_common.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ static void DebugOutput( ESteamNetworkingSocketsDebugOutputType eType, const cha
5353
if ( strstr( pszMsg, "SteamNetworkingGlobalLock held for" ) )
5454
return;
5555

56-
assert( !"TEST FAILED" );
56+
fprintf( stderr, "\n\n"
57+
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
58+
"!! TEST FAILED !!\n"
59+
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
60+
"\n", pszMsg );
61+
fflush( stderr );
62+
abort();
5763
}
5864
}
5965

0 commit comments

Comments
 (0)