xo-unit: refactor: bpu2_abbrev -> bpu_abbrev
This commit is contained in:
parent
d1938abd15
commit
404930adef
3 changed files with 8 additions and 8 deletions
|
|
@ -39,7 +39,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
static constexpr bpu_abbrev_type
|
||||
bpu2_abbrev(dim native_dim,
|
||||
bpu_abbrev(dim native_dim,
|
||||
const scalefactor_ratio_type & scalefactor,
|
||||
const power_ratio_type & power)
|
||||
{
|
||||
|
|
@ -92,7 +92,7 @@ namespace xo {
|
|||
**/
|
||||
constexpr bpu_abbrev_type abbrev() const
|
||||
{
|
||||
return abbrev::bpu2_abbrev(native_dim_,
|
||||
return abbrev::bpu_abbrev(native_dim_,
|
||||
scalefactor_,
|
||||
power_);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ namespace xo {
|
|||
const scalefactor_ratio_type & scalefactor,
|
||||
const power_ratio_type & power)
|
||||
{
|
||||
return abbrev::bpu2_abbrev(basis_dim,
|
||||
return abbrev::bpu_abbrev(basis_dim,
|
||||
scalefactor,
|
||||
power);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace xo {
|
|||
using xo::qty::basis_unit;
|
||||
using xo::qty::abbrev::basis_unit2_abbrev;;
|
||||
using xo::qty::bpu_abbrev_type;
|
||||
using xo::qty::abbrev::bpu2_abbrev;
|
||||
using xo::qty::abbrev::bpu_abbrev;
|
||||
using xo::qty::basis_unit2_store;
|
||||
using xo::qty::power_ratio_type;
|
||||
using xo::qty::abbrev::flatstring_from_exponent;
|
||||
|
|
@ -306,10 +306,10 @@ namespace xo {
|
|||
scope log(XO_DEBUG2(c_debug_flag, "TEST_CASE.bpu2_assemble_abbrev"));
|
||||
//log && log("(A)", xtag("foo", foo));
|
||||
|
||||
log && log(xtag("1/(kg*kg)", bpu2_abbrev(dim::mass, scalefactor_ratio_type(1000, 1), power_ratio_type(-2, 1))));
|
||||
log && log(xtag("1/kg", bpu2_abbrev(dim::mass, scalefactor_ratio_type(1000, 1), power_ratio_type(-1, 1))));
|
||||
log && log(xtag("kg", bpu2_abbrev(dim::mass, scalefactor_ratio_type(1000, 1), power_ratio_type(1, 1))));
|
||||
log && log(xtag("kg*kg", bpu2_abbrev(dim::mass, scalefactor_ratio_type(1000, 1), power_ratio_type(2, 1))));
|
||||
log && log(xtag("1/(kg*kg)", bpu_abbrev(dim::mass, scalefactor_ratio_type(1000, 1), power_ratio_type(-2, 1))));
|
||||
log && log(xtag("1/kg", bpu_abbrev(dim::mass, scalefactor_ratio_type(1000, 1), power_ratio_type(-1, 1))));
|
||||
log && log(xtag("kg", bpu_abbrev(dim::mass, scalefactor_ratio_type(1000, 1), power_ratio_type(1, 1))));
|
||||
log && log(xtag("kg*kg", bpu_abbrev(dim::mass, scalefactor_ratio_type(1000, 1), power_ratio_type(2, 1))));
|
||||
|
||||
static_assert(bpu<int64_t>(dim::mass, scalefactor_ratio_type(1, 1), power_ratio_type(1, 1)).abbrev()
|
||||
== bpu_abbrev_type::from_chars("g"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue