diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-25 08:53:59 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-25 08:53:59 +0200 |
| commit | 02a030a95b27034eedc151488a014950595510de (patch) | |
| tree | 4a66c7321a32590d370a58f8729db2e0b2b2ddd8 /core/tests | |
| parent | e05d980091724358f689598643b0f17ec671d495 (diff) | |
| download | turns-02a030a95b27034eedc151488a014950595510de.tar.xz turns-02a030a95b27034eedc151488a014950595510de.zip | |
turns: dissolve test_support library
Diffstat (limited to 'core/tests')
| -rw-r--r-- | core/tests/glib_test_init.cpp | 28 | ||||
| -rw-r--r-- | core/tests/register_types.cpp | 13 |
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 |
