Skip to content

Commit

Permalink
latin1 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anarthal committed Dec 31, 2023
1 parent 3bc9d1e commit 4658907
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/unit/test/character_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,4 +448,17 @@ BOOST_AUTO_TEST_CASE(utf8mb4_invalid_continuation)
}
}

BOOST_AUTO_TEST_CASE(latin1)
{
for (std::size_t i = 0; i <= 0xff; ++i)
{
BOOST_TEST_CONTEXT(i)
{
char str[2]{static_cast<char>(i), '\0'};
auto size = latin1_charset.next_char(string_view(str, 2));
BOOST_TEST(size == 1u);
}
}
}

BOOST_AUTO_TEST_SUITE_END()

0 comments on commit 4658907

Please sign in to comment.