mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-17 21:12:34 +01:00
Abort if assert is hit in tests
This commit is contained in:
@@ -78,8 +78,11 @@ namespace Guard
|
|||||||
char *bufend = (char *)strchr(buffer, 0);
|
char *bufend = (char *)strchr(buffer, 0);
|
||||||
vsnprintf(bufend, sizeof(buffer) - (bufend - buffer), message, args);
|
vsnprintf(bufend, sizeof(buffer) - (bufend - buffer), message, args);
|
||||||
}
|
}
|
||||||
// Only show message box if we are not building for testing
|
#ifdef __TEST__
|
||||||
#ifndef __TEST__
|
// Abort if we are building for testing
|
||||||
|
abort();
|
||||||
|
#else
|
||||||
|
// Show message box if we are not building for testing
|
||||||
int result = MessageBoxA(nullptr, buffer, OPENRCT2_NAME, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION);
|
int result = MessageBoxA(nullptr, buffer, OPENRCT2_NAME, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION);
|
||||||
if (result == IDABORT)
|
if (result == IDABORT)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user