From 5f9bbb66481ca9b71b8bf790e322bc8da95863a8 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sun, 28 Apr 2024 18:43:33 -0400 Subject: [PATCH] xo-unit: utest tidy --- include/xo/unit/scaled_unit.hpp | 2 +- utest/Quantity.test.cpp | 2 +- utest/unit.test.cpp | 17 ++++------------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/include/xo/unit/scaled_unit.hpp b/include/xo/unit/scaled_unit.hpp index 1ca523ea..88bc9416 100644 --- a/include/xo/unit/scaled_unit.hpp +++ b/include/xo/unit/scaled_unit.hpp @@ -45,7 +45,7 @@ namespace xo { } } - namespace su2 { + namespace su { constexpr auto nanogram = detail::make_unit_rescale_result(nu::nanogram); constexpr auto microgram = detail::make_unit_rescale_result(nu::microgram); } diff --git a/utest/Quantity.test.cpp b/utest/Quantity.test.cpp index 0e05b5c4..62a5b3d1 100644 --- a/utest/Quantity.test.cpp +++ b/utest/Quantity.test.cpp @@ -12,7 +12,7 @@ #include namespace xo { - namespace su = xo::qty::su2; + namespace su = xo::qty::su; namespace nu = xo::qty::nu; using xo::qty::Quantity; diff --git a/utest/unit.test.cpp b/utest/unit.test.cpp index 53f44e6b..d9cb80f0 100644 --- a/utest/unit.test.cpp +++ b/utest/unit.test.cpp @@ -1,10 +1,7 @@ /* @file unit.test.cpp */ -//#include "xo/unit/unit2.hpp" -#include "xo/unit/Quantity_iostream.hpp" #include "xo/unit/scaled_unit_iostream.hpp" -#include "xo/unit/Quantity.hpp" -#include "xo/unit/natural_unit.hpp" +//#include "xo/unit/scaled_unit.hpp" #include "xo/unit/bpu_store.hpp" #include "xo/unit/bpu.hpp" #include "xo/indentlog/scope.hpp" @@ -15,19 +12,13 @@ namespace xo { namespace ut { /* compile-time tests */ - //namespace bu = xo::qty::bu; - namespace su2 = xo::qty::su2; + namespace su = xo::qty::su; - using xo::qty::Quantity; using xo::qty::dim; using xo::qty::basis_unit2_abbrev_type; using xo::qty::scalefactor_ratio_type; - //using xo::qty::bpu_abbrev_type; using xo::qty::basis_unit2_store; using xo::qty::power_ratio_type; - using xo::qty::bpu; - using xo::qty::natural_unit; - using xo::qty::unit_qty; TEST_CASE("basis_unit2_store", "[basis_unit2_store]") { constexpr bool c_debug_flag = false; @@ -107,7 +98,7 @@ namespace xo { scope log(XO_DEBUG2(c_debug_flag, "TEST_CASE.scaled_unit0")); //log && log("(A)", xtag("foo", foo)); - constexpr auto ng = su2::nanogram; + constexpr auto ng = su::nanogram; constexpr auto ng2 = ng * ng; log && log(xtag("ng", ng)); @@ -130,7 +121,7 @@ namespace xo { scope log(XO_DEBUG2(c_debug_flag, "TEST_CASE.scaled_unit1")); //log && log("(A)", xtag("foo", foo)); - constexpr auto ng = su2::nanogram; + constexpr auto ng = su::nanogram; constexpr auto ng2 = ng / ng; log && log(xtag("ng", ng));