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
1 changed files with 5 additions and 2 deletions

View File

@ -78,8 +78,11 @@ namespace Guard
char *bufend = (char *)strchr(buffer, 0);
vsnprintf(bufend, sizeof(buffer) - (bufend - buffer), message, args);
}
// Only show message box if we are not building for testing
#ifndef __TEST__
#ifdef __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);
if (result == IDABORT)
{