diff options
Diffstat (limited to 'core/tests/disposition.cpp')
| -rw-r--r-- | core/tests/disposition.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/core/tests/disposition.cpp b/core/tests/disposition.cpp deleted file mode 100644 index fadf476..0000000 --- a/core/tests/disposition.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "turns/core/disposition.hpp" - -#include <catch2/catch_test_macros.hpp> -#include <catch2/generators/catch_generators.hpp> - -#include <glibmm/i18n.h> -#include <glibmm/ustring.h> - -#include <format> -#include <limits> -#include <type_traits> -#include <utility> - -namespace turns::core::tests -{ - - TEST_CASE("to_presentation_name returns the correct string for the current language", "[disposition]") - { - auto [value, name] = GENERATE(std::pair{Disposition::Neutral, Glib::ustring{_("Neutral")}}, - std::pair{Disposition::Friendly, Glib::ustring{_("Friendly")}}, - std::pair{Disposition::Hostile, Glib::ustring{_("Hostile")}}, - std::pair{Disposition::Secret, Glib::ustring{_("Secret")}}, - std::pair{static_cast<Disposition>(std::numeric_limits<std::underlying_type_t<Disposition>>::max()), - Glib::ustring{_("Unknown disposition value")}}); - - SECTION(std::format("the presentation name for '{}' is '{}'", static_cast<std::underlying_type_t<Disposition>>(value), name.c_str())) - { - REQUIRE(presentation_name_for(value) == name); - } - } - -} // namespace turns::core::tests
\ No newline at end of file |
