add Char8T test into CompileTest under __cpp_char8_t define check

to check fmt::format() with FMT_COMPILE() and char8_t type
This commit is contained in:
Alexey Ochapov 2020-09-15 22:42:38 +03:00
parent ebdd0c24e4
commit 218bfcbd9c
No known key found for this signature in database
GPG Key ID: 9DC52E8F031B8DA8

View File

@ -177,4 +177,11 @@ TEST(CompileTest, TextAndArg) {
EXPECT_EQ(">>>42<<<", fmt::format(FMT_COMPILE(">>>{}<<<"), 42));
EXPECT_EQ("42!", fmt::format(FMT_COMPILE("{}!"), 42));
}
# ifdef __cpp_char8_t
TEST(CompileTest, Char8T) {
EXPECT_EQ(u8"42", fmt::format(FMT_COMPILE(u8"{}"), 42));
EXPECT_EQ(u8">>>42<<<", fmt::format(FMT_COMPILE(u8">>>{}<<<"), u8"42"));
}
# endif
#endif