summaryrefslogtreecommitdiff
path: root/ui/tests
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-30 10:41:28 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-30 10:41:28 +0200
commitf729c62bf23061e33a362ef1322d8fed8ae632b1 (patch)
tree5c50692d18aba56a6b51b1f9d980238ac70354ac /ui/tests
parentfb929e16e90050b3ac852e4be14444c3a1d000b6 (diff)
downloadturns-f729c62bf23061e33a362ef1322d8fed8ae632b1.tar.xz
turns-f729c62bf23061e33a362ef1322d8fed8ae632b1.zip
ui: fix resource tests
Diffstat (limited to 'ui/tests')
-rw-r--r--ui/tests/resources.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/ui/tests/resources.cpp b/ui/tests/resources.cpp
index 07c026a..a091266 100644
--- a/ui/tests/resources.cpp
+++ b/ui/tests/resources.cpp
@@ -1,14 +1,21 @@
#include <catch2/catch_test_macros.hpp>
+#include <catch2/generators/catch_generators.hpp>
-#include <gtkmm/builder.h>
-#include <gtkmm/widget.h>
+#include <giomm/resource.h>
-TEST_CASE("GResource for tracker")
+#include <format>
+
+TEST_CASE("UI resources")
{
- auto builder = Gtk::Builder::create_from_resource("/ch/arknet/Turns/tracker.ui");
- SECTION("can create Gtk.Builder for the tracker window UI definition")
+ auto file = GENERATE("/ch/arknet/Turns/participant_editor.ui",
+ "/ch/arknet/Turns/participant_row.ui",
+ "/ch/arknet/Turns/preferences.ui",
+ "/ch/arknet/Turns/tracker.ui",
+ "/ch/arknet/Turns/turn_order_view.ui");
+
+ SECTION(std::format("contains {}", file))
{
- REQUIRE(builder);
+ REQUIRE(Gio::Resource::get_file_exists_global_nothrow(file));
}
}