Do not assert when testing

This commit is contained in:
Ted John committed 2016-12-02 17:18:45 +00:00
1 parent 756e26ad45
commit 433207dc81
2 files changed
+14 -1

No files matched your search

+4 -1
View File
@@ -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