Switch tests to use top-level, anonymous namespace

This commit is contained in:
Chip Hogg
2022-03-19 15:54:29 +00:00
parent 28c4fe3c08
commit a99e5f9032
2 changed files with 11 additions and 7 deletions

View File

@ -25,7 +25,10 @@
#include <units/ratio.h>
#include <type_traits>
namespace units {
using namespace units;
using namespace units::detail;
namespace {
// A set of non-standard bases for testing purposes.
struct noninteger_base {
@ -313,7 +316,8 @@ TEST_CASE("can distinguish integral, rational, and irrational magnitudes")
}
}
namespace detail {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Detail function tests below.
TEST_CASE("int_power computes integer powers")
{
@ -473,6 +477,4 @@ TEST_CASE("strictly_increasing")
}
}
} // namespace detail
} // namespace units
} // namespace

View File

@ -24,7 +24,9 @@
#include <type_traits>
#include <utility>
namespace units::detail {
using namespace units::detail;
namespace {
template<std::size_t BasisSize, std::size_t... Is>
constexpr bool check_primes(std::index_sequence<Is...>)
@ -71,4 +73,4 @@ static_assert(!WheelFactorizer<3>::is_prime(0));
static_assert(!WheelFactorizer<3>::is_prime(1));
static_assert(WheelFactorizer<3>::is_prime(2));
} // namespace units::detail
} // namespace