#define CATCH_CONFIG_RUNNER
#include "catch.hpp"

// On Windows, disable the "Application error" dialog box, because it
// requires an human intervention, and there is no one on Appveyor.
//
// On UNIX, does nothing
void silent_crash_handlers();

int main(int argc, char* argv[]) {
    silent_crash_handlers();
    return Catch::Session().run(argc, argv);
}

#if (defined(WIN32) || defined(WIN64))
    #include <windows.h>
    void silent_crash_handlers() {
        SetErrorMode(GetErrorMode() | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
    }
#else
    void silent_crash_handlers() {}
#endif

#define CATCH_CONFIG_MAIN
#include <catch.hpp>

/*
 * Catch main file for faster compilation. This file is the only one defining the
 * main function.
 */

--- 
+++ 
@@ -1,7 +1,22 @@
-#define CATCH_CONFIG_MAIN
-#include <catch.hpp>
+#define CATCH_CONFIG_RUNNER
+#include "catch.hpp"
 
-/*
- * Catch main file for faster compilation. This file is the only one defining the
- * main function.
- */
+// On Windows, disable the "Application error" dialog box, because it
+// requires an human intervention, and there is no one on Appveyor.
+//
+// On UNIX, does nothing
+void silent_crash_handlers();
+
+int main(int argc, char* argv[]) {
+    silent_crash_handlers();
+    return Catch::Session().run(argc, argv);
+}
+
+#if (defined(WIN32) || defined(WIN64))
+    #include <windows.h>
+    void silent_crash_handlers() {
+        SetErrorMode(GetErrorMode() | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
+    }
+#else
+    void silent_crash_handlers() {}
+#endif
Disable error dialog on Windows

It make the test hang for nothing
