mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-05 12:04:11 +02:00
Add support for hexadecimal floating point format specifiers a and A.
This commit is contained in:
+2
-3
@@ -210,9 +210,8 @@ TEST(PrintfTest, HashFlag) {
|
||||
EXPECT_PRINTF("-42.0000", "%#g", -42.0);
|
||||
EXPECT_PRINTF("-42.0000", "%#G", -42.0);
|
||||
|
||||
// TODO
|
||||
//EXPECT_PRINTF("-0x1.5p+5", "%#a", -42.0);
|
||||
//EXPECT_PRINTF("-0x1.5A+5", "%#A", -42.0);
|
||||
EXPECT_PRINTF("0x1.p+4", "%#a", 16.0);
|
||||
EXPECT_PRINTF("0X1.P+4", "%#A", 16.0);
|
||||
|
||||
// '#' flag is ignored for non-numeric types.
|
||||
EXPECT_PRINTF("x", "%#c", 'x');
|
||||
|
||||
Reference in New Issue
Block a user