mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-26 20:30:06 +01:00
Fix a bug when copying the fill from basic_specs
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
committed by
Victor Zverovich
parent
880e1494dc
commit
dad3237514
@@ -91,6 +91,9 @@ TEST(std_test, complex) {
|
||||
EXPECT_EQ(fmt::format("{: }", std::complex<double>(1, 2.2)), "( 1+2.2i)");
|
||||
EXPECT_EQ(fmt::format("{: }", std::complex<double>(1, -2.2)), "( 1-2.2i)");
|
||||
|
||||
EXPECT_EQ(fmt::format("{:8}", std::complex<double>(1, 2)), "(1+2i) ");
|
||||
EXPECT_EQ(fmt::format("{:-<8}", std::complex<double>(1, 2)), "(1+2i)--");
|
||||
|
||||
EXPECT_EQ(fmt::format("{:>20.2f}", std::complex<double>(1, 2.2)),
|
||||
" (1.00+2.20i)");
|
||||
EXPECT_EQ(fmt::format("{:<20.2f}", std::complex<double>(1, 2.2)),
|
||||
|
||||
@@ -79,7 +79,7 @@ TEST(xchar_test, format) {
|
||||
EXPECT_THROW(fmt::format(fmt::runtime(L"{:*\x343E}"), 42), fmt::format_error);
|
||||
EXPECT_EQ(fmt::format(L"{}", true), L"true");
|
||||
EXPECT_EQ(fmt::format(L"{0}", L'a'), L"a");
|
||||
EXPECT_EQ(fmt::format(L"Letter {}", L'\x40e'), L"Letter \x40e"); // Ў
|
||||
EXPECT_EQ(fmt::format(L"Letter {}", L'\x40e'), L"Letter \x40e"); // Ў
|
||||
if (sizeof(wchar_t) == 4)
|
||||
EXPECT_EQ(fmt::format(fmt::runtime(L"{:𓀨>3}"), 42), L"𓀨42");
|
||||
EXPECT_EQ(fmt::format(L"{}c{}", L"ab", 1), L"abc1");
|
||||
@@ -504,6 +504,7 @@ TEST(std_test_xchar, complex) {
|
||||
EXPECT_EQ(fmt::format(L"{:.2f}", std::complex<double>(1, 2)),
|
||||
L"(1.00+2.00i)");
|
||||
EXPECT_EQ(fmt::format(L"{:8}", std::complex<double>(1, 2)), L"(1+2i) ");
|
||||
EXPECT_EQ(fmt::format(L"{:-<8}", std::complex<double>(1, 2)), L"(1+2i)--");
|
||||
}
|
||||
|
||||
TEST(std_test_xchar, optional) {
|
||||
|
||||
Reference in New Issue
Block a user