mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-04 17:26:42 +00:00
Fix a warning
This commit is contained in:
parent
c1e97392be
commit
2bb8120d98
@ -486,11 +486,11 @@ TEST(PrepareTest, PassCompileString) {
|
|||||||
TEST(PrepareTest, FormatToArrayOfChars) {
|
TEST(PrepareTest, FormatToArrayOfChars) {
|
||||||
char buffer[32] = {0};
|
char buffer[32] = {0};
|
||||||
const auto prepared = fmt::compile<int>("4{}");
|
const auto prepared = fmt::compile<int>("4{}");
|
||||||
fmt::format_to(buffer, prepared, 2);
|
fmt::format_to(fmt::internal::make_checked(buffer, 32), prepared, 2);
|
||||||
EXPECT_EQ(std::string("42"), buffer);
|
EXPECT_EQ(std::string("42"), buffer);
|
||||||
wchar_t wbuffer[32] = {0};
|
wchar_t wbuffer[32] = {0};
|
||||||
const auto wprepared = fmt::compile<int>(L"4{}");
|
const auto wprepared = fmt::compile<int>(L"4{}");
|
||||||
fmt::format_to(wbuffer, wprepared, 2);
|
fmt::format_to(fmt::internal::make_checked(wbuffer, 32), wprepared, 2);
|
||||||
EXPECT_EQ(std::wstring(L"42"), wbuffer);
|
EXPECT_EQ(std::wstring(L"42"), wbuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user