mirror of
https://github.com/fmtlib/fmt.git
synced 2025-09-10 13:13:57 -04:00
Add test case for introduced function count_code_points_with_display_width_precision
This commit is contained in:
parent
c5736710f9
commit
dd25ea926c
@ -210,6 +210,12 @@ TEST(format_impl_test, compute_width) {
|
|||||||
EXPECT_EQ(fmt::detail::compute_width("вожык"), 5);
|
EXPECT_EQ(fmt::detail::compute_width("вожык"), 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(format_impl_test, count_code_points_with_display_width_precision) {
|
||||||
|
EXPECT_EQ(
|
||||||
|
fmt::detail::count_code_points_with_display_width_precision("🐱🐱🐱", 5),
|
||||||
|
2);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(util_test, utf8_to_utf16) {
|
TEST(util_test, utf8_to_utf16) {
|
||||||
auto u = fmt::detail::utf8_to_utf16("лошадка");
|
auto u = fmt::detail::utf8_to_utf16("лошадка");
|
||||||
EXPECT_EQ(L"\x043B\x043E\x0448\x0430\x0434\x043A\x0430", u.str());
|
EXPECT_EQ(L"\x043B\x043E\x0448\x0430\x0434\x043A\x0430", u.str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user