summaryrefslogtreecommitdiff
path: root/lang/tests
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-07-12 17:05:27 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-07-12 17:05:27 +0200
commit08bbb9cb615f0ecd0d041baacd7a024c1e30db5c (patch)
treeb85c4c8517829bd9900d33a4013a663315bb56a1 /lang/tests
parent8714470ebb41abec07e178abf4d4739dcd6087fb (diff)
downloadturns-08bbb9cb615f0ecd0d041baacd7a024c1e30db5c.tar.xz
turns-08bbb9cb615f0ecd0d041baacd7a024c1e30db5c.zip
app: add main menu button tooltip
Diffstat (limited to 'lang/tests')
-rw-r--r--lang/tests/tooltips.cpp41
1 files changed, 22 insertions, 19 deletions
diff --git a/lang/tests/tooltips.cpp b/lang/tests/tooltips.cpp
index 66b6d72..63831c5 100644
--- a/lang/tests/tooltips.cpp
+++ b/lang/tests/tooltips.cpp
@@ -3,31 +3,34 @@
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
-#include <libintl.h>
-
#include <format>
#include <string>
-namespace turns::lang::tests
-{
+#include <libintl.h>
-TEST_CASE("Tooltip translations")
+namespace turns::lang::tests
{
- auto message = GENERATE(
- tooltips::add_a_participant
- );
-
- auto locale = GENERATE(
- "de_CH.UTF-8",
- "de_DE.UTF-8",
- "de_AT.UTF-8"
- );
- SECTION(std::format("'{}' has a translation in '{}'", message, locale))
+ TEST_CASE("Tooltip translations")
{
- setlocale(LC_ALL, locale);
- REQUIRE(std::string{gettext(message)} != message);
+ // clang-format off
+ auto message = GENERATE(
+ tooltips::add_a_participant,
+ tooltips::main_menu
+ );
+
+ auto locale = GENERATE(
+ "de_CH.UTF-8",
+ "de_DE.UTF-8",
+ "de_AT.UTF-8"
+ );
+ // clang-format on
+
+ SECTION(std::format("'{}' has a translation in '{}'", message, locale))
+ {
+ setlocale(LC_ALL, locale);
+ REQUIRE(std::string{gettext(message)} != message);
+ }
}
-}
-} \ No newline at end of file
+} // namespace turns::lang::tests \ No newline at end of file