summaryrefslogtreecommitdiff
path: root/gui/tests
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-06-05 17:52:18 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-06-05 17:52:18 +0200
commit94488c636867be69a0ef69d8f95f3e7bf524fe96 (patch)
treead61bb18a1690177f6a6286d2eee9842c6f2a4c7 /gui/tests
parenta4ec0fd60e42b99debeee50a4fe95c79d759f707 (diff)
downloadturns-94488c636867be69a0ef69d8f95f3e7bf524fe96.tar.xz
turns-94488c636867be69a0ef69d8f95f3e7bf524fe96.zip
gui: reintroduce resource tests
Diffstat (limited to 'gui/tests')
-rw-r--r--gui/tests/resources.cpp14
1 files changed, 11 insertions, 3 deletions
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 <format>
-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);
+ }
+ }
}
}