diff --git a/tests/common/Tests.C.cpp b/tests/common/Tests.C.cpp index be6533a..b97cd90 100644 --- a/tests/common/Tests.C.cpp +++ b/tests/common/Tests.C.cpp @@ -1,4 +1,4 @@ -#define CATCH_CONFIG_MAIN +#define CATCH_CONFIG_RUNNER #include #include "managed.h" @@ -181,3 +181,12 @@ TEST_CASE("Arrays.C", "[C][Arrays]") { REQUIRE(strcmp(g_array_index(_string.array, gchar*, 1), "2") == 0); REQUIRE(strcmp(g_array_index(_string.array, gchar*, 2), "3") == 0); } + +int main( int argc, char* argv[] ) +{ + // Setup a null error handler so we can test exceptions. + mono_embeddinator_install_error_report_hook(0); + + int result = Catch::Session().run(argc, argv); + return (result < 0xff ? result : 0xff); +} \ No newline at end of file