[tests][c] Provide our own test runner main and setup a dummy error handler.
This commit is contained in:
Родитель
11aba98d4a
Коммит
ee1d6acd74
|
@ -1,4 +1,4 @@
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_RUNNER
|
||||||
#include <catch.hpp>
|
#include <catch.hpp>
|
||||||
|
|
||||||
#include "managed.h"
|
#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*, 1), "2") == 0);
|
||||||
REQUIRE(strcmp(g_array_index(_string.array, gchar*, 2), "3") == 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);
|
||||||
|
}
|
Загрузка…
Ссылка в новой задаче