summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/CMakeLists.txt1
-rw-r--r--gui/tests/resources.cpp14
2 files changed, 12 insertions, 3 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index c306597..ead9d19 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -151,6 +151,7 @@ install(TARGETS "gui")
add_executable("gui-tests"
"tests/gtk-test.cpp"
"tests/messages.cpp"
+ "tests/resources.cpp"
)
target_link_libraries("gui-tests" PRIVATE
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);
+ }
+ }
}
}