1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-02 03:35:09 +01:00

Merge pull request #4835 from janisozaur/tests

Add tests
This commit is contained in:
Michał Janiszewski
2016-12-04 18:55:02 +01:00
committed by GitHub
16 changed files with 954 additions and 206 deletions

View File

@@ -78,7 +78,12 @@ 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);
#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)
{
#ifdef USE_BREAKPAD
@@ -88,6 +93,7 @@ namespace Guard
assert(false);
#endif
}
#endif
#else
assert(false);
#endif

View File

@@ -52,7 +52,7 @@ utf8 **windows_get_command_line_args(int *outNumArgs);
static HMODULE _dllModule = NULL;
#ifdef NO_RCT2
#if defined(NO_RCT2) && !defined(__NOENTRYPOINT__)
/**
* Windows entry point to OpenRCT2 without a console window.