xo-unit: utest: + quantity mult tests
This commit is contained in:
parent
be67f55c79
commit
2f9266b6ed
2 changed files with 68 additions and 2 deletions
|
|
@ -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*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue