blob: f204847a09aff1cd0fef26e2a81b8661bd95f56f (
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
|
#include "turns-turn-order.h"
#include <catch2/catch_test_macros.hpp>
#include <glib-object.h>
SCENARIO("Creating a turn order", "[lib][object][lifetime]")
{
GIVEN("A turn order constructed using turns_turn_order_new()")
{
g_autoptr(TurnsTurnOrder) instance = turns_turn_order_new();
THEN("it's participant count is 0")
{
REQUIRE(turns_turn_order_get_participant_count(instance) == 0uz);
auto property_value = decltype(turns_turn_order_get_participant_count(instance)){};
g_object_get(instance, "participant-count", &property_value, nullptr);
REQUIRE(property_value == 0);
}
THEN("it's running state is false")
{
REQUIRE_FALSE(turns_turn_order_get_running(instance));
auto property_value = decltype(turns_turn_order_get_participant_count(instance)){};
g_object_get(instance, "running", &property_value, nullptr);
REQUIRE_FALSE(property_value);
}
}
}
|