xo-unit: tidy: namespace bu2 -> bu
This commit is contained in:
parent
70b7df6074
commit
10bd972d34
3 changed files with 7 additions and 7 deletions
|
|
@ -37,7 +37,7 @@ namespace xo {
|
|||
scalefactor_ratio_type scalefactor_;
|
||||
};
|
||||
|
||||
namespace bu2 {
|
||||
namespace bu {
|
||||
constexpr basis_unit nanogram = basis_unit(dim::mass, scalefactor_ratio_type(1, 1000000000));
|
||||
constexpr basis_unit microgram = basis_unit(dim::mass, scalefactor_ratio_type(1, 1000000));
|
||||
constexpr basis_unit milligram = basis_unit(dim::mass, scalefactor_ratio_type(1, 1000));
|
||||
|
|
@ -104,7 +104,7 @@ namespace xo {
|
|||
};
|
||||
|
||||
template <>
|
||||
struct scaled_native_unit2_abbrev<dim::mass, bu2::nanogram.scalefactor().num(), bu2::nanogram.scalefactor().den()> {
|
||||
struct scaled_native_unit2_abbrev<dim::mass, bu::nanogram.scalefactor().num(), bu::nanogram.scalefactor().den()> {
|
||||
static constexpr const basis_unit2_abbrev_type value = basis_unit2_abbrev_type::from_chars("ng");
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -318,8 +318,8 @@ namespace xo {
|
|||
} /*namespace detail*/
|
||||
|
||||
namespace nu2 {
|
||||
constexpr auto nanogram = bpu_array_maker<std::int64_t>::make_bpu_array(make_unit_power<std::int64_t>(bu2::nanogram));
|
||||
constexpr auto microgram = bpu_array_maker<std::int64_t>::make_bpu_array(make_unit_power<std::int64_t>(bu2::microgram));
|
||||
constexpr auto nanogram = bpu_array_maker<std::int64_t>::make_bpu_array(make_unit_power<std::int64_t>(bu::nanogram));
|
||||
constexpr auto microgram = bpu_array_maker<std::int64_t>::make_bpu_array(make_unit_power<std::int64_t>(bu::microgram));
|
||||
}
|
||||
} /*namespace qty*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace xo {
|
|||
return result;
|
||||
}
|
||||
|
||||
TEST_CASE("basis_unit2", "[basis_unit2]") {
|
||||
TEST_CASE("basis_unit", "[basis_unit]") {
|
||||
constexpr bool c_debug_flag = true;
|
||||
|
||||
// can get bits from /dev/random by uncommenting the 2nd line below
|
||||
|
|
@ -67,7 +67,7 @@ namespace xo {
|
|||
|
||||
//auto rng = xo::rng::xoshiro256ss(seed);
|
||||
|
||||
scope log(XO_DEBUG2(c_debug_flag, "TEST_CASE.basis_unit2"));
|
||||
scope log(XO_DEBUG2(c_debug_flag, "TEST_CASE.basis_unit"));
|
||||
//log && log("(A)", xtag("foo", foo));
|
||||
|
||||
static_assert(native_unit2_v[static_cast<int>(dim::mass)].native_dim() == dim::mass);
|
||||
|
|
@ -182,7 +182,7 @@ namespace xo {
|
|||
static_assert(scaled_native_unit2_abbrev_v<dim::mass>
|
||||
== basis_unit2_abbrev_type::from_flatstring(xo::flatstring("g")));
|
||||
|
||||
} /*TEST_CASE(basis_unit2)*/
|
||||
} /*TEST_CASE(basis_unit)*/
|
||||
|
||||
TEST_CASE("basis_unit2_store", "[basis_unit2_store]") {
|
||||
constexpr bool c_debug_flag = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue