xo-unit: utest: + quantity mult tests

This commit is contained in:
Roland Conybeare 2024-05-03 01:37:52 -04:00
commit 2f9266b6ed
2 changed files with 68 additions and 2 deletions

View file

@ -70,7 +70,7 @@ namespace xo {
}
} /*TEST_CASE(su_product)*/
TEST_CASE("scaled_unit0", "[scaled_unit0]") {
TEST_CASE("scaled_unit0", "[scaled_unit]") {
constexpr bool c_debug_flag = false;
scope log(XO_DEBUG2(c_debug_flag, "TEST_CASE.scaled_unit0"));
@ -85,7 +85,7 @@ namespace xo {
static_assert(ng2.natural_unit_.n_bpu() == 1);
} /*TEST_CASE(scaled_unit0)*/
TEST_CASE("scaled_unit1", "[scaled_unit1]") {
TEST_CASE("scaled_unit1", "[scaled_unit]") {
constexpr bool c_debug_flag = false;
scope log(XO_DEBUG2(c_debug_flag, "TEST_CASE.scaled_unit1"));
@ -100,6 +100,21 @@ namespace xo {
static_assert(ng2.natural_unit_.n_bpu() == 0);
} /*TEST_CASE(scaled_unit1)*/
TEST_CASE("scaled_unit2", "[scaled_unit]") {
constexpr bool c_debug_flag = false;
scope log(XO_DEBUG2(c_debug_flag, "TEST_CASE.scaled_unit2"));
constexpr auto ms = su::millisecond;
constexpr auto ms2 = ms * ms;
log && log(xtag("ms", ms));
log && log(xtag("ms*ms", ms2));
static_assert(ms.natural_unit_.n_bpu() == 1);
static_assert(ms2.natural_unit_.n_bpu() == 1);
} /*TEST_CASE(scaled_unit2)*/
} /*namespace qty*/
} /*namespace xo*/