mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-01 22:51:44 +01:00
Fix width computation in float formatter
This commit is contained in:
@@ -871,6 +871,7 @@ TEST(FormatterTest, Width) {
|
||||
EXPECT_EQ(format("{:*^5}", "🤡"), "**🤡**");
|
||||
EXPECT_EQ(format("{:#6}", 42.0), " 42.0");
|
||||
EXPECT_EQ(format("{:6c}", static_cast<int>('x')), "x ");
|
||||
EXPECT_EQ(format("{:>06.0f}", 0.00884311), "000000");
|
||||
}
|
||||
|
||||
template <typename T> inline T const_check(T value) { return value; }
|
||||
|
||||
Reference in New Issue
Block a user