mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 12:24:26 +02:00
feat: do not print space between a number and percent
or per_mille
This commit is contained in:
@@ -233,11 +233,11 @@ TEST_CASE("operator<< on a quantity", "[text][ostream][fmt]")
|
||||
const auto q = value_cast<percent>(15. * isq::length[m] / (100. * isq::length[m]));
|
||||
os << q;
|
||||
|
||||
SECTION("iostream") { CHECK(os.str() == "15 %"); }
|
||||
SECTION("iostream") { CHECK(os.str() == "15%"); }
|
||||
|
||||
SECTION("fmt with default format {} on a quantity") { CHECK(MP_UNITS_STD_FMT::format("{}", q) == os.str()); }
|
||||
|
||||
SECTION("fmt with format {:%Q %q} on a quantity") { CHECK(MP_UNITS_STD_FMT::format("{:%Q %q}", q) == os.str()); }
|
||||
SECTION("fmt with format {:%Q %q} on a quantity") { CHECK(MP_UNITS_STD_FMT::format("{:%Q %q}", q) == "15 %"); }
|
||||
}
|
||||
|
||||
SECTION("radians")
|
||||
|
Reference in New Issue
Block a user