diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-05-13 18:12:56 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-05-13 18:12:56 +0200 |
| commit | 135ce06aa89742459473829966480bbc94d4b5c6 (patch) | |
| tree | fe3e4142d8b68a7eda7227f574765b32660901e8 /lib/tests/turns-turn-order.cpp | |
| parent | 9513f7303ffde9fbda869e346523a23197f4ece9 (diff) | |
| download | turns-135ce06aa89742459473829966480bbc94d4b5c6.tar.xz turns-135ce06aa89742459473829966480bbc94d4b5c6.zip | |
lib: add participant-count property
Diffstat (limited to 'lib/tests/turns-turn-order.cpp')
| -rw-r--r-- | lib/tests/turns-turn-order.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/tests/turns-turn-order.cpp b/lib/tests/turns-turn-order.cpp index feb0aa1..f204847 100644 --- a/lib/tests/turns-turn-order.cpp +++ b/lib/tests/turns-turn-order.cpp @@ -2,15 +2,32 @@ #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); } } }
\ No newline at end of file |
