forked from mpusz/mp-units
Rename as_magnitude<...>() to mag<...>()
This is easier to write and to read.
This commit is contained in:
@@ -84,7 +84,7 @@ TEST_CASE("operator<< on a quantity", "[text][ostream][fmt]")
|
||||
{
|
||||
SECTION("in terms of base units")
|
||||
{
|
||||
const length<scaled_unit<pow<6>(as_magnitude<10>()), metre>> q(123);
|
||||
const length<scaled_unit<pow<6>(mag<10>()), metre>> q(123);
|
||||
os << q;
|
||||
|
||||
SECTION("iostream") { CHECK(os.str() == "123 Mm"); }
|
||||
@@ -96,7 +96,7 @@ TEST_CASE("operator<< on a quantity", "[text][ostream][fmt]")
|
||||
|
||||
SECTION("in terms of derived units")
|
||||
{
|
||||
const energy<scaled_unit<pow<-2>(as_magnitude<10>()), joule>> q(60);
|
||||
const energy<scaled_unit<pow<-2>(mag<10>()), joule>> q(60);
|
||||
os << q;
|
||||
|
||||
SECTION("iostream") { CHECK(os.str() == "60 cJ"); }
|
||||
|
||||
Reference in New Issue
Block a user