forked from mpusz/mp-units
Added luminance
This commit is contained in:
@@ -245,6 +245,12 @@ TEST_CASE("fmt::format on synthesized unit symbols", "[text][fmt]")
|
||||
CHECK(fmt::format("{:%Q %Aq}", 1q_mol_per_m3) == "1 mol/m^3");
|
||||
}
|
||||
|
||||
SECTION("luminance")
|
||||
{
|
||||
CHECK(fmt::format("{}", 1q_cd_per_m2) == "1 cd/m²");
|
||||
CHECK(fmt::format("{:%Q %Aq}", 1q_cd_per_m2) == "1 cd/m^2");
|
||||
}
|
||||
|
||||
SECTION("incoherent units with powers")
|
||||
{
|
||||
CHECK(fmt::format("{}", 1q_mi * 1q_mi * 1q_mi) == "1 [15900351812136/3814697265625 × 10⁹] m³");
|
||||
|
||||
@@ -304,4 +304,9 @@ static_assert(detail::unit_text<dim_current_density, ampere_per_metre_sq>() == b
|
||||
static_assert(1q_mol_per_m3 == 1q_kg_per_m3 * 1q_mol / 1q_kg);
|
||||
static_assert(detail::unit_text<dim_concentration, ampere_per_metre_sq>() == basic_symbol_text("mol/m³", "mol/m^2"));
|
||||
|
||||
// luminance
|
||||
|
||||
static_assert(1q_cd_per_m2 == 1q_cd / 1q_m2);
|
||||
static_assert(detail::unit_text<dim_luminance, candela_per_metre_sq>() == basic_symbol_text("cd/m²", "cd/m^2"));
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user