Skip to content

Commit

Permalink
Do not display message box on assertion failures on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Sep 12, 2024
1 parent 4910ab8 commit 9dd0813
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/src/unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ int store_g_vfs(std::string&& vfs, std::vector<std::string> vfs_fs);
} // namespace tiledb

int main(const int argc, char** const argv) {
#if defined(_MSC_VER)
// We disable the following events on abort:
// _WRITE_ABORT_MSG: Display message box with Abort, Retry, Ignore
// _CALL_REPORTFAULT: Send an error report to Microsoft
// The second parameter specifies which flags to change, and the first
// the value of these flags.
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
#endif
Catch::Session session;

// Define acceptable VFS values.
Expand Down

0 comments on commit 9dd0813

Please sign in to comment.