diff options
Diffstat (limited to 'test/common/StringUtilTest.cpp')
-rw-r--r-- | test/common/StringUtilTest.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/common/StringUtilTest.cpp b/test/common/StringUtilTest.cpp index 2dd980f9..613243c5 100644 --- a/test/common/StringUtilTest.cpp +++ b/test/common/StringUtilTest.cpp @@ -3,12 +3,13 @@ #include <catch2/catch_test_macros.hpp> +using cru::Index; using cru::k_invalid_code_point; TEST_CASE("StringUtil Utf8NextCodePoint", "[string]") { using cru::Utf8NextCodePoint; std::string_view text = "aπ你🤣!"; - gsl::index current = 0; + Index current = 0; REQUIRE(Utf8NextCodePoint(text.data(), text.size(), current, ¤t) == 0x0061); REQUIRE(Utf8NextCodePoint(text.data(), text.size(), current, ¤t) == @@ -21,13 +22,13 @@ TEST_CASE("StringUtil Utf8NextCodePoint", "[string]") { 0x0021); REQUIRE(Utf8NextCodePoint(text.data(), text.size(), current, ¤t) == k_invalid_code_point); - REQUIRE(current == static_cast<gsl::index>(text.size())); + REQUIRE(current == static_cast<Index>(text.size())); } TEST_CASE("StringUtil Utf16NextCodePoint", "[string]") { using cru::Utf16NextCodePoint; std::u16string_view text = u"aπ你🤣!"; - gsl::index current = 0; + Index current = 0; REQUIRE(Utf16NextCodePoint(text.data(), text.size(), current, ¤t) == 0x0061); REQUIRE(Utf16NextCodePoint(text.data(), text.size(), current, ¤t) == @@ -40,13 +41,13 @@ TEST_CASE("StringUtil Utf16NextCodePoint", "[string]") { 0x0021); REQUIRE(Utf16NextCodePoint(text.data(), text.size(), current, ¤t) == k_invalid_code_point); - REQUIRE(current == static_cast<gsl::index>(text.size())); + REQUIRE(current == static_cast<Index>(text.size())); } TEST_CASE("StringUtil Utf16PreviousCodePoint", "[string]") { using cru::Utf16PreviousCodePoint; std::u16string_view text = u"aπ你🤣!"; - gsl::index current = text.size(); + Index current = text.size(); REQUIRE(Utf16PreviousCodePoint(text.data(), text.size(), current, ¤t) == 0x0021); REQUIRE(Utf16PreviousCodePoint(text.data(), text.size(), current, ¤t) == |