summaryrefslogtreecommitdiff
path: root/lib/tests/turns-turn-order.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-05-23 12:37:01 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-05-23 12:37:01 +0200
commit7572108d6774bd3b501e1dd3fab2a014ed164fcf (patch)
tree532c8948d89db0cd730be45112e8022af41df156 /lib/tests/turns-turn-order.cpp
parentd1d171775f768be1dcdee194be5134f334c63347 (diff)
downloadturns-7572108d6774bd3b501e1dd3fab2a014ed164fcf.tar.xz
turns-7572108d6774bd3b501e1dd3fab2a014ed164fcf.zip
lib: add participant-count property to TurnOrder
Diffstat (limited to 'lib/tests/turns-turn-order.cpp')
-rw-r--r--lib/tests/turns-turn-order.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/tests/turns-turn-order.cpp b/lib/tests/turns-turn-order.cpp
index 0c1afcc..a4576f7 100644
--- a/lib/tests/turns-turn-order.cpp
+++ b/lib/tests/turns-turn-order.cpp
@@ -42,6 +42,11 @@ SCENARIO("Creating a turn order", "[lib][object][lifetime]")
THEN("its 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 == 0uz);
}
THEN("its running state is false")
@@ -100,7 +105,12 @@ SCENARIO("Modifying a turn order", "[lib][object][data]")
THEN("its participant count is 1")
{
- REQUIRE(turns_turn_order_get_participant_count(instance) == 1);
+ REQUIRE(turns_turn_order_get_participant_count(instance) == 1uz);
+
+ auto property_value = decltype(turns_turn_order_get_participant_count(instance)){};
+ g_object_get(instance, "participant-count", &property_value, nullptr);
+
+ REQUIRE(property_value == 1uz);
}
THEN("its running state is false")
@@ -146,6 +156,11 @@ SCENARIO("Modifying a turn order", "[lib][object][data]")
THEN("its participant count is 0")
{
REQUIRE(turns_turn_order_get_participant_count(instance) == 0);
+
+ auto property_value = decltype(turns_turn_order_get_participant_count(instance)){};
+ g_object_get(instance, "participant-count", &property_value, nullptr);
+
+ REQUIRE(property_value == 0uz);
}
THEN("its running state is false")
@@ -203,6 +218,11 @@ SCENARIO("Modifying a turn order", "[lib][object][data]")
THEN("its participant count is 0")
{
REQUIRE(turns_turn_order_get_participant_count(instance) == 0);
+
+ auto property_value = decltype(turns_turn_order_get_participant_count(instance)){};
+ g_object_get(instance, "participant-count", &property_value, nullptr);
+
+ REQUIRE(property_value == 0uz);
}
THEN("the items-changed notification is emitted")
@@ -243,6 +263,11 @@ SCENARIO("Modifying a turn order", "[lib][object][data]")
THEN("its participant count is 0")
{
REQUIRE(turns_turn_order_get_participant_count(instance) == 0);
+
+ auto property_value = decltype(turns_turn_order_get_participant_count(instance)){};
+ g_object_get(instance, "participant-count", &property_value, nullptr);
+
+ REQUIRE(property_value == 0uz);
}
THEN("the items-changed notification is not emitted")