NTTP ratio support added (resolves #49)
This commit is contained in:
1 parent
03facbefd2
commit
d171f5451e
47 files changed
+504
-664
No files matched your search
@@ -115,7 +115,7 @@ TEST_CASE("operator<< on a quantity", "[text][ostream][fmt]")
|
||||
{
|
||||
SECTION("in terms of base units")
|
||||
{
|
||||
const length<scaled_unit<ratio<1, 1, 6>, metre>> q(123);
|
||||
const length<scaled_unit<ratio(1, 1, 6), metre>> q(123);
|
||||
os << q;
|
||||
|
||||
SECTION("iostream")
|
||||
@@ -136,7 +136,7 @@ TEST_CASE("operator<< on a quantity", "[text][ostream][fmt]")
|
||||
|
||||
SECTION("in terms of derived units")
|
||||
{
|
||||
const energy<scaled_unit<ratio<1, 1, -2>, joule>> q(60);
|
||||
const energy<scaled_unit<ratio(1, 1, -2), joule>> q(60);
|
||||
os << q;
|
||||
|
||||
SECTION("iostream")
|
||||
|
||||
@@ -319,7 +319,7 @@ TEST_CASE("fmt::format on synthesized unit symbols", "[text][fmt]")
|
||||
|
||||
SECTION("unknown scaled unit with reference different than the dimension's coherent unit")
|
||||
{
|
||||
CHECK(fmt::format("{}", mass<units::scaled_unit<units::ratio<2, 3>, gram>>(1)) == "1 [2/3 × 10⁻³] kg");
|
||||
CHECK(fmt::format("{:%Q %Aq}", mass<units::scaled_unit<units::ratio<2, 3>, gram>>(1)) == "1 [2/3 x 10^-3] kg");
|
||||
CHECK(fmt::format("{}", mass<units::scaled_unit<units::ratio(2, 3), gram>>(1)) == "1 [2/3 × 10⁻³] kg");
|
||||
CHECK(fmt::format("{:%Q %Aq}", mass<units::scaled_unit<units::ratio(2, 3), gram>>(1)) == "1 [2/3 x 10^-3] kg");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user