Skip to content

Commit

Permalink
fix some mismatched power test units
Browse files Browse the repository at this point in the history
  • Loading branch information
phlptp committed Mar 25, 2022
1 parent fbae44b commit e1f6eb8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions units/units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static const umap base_unit_names = getDefinedBaseUnitNames();

using ustr = std::pair<precise_unit, const char*>;
// units to divide into tests to explore common multiplier units
static UNITS_CPP14_CONSTEXPR_OBJECT std::array<ustr, 21> testUnits{
static UNITS_CPP14_CONSTEXPR_OBJECT std::array<ustr, 23> testUnits{
{ustr{precise::m, "m"},
ustr{precise::s, "s"},
ustr{precise::ms, "ms"},
Expand All @@ -168,6 +168,7 @@ static UNITS_CPP14_CONSTEXPR_OBJECT std::array<ustr, 21> testUnits{
ustr{precise::time::day, "day"},
ustr{precise::lb, "lb"},
ustr{precise::ft, "ft"},
ustr{precise::mile, "mi"},
ustr{constants::c.as_unit(), "[c]"},
ustr{constants::h.as_unit(), "[h]"},
ustr{precise::L, "L"},
Expand All @@ -179,16 +180,17 @@ static UNITS_CPP14_CONSTEXPR_OBJECT std::array<ustr, 21> testUnits{
ustr{precise::electrical::kW, "kW"},
ustr{precise::electrical::mW, "mW"},
ustr{precise::MW, "MW"},
ustr{precise::GW, "GW"},
ustr{precise::energy::eV, "eV"},
ustr{precise::count, "item"}}};

// units to divide into tests to explore common multiplier units which can be
// multiplied by power
static UNITS_CPP14_CONSTEXPR_OBJECT std::array<ustr, 5> testPowerUnits{
{ustr{precise::m, "m"},
ustr{precise::m, "km"},
ustr{precise::km, "km"},
ustr{precise::s, "s"},
ustr{precise::ms, "ft"},
ustr{precise::ft, "ft"},
ustr{precise::mile, "mi"}}};

// units to divide into tests to explore common multiplier units
Expand Down

0 comments on commit e1f6eb8

Please sign in to comment.