mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 06:21:00 +00:00
Fix handling of wide alignment
This commit is contained in:
parent
f80ed64dd9
commit
5b5a597198
@ -2501,7 +2501,7 @@ FMT_CONSTEXPR const Char* parse_align(const Char* begin, const Char* end,
|
||||
auto p = next_code_point(begin, end);
|
||||
if (p == end) p = begin;
|
||||
for (;;) {
|
||||
switch (static_cast<char>(*p)) {
|
||||
switch (static_cast<int>(*p)) {
|
||||
case '<':
|
||||
align = align::left;
|
||||
break;
|
||||
|
@ -1525,6 +1525,7 @@ TEST(FormatterTest, WideFormatString) {
|
||||
EXPECT_EQ(L"4.2", format(L"{}", 4.2));
|
||||
EXPECT_EQ(L"abc", format(L"{}", L"abc"));
|
||||
EXPECT_EQ(L"z", format(L"{}", L'z'));
|
||||
EXPECT_THROW(fmt::format(L"{:*\x343E}", 42), fmt::format_error);
|
||||
}
|
||||
|
||||
TEST(FormatterTest, FormatStringFromSpeedTest) {
|
||||
|
Loading…
Reference in New Issue
Block a user