From 1eef6c268352b146cee1335ca96c366d2f4ceb03 Mon Sep 17 00:00:00 2001 From: VirtualDeep <75492585+VirtualDeep@users.noreply.github.com> Date: Sat, 7 Sep 2024 15:17:02 +0300 Subject: [PATCH] fix implicit conversion --- test/string_test.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/string_test.cc b/test/string_test.cc index a8426549..5f9cfb05 100644 --- a/test/string_test.cc +++ b/test/string_test.cc @@ -265,16 +265,13 @@ TEST_CASE("u16string erase") { std::u16string ref[] = {U16STR_SHORT, U16STR_SHORT_CORNER_CASE, U16STR_LONG_CORNER_CASE, U16STR_LONG}; - for (auto i = 0; i < 4; ++i) { + for (u16string::msize_t i = 0; i < 4; ++i) { s[i].erase(1, i + 2); ref[i].erase(1, i + 2); - } - - for (auto i = 0; i < 4; ++i) { CHECK(s[i] == ref[i]); } - for (auto i = 0; i < 4; ++i) { + for (u16string::msize_t i = 0; i < 4; ++i) { s[i].erase(0, s[i].size()); CHECK(s[i].empty()); } @@ -390,16 +387,13 @@ TEST_CASE("u32string erase") { std::u32string ref[] = {U32STR_SHORT, U32STR_SHORT_CORNER_CASE, U32STR_LONG_CORNER_CASE, U32STR_LONG}; - for (auto i = 0; i < 4; ++i) { + for (u32string::msize_t i = 0; i < 4; ++i) { s[i].erase(1, i + 1); ref[i].erase(1, i + 1); - } - - for (auto i = 0; i < 4; ++i) { CHECK(s[i] == ref[i]); } - for (auto i = 0; i < 4; ++i) { + for (u32string::msize_t i = 0; i < 4; ++i) { s[i].erase(0, s[i].size()); CHECK(s[i].empty()); }