Skip to content

Commit

Permalink
fix implicit conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
freshFruict committed Sep 7, 2024
1 parent f2836e2 commit 1eef6c2
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/string_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit 1eef6c2

Please sign in to comment.