From 0a6636724355d04f968fc9c617068a4f4c75efc1 Mon Sep 17 00:00:00 2001 From: nillerusr Date: Fri, 19 Aug 2022 23:21:37 +0300 Subject: [PATCH] tslist: add asserts for tests --- tier0/tslist.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tier0/tslist.cpp b/tier0/tslist.cpp index 7bafd671..c5d81652 100644 --- a/tier0/tslist.cpp +++ b/tier0/tslist.cpp @@ -11,6 +11,7 @@ #if defined( _X360 ) #include "xbox/xbox_win32stubs.h" #endif +#include "unitlib/unitlib.h" namespace TSListTests { @@ -129,7 +130,7 @@ void ValidateBuckets() if ( g_pTestBuckets[i] != 0 ) { Msg( "Test bucket %d has an invalid value %d\n", i, g_pTestBuckets[i] ); - DebuggerBreakIfDebugging(); + Shipping_Assert( 0 ); return; } } @@ -151,7 +152,7 @@ uintp PopThreadFunc( void *) { if ( g_nPushThreads == 0 ) { - // Pop the rest + // Pop the rest while ( g_pTestOps->Pop( &ignored ) ) { ThreadSleep( 0 ); @@ -216,6 +217,7 @@ void TestEnd( bool bExpectEmpty = true ) if ( g_nPops != g_nPushes ) { Msg( "FAIL: Not all items popped\n" ); + Shipping_Assert( 0 ); return; } @@ -228,11 +230,13 @@ void TestEnd( bool bExpectEmpty = true ) else { Msg("FAIL: !IsEmpty()\n"); + Shipping_Assert( 0 ); } } else { Msg("FAIL: !Validate()\n"); + Shipping_Assert( 0 ); } while ( g_ThreadHandles.size() ) {