From fe40c3fc1f371d2da7918365c6dd6ec8a6c40dd4 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 5 Jun 2025 18:33:29 +0200 Subject: lib: rename test initializers --- lib/tests/glib-test.cpp | 26 ++++++++++++++++++++++++ lib/tests/runtime_init.cpp | 26 ------------------------ lib/tests/turnsmm/glibmm-test.cpp | 41 ++++++++++++++++++++++++++++++++++++++ lib/tests/turnsmm/runtime_init.cpp | 41 -------------------------------------- 4 files changed, 67 insertions(+), 67 deletions(-) create mode 100644 lib/tests/glib-test.cpp delete mode 100644 lib/tests/runtime_init.cpp create mode 100644 lib/tests/turnsmm/glibmm-test.cpp delete mode 100644 lib/tests/turnsmm/runtime_init.cpp (limited to 'lib/tests') diff --git a/lib/tests/glib-test.cpp b/lib/tests/glib-test.cpp new file mode 100644 index 0000000..86fb5f9 --- /dev/null +++ b/lib/tests/glib-test.cpp @@ -0,0 +1,26 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#include "turns-init.h" + +#include +#include + +namespace turns::core::tests +{ + + struct glib_test : Catch::EventListenerBase + { + using Catch::EventListenerBase::EventListenerBase; + + auto testRunStarting(Catch::TestRunInfo const &) -> void override + { + turns_init(); + } + }; + + CATCH_REGISTER_LISTENER(glib_test); + +} // namespace turns::core::tests \ No newline at end of file diff --git a/lib/tests/runtime_init.cpp b/lib/tests/runtime_init.cpp deleted file mode 100644 index f896d71..0000000 --- a/lib/tests/runtime_init.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#include "turns-init.h" - -#include -#include - -namespace turns::core::tests -{ - - struct glib_test_init : Catch::EventListenerBase - { - using Catch::EventListenerBase::EventListenerBase; - - auto testRunStarting(Catch::TestRunInfo const &) -> void override - { - turns_init(); - } - }; - - CATCH_REGISTER_LISTENER(glib_test_init); - -} // namespace turns::core::tests \ No newline at end of file diff --git a/lib/tests/turnsmm/glibmm-test.cpp b/lib/tests/turnsmm/glibmm-test.cpp new file mode 100644 index 0000000..1c93cb7 --- /dev/null +++ b/lib/tests/turnsmm/glibmm-test.cpp @@ -0,0 +1,41 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#include "turns-participant.h" +#include "turns-turn-order.h" +#include "turnsmm/init.hpp" +#include "turnsmm/participant.hpp" +#include "turnsmm/turn-order.hpp" + +#include +#include +#include +#include + +#include + +namespace turns::core::tests +{ + + struct glibmm_test : Catch::EventListenerBase + { + using Catch::EventListenerBase::EventListenerBase; + + auto testRunStarting(Catch::TestRunInfo const &) -> void override + { + Glib::init(); + Turns::init(); + + CHECK(Turns::Participant::get_base_type() == turns_participant_get_type()); + CHECK(Glib::Value::value_type() == turns_participant_disposition_get_type()); + + CHECK(Turns::TurnOrder::get_base_type() == turns_turn_order_get_type()); + CHECK(Glib::Value::value_type() == turns_turn_order_sort_mode_get_type()); + } + }; + + CATCH_REGISTER_LISTENER(glibmm_test); + +} // namespace turns::core::tests \ No newline at end of file diff --git a/lib/tests/turnsmm/runtime_init.cpp b/lib/tests/turnsmm/runtime_init.cpp deleted file mode 100644 index ee529b9..0000000 --- a/lib/tests/turnsmm/runtime_init.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#include "turns-participant.h" -#include "turns-turn-order.h" -#include "turnsmm/init.hpp" -#include "turnsmm/participant.hpp" -#include "turnsmm/turn-order.hpp" - -#include -#include -#include -#include - -#include - -namespace turns::core::tests -{ - - struct glib_test_init : Catch::EventListenerBase - { - using Catch::EventListenerBase::EventListenerBase; - - auto testRunStarting(Catch::TestRunInfo const &) -> void override - { - Glib::init(); - Turns::init(); - - CHECK(Turns::Participant::get_base_type() == turns_participant_get_type()); - CHECK(Glib::Value::value_type() == turns_participant_disposition_get_type()); - - CHECK(Turns::TurnOrder::get_base_type() == turns_turn_order_get_type()); - CHECK(Glib::Value::value_type() == turns_turn_order_sort_mode_get_type()); - } - }; - - CATCH_REGISTER_LISTENER(glib_test_init); - -} // namespace turns::core::tests \ No newline at end of file -- cgit v1.2.3