From 94488c636867be69a0ef69d8f95f3e7bf524fe96 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 5 Jun 2025 17:52:18 +0200 Subject: gui: reintroduce resource tests --- gui/tests/resources.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'gui/tests/resources.cpp') diff --git a/gui/tests/resources.cpp b/gui/tests/resources.cpp index 97a1a6b..ccabf74 100644 --- a/gui/tests/resources.cpp +++ b/gui/tests/resources.cpp @@ -10,7 +10,7 @@ #include -TEST_CASE("UI resources") +SCENARIO("Resources are correctly bundled") { auto file = GENERATE("/ch/arknet/Turns/participant_editor.ui", @@ -19,8 +19,16 @@ TEST_CASE("UI resources") "/ch/arknet/Turns/tracker.ui", "/ch/arknet/Turns/turn_order_view.ui"); - SECTION(std::format("contains {}", file)) + GIVEN(std::format("The resource path '{}'", file)) { - REQUIRE(Gio::Resource::get_file_exists_global_nothrow(file)); + WHEN("looking for a global resource at that path") + { + auto exists = Gio::Resource::get_file_exists_global_nothrow(file); + + THEN("one exists") + { + REQUIRE(exists); + } + } } } -- cgit v1.2.3