summaryrefslogtreecommitdiff
path: root/core/tests
diff options
context:
space:
mode:
Diffstat (limited to 'core/tests')
-rw-r--r--core/tests/glib_test_init.cpp28
-rw-r--r--core/tests/register_types.cpp13
2 files changed, 28 insertions, 13 deletions
diff --git a/core/tests/glib_test_init.cpp b/core/tests/glib_test_init.cpp
new file mode 100644
index 0000000..b521189
--- /dev/null
+++ b/core/tests/glib_test_init.cpp
@@ -0,0 +1,28 @@
+#include "turns/core/init.hpp"
+
+#include <catch2/reporters/catch_reporter_event_listener.hpp>
+#include <catch2/reporters/catch_reporter_registrars.hpp>
+
+#include <glibmm/init.h>
+
+#include <giomm/init.h>
+
+namespace turns::core::tests
+{
+
+ struct glib_test_init : Catch::EventListenerBase
+ {
+ using Catch::EventListenerBase::EventListenerBase;
+
+ auto testRunStarting(Catch::TestRunInfo const &) -> void override
+ {
+ Gio::init();
+ Glib::init();
+
+ register_types();
+ }
+ };
+
+ CATCH_REGISTER_LISTENER(glib_test_init);
+
+} // namespace turns::core::tests \ No newline at end of file
diff --git a/core/tests/register_types.cpp b/core/tests/register_types.cpp
deleted file mode 100644
index 2ad0628..0000000
--- a/core/tests/register_types.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "turns/core/participant.hpp"
-#include "turns/core/turn_order.hpp"
-
-namespace turns::tests
-{
-
- auto register_types() -> void
- {
- static_cast<void>(core::participant{});
- static_cast<void>(core::turn_order{});
- }
-
-} // namespace turns::tests \ No newline at end of file