mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 10:27:16 +02:00
Switch tests to use top-level, anonymous namespace
This commit is contained in:
@ -25,7 +25,10 @@
|
|||||||
#include <units/ratio.h>
|
#include <units/ratio.h>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
namespace units {
|
using namespace units;
|
||||||
|
using namespace units::detail;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
// A set of non-standard bases for testing purposes.
|
// A set of non-standard bases for testing purposes.
|
||||||
struct noninteger_base {
|
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")
|
TEST_CASE("int_power computes integer powers")
|
||||||
{
|
{
|
||||||
@ -473,6 +477,4 @@ TEST_CASE("strictly_increasing")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace
|
||||||
|
|
||||||
} // namespace units
|
|
||||||
|
@ -24,7 +24,9 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace units::detail {
|
using namespace units::detail;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
template<std::size_t BasisSize, std::size_t... Is>
|
template<std::size_t BasisSize, std::size_t... Is>
|
||||||
constexpr bool check_primes(std::index_sequence<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(1));
|
||||||
static_assert(WheelFactorizer<3>::is_prime(2));
|
static_assert(WheelFactorizer<3>::is_prime(2));
|
||||||
|
|
||||||
} // namespace units::detail
|
} // namespace
|
||||||
|
Reference in New Issue
Block a user