mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Do not assert when testing
This commit is contained in:
@@ -74,6 +74,16 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='DebugTests'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>__TEST__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='ReleaseTests'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;__TEST__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<!-- Debug|Win32 is reserved for RCT2 interop builds, this means it has to be a DLL -->
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'!='Debug|Win32'">
|
||||
|
||||
@@ -78,7 +78,9 @@ namespace Guard
|
||||
char *bufend = (char *)strchr(buffer, 0);
|
||||
vsnprintf(bufend, sizeof(buffer) - (bufend - buffer), message, args);
|
||||
}
|
||||
int result = MessageBox(nullptr, buffer, OPENRCT2_NAME, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION);
|
||||
// Only show message box if we are not building for testing
|
||||
#ifndef __TEST__
|
||||
int result = MessageBoxA(nullptr, buffer, OPENRCT2_NAME, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION);
|
||||
if (result == IDABORT)
|
||||
{
|
||||
#ifdef USE_BREAKPAD
|
||||
@@ -88,6 +90,7 @@ namespace Guard
|
||||
assert(false);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
assert(false);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user