From 10bd972d342444eeb097dbddcf9508f50d23f1a9 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 24 Apr 2024 12:56:40 -0400 Subject: [PATCH] xo-unit: tidy: namespace bu2 -> bu --- include/xo/unit/basis_unit.hpp | 4 ++-- include/xo/unit/natural_unit.hpp | 4 ++-- utest/unit.test.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/xo/unit/basis_unit.hpp b/include/xo/unit/basis_unit.hpp index cd3325eb..c45d7fda 100644 --- a/include/xo/unit/basis_unit.hpp +++ b/include/xo/unit/basis_unit.hpp @@ -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 { + struct scaled_native_unit2_abbrev { static constexpr const basis_unit2_abbrev_type value = basis_unit2_abbrev_type::from_chars("ng"); }; diff --git a/include/xo/unit/natural_unit.hpp b/include/xo/unit/natural_unit.hpp index a62bd58d..b1616454 100644 --- a/include/xo/unit/natural_unit.hpp +++ b/include/xo/unit/natural_unit.hpp @@ -318,8 +318,8 @@ namespace xo { } /*namespace detail*/ namespace nu2 { - constexpr auto nanogram = bpu_array_maker::make_bpu_array(make_unit_power(bu2::nanogram)); - constexpr auto microgram = bpu_array_maker::make_bpu_array(make_unit_power(bu2::microgram)); + constexpr auto nanogram = bpu_array_maker::make_bpu_array(make_unit_power(bu::nanogram)); + constexpr auto microgram = bpu_array_maker::make_bpu_array(make_unit_power(bu::microgram)); } } /*namespace qty*/ } /*namespace xo*/ diff --git a/utest/unit.test.cpp b/utest/unit.test.cpp index 1660c5ff..996441c1 100644 --- a/utest/unit.test.cpp +++ b/utest/unit.test.cpp @@ -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(dim::mass)].native_dim() == dim::mass); @@ -182,7 +182,7 @@ namespace xo { static_assert(scaled_native_unit2_abbrev_v == 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;