Move nan test to where it belongs

This commit is contained in:
Victor Zverovich
2020-09-27 12:50:18 -07:00
parent 68555fdbd2
commit 51f2e2ca27
2 changed files with 4 additions and 8 deletions
+4
View File
@@ -1306,6 +1306,10 @@ TEST(FormatterTest, FormatNaN) {
double nan = std::numeric_limits<double>::quiet_NaN();
EXPECT_EQ("nan", format("{}", nan));
EXPECT_EQ("+nan", format("{:+}", nan));
if (std::signbit(-nan))
EXPECT_EQ("-nan", format("{}", -nan));
else
fmt::print("Warning: compiler doesn't handle negative NaN correctly");
EXPECT_EQ(" nan", format("{: }", nan));
EXPECT_EQ("NAN", format("{:F}", nan));
EXPECT_EQ("nan ", format("{:<7}", nan));