diff options
Diffstat (limited to 'gui/tests/resources.cpp')
| -rw-r--r-- | gui/tests/resources.cpp | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/gui/tests/resources.cpp b/gui/tests/resources.cpp index ccabf74..c58e217 100644 --- a/gui/tests/resources.cpp +++ b/gui/tests/resources.cpp @@ -3,6 +3,8 @@ * SPDX-License-Identifier: LGPL-2.1-only */ +#include "resources.hpp" + #include <catch2/catch_test_macros.hpp> #include <catch2/generators/catch_generators.hpp> @@ -10,25 +12,31 @@ #include <format> -SCENARIO("Resources are correctly bundled") +namespace Turns::gui::tests { - 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"); - - GIVEN(std::format("The resource path '{}'", file)) + SCENARIO("Resources are correctly bundled") { - WHEN("looking for a global resource at that path") - { - auto exists = Gio::Resource::get_file_exists_global_nothrow(file); - THEN("one exists") + auto file = GENERATE(resource::metainfo_xml, + resource::participant_editor_ui, + resource::participant_row_ui, + resource::preferences_ui, + resource::tracker_ui, + resource::turn_order_view_ui); + + GIVEN(std::format("The resource path '{}'", file)) + { + WHEN("looking for a global resource at that path") { - REQUIRE(exists); + auto exists = Gio::Resource::get_file_exists_global_nothrow(file); + + THEN("one exists") + { + REQUIRE(exists); + } } } } -} + +} // namespace Turns::gui::tests
\ No newline at end of file |
