blob: f505a3dc61b2d9aea70897ccff0635c85fbd9ecd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/*
* SPDX-FileCopyrightText: 2025 Felix Morgner <felix.morgner@gmail.com>
* SPDX-License-Identifier: LGPL-2.1-only
*/
#include "turnsmm/init.hpp"
#include <catch2/catch_test_macros.hpp>
#include <catch2/internal/catch_test_run_info.hpp>
#include <catch2/reporters/catch_reporter_event_listener.hpp>
#include <catch2/reporters/catch_reporter_registrars.hpp>
#include <glibmm/init.h>
#include <turns-participant.h>
#include <turns-turn-order.h>
#include <turnsmm/participant.hpp>
#include <turnsmm/turn-order.hpp>
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<Turns::Participant::Disposition>::value_type() == turns_participant_disposition_get_type());
CHECK(Turns::TurnOrder::get_base_type() == turns_turn_order_get_type());
CHECK(Glib::Value<Turns::TurnOrder::SortMode>::value_type() == turns_turn_order_sort_mode_get_type());
}
};
CATCH_REGISTER_LISTENER(glib_test_init);
} // namespace turns::core::tests
|