mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-10 05:10:05 +00:00
Fix tests.
This commit is contained in:
parent
03776dd988
commit
a2828412b6
@ -1215,7 +1215,9 @@ TEST(FormatterTest, FormatDouble) {
|
||||
SPrintf(buffer, "%E", 392.65);
|
||||
EXPECT_EQ(buffer, str(Format("{0:E}") << 392.65));
|
||||
EXPECT_EQ("+0000392.6", str(Format("{0:+010.4g}") << 392.65));
|
||||
SPrintf(buffer, "%a", -42);
|
||||
EXPECT_EQ("-0x1.5p+5", str(Format("{:a}") << -42.0));
|
||||
SPrintf(buffer, "%A", -42);
|
||||
EXPECT_EQ("-0X1.5P+5", str(Format("{:A}") << -42.0));
|
||||
}
|
||||
|
||||
|
@ -210,8 +210,10 @@ TEST(PrintfTest, HashFlag) {
|
||||
EXPECT_PRINTF("-42.0000", "%#g", -42.0);
|
||||
EXPECT_PRINTF("-42.0000", "%#G", -42.0);
|
||||
|
||||
EXPECT_PRINTF("0x1.p+4", "%#a", 16.0);
|
||||
EXPECT_PRINTF("0X1.P+4", "%#A", 16.0);
|
||||
SPrintf(buffer, "%#a", 16.0);
|
||||
EXPECT_PRINTF(buffer, "%#a", 16.0);
|
||||
SPrintf(buffer, "%#A", 16.0);
|
||||
EXPECT_PRINTF(buffer, "%#A", 16.0);
|
||||
|
||||
// '#' flag is ignored for non-numeric types.
|
||||
EXPECT_PRINTF("x", "%#c", 'x');
|
||||
|
Loading…
Reference in New Issue
Block a user