1
0
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:
Ted John
2016-12-02 21:49:44 +00:00
parent 433207dc81
commit 7557d9ca07

View File

@@ -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)
{ {