mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-03 07:31:41 +01:00
Fix hexfloat buffer reallocation
This commit is contained in:
@@ -1212,6 +1212,20 @@ TEST(FormatterTest, Precision) {
|
||||
"012970999954193198940908041656332452475714786901472678015935523861155013"
|
||||
"480352649347201937902681071074917033322268447533357208324319361e-324",
|
||||
format("{:.494}", 4.9406564584124654E-324));
|
||||
EXPECT_EQ(
|
||||
"-0X1.41FE3FFE71C9E000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000P+127",
|
||||
format("{:.838A}", -2.14001164E+38));
|
||||
EXPECT_EQ("123.", format("{:#.0f}", 123.0));
|
||||
|
||||
EXPECT_THROW_MSG(format("{0:.2}", reinterpret_cast<void*>(0xcafe)),
|
||||
|
||||
Reference in New Issue
Block a user