Commit 4226b64c authored by Victor Zverovich's avatar Victor Zverovich

Disable message boxes on assertion failures.

parent d53f2096
...@@ -751,3 +751,15 @@ TEST(ActiveFormatterTest, Example) { ...@@ -751,3 +751,15 @@ TEST(ActiveFormatterTest, Example) {
std::string path = "somefile"; std::string path = "somefile";
ReportError("File not found: {0}") << path; ReportError("File not found: {0}") << path;
} }
int main(int argc, char **argv) {
#ifdef _WIN32
// Disable message boxes on assertion failures.
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
#endif
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment