Deprecate fmt::char8_t

This commit is contained in:
Victor Zverovich
2020-03-14 10:32:34 -07:00
parent 6f01b6ebb6
commit 678341275b
4 changed files with 40 additions and 42 deletions

View File

@@ -10,12 +10,11 @@
#include "test-assert.h"
// Include format.cc instead of format.h to test implementation.
#include "../src/format.cc"
#include "fmt/printf.h"
#include <algorithm>
#include <cstring>
#include "../src/format.cc"
#include "fmt/printf.h"
#include "gmock.h"
#include "gtest-extra.h"
#include "util.h"
@@ -430,8 +429,10 @@ TEST(FormatTest, CountCodePoints) {
#ifndef __cpp_char8_t
using fmt::char8_t;
#endif
EXPECT_EQ(4, fmt::internal::count_code_points(
fmt::basic_string_view<char8_t>(reinterpret_cast<const char8_t*>("ёжик"))));
EXPECT_EQ(
4, fmt::internal::count_code_points(
fmt::basic_string_view<fmt::internal::char8_type>(
reinterpret_cast<const fmt::internal::char8_type*>("ёжик"))));
}
// Tests fmt::internal::count_digits for integer type Int.