align code-style
This commit is contained in:
parent
96e08b0cda
commit
b92319da6f
@ -1591,7 +1591,7 @@ OutputIt write_nonfinite(OutputIt out, bool isinf,
|
||||
constexpr size_t str_size = 3;
|
||||
auto sign = fspecs.sign;
|
||||
auto size = str_size + (sign ? 1 : 0);
|
||||
// replace '0'-padding with space for non-finite values
|
||||
// Replace '0'-padding with space for non-finite values.
|
||||
const bool is_zero_fill =
|
||||
specs.fill.size() == 1 && *specs.fill.data() == static_cast<Char>('0');
|
||||
if (is_zero_fill) specs.fill[0] = static_cast<Char>(' ');
|
||||
|
||||
@ -1279,8 +1279,9 @@ TEST(format_test, format_nan) {
|
||||
if (std::signbit(-nan)) {
|
||||
EXPECT_EQ("-nan", fmt::format("{}", -nan));
|
||||
EXPECT_EQ(" -nan", fmt::format("{:+06}", -nan));
|
||||
} else
|
||||
} else {
|
||||
fmt::print("Warning: compiler doesn't handle negative NaN correctly");
|
||||
}
|
||||
EXPECT_EQ(" nan", fmt::format("{: }", nan));
|
||||
EXPECT_EQ("NAN", fmt::format("{:F}", nan));
|
||||
EXPECT_EQ("nan ", fmt::format("{:<7}", nan));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user