diff options
author | David Robillard <d@drobilla.net> | 2025-02-10 19:32:58 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-02-10 19:32:58 -0500 |
commit | ecd5449f7bcdb5097ed943088084bf71ab45bec6 (patch) | |
tree | 37592f604a18ca5c56d1cc8b9de2d8c0d0befb3f /test | |
parent | b2d6d37af766acb80bfc97f68fc49e9500107235 (diff) | |
download | chilbert-ecd5449f7bcdb5097ed943088084bf71ab45bec6.tar.gz chilbert-ecd5449f7bcdb5097ed943088084bf71ab45bec6.tar.bz2 chilbert-ecd5449f7bcdb5097ed943088084bf71ab45bec6.zip |
Put local utility functions in anonymous namespaces
Diffstat (limited to 'test')
-rw-r--r-- | test/test_bitvec.cpp | 4 | ||||
-rw-r--r-- | test/test_gray_code_rank.cpp | 4 | ||||
-rw-r--r-- | test/test_hilbert.cpp | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/test/test_bitvec.cpp b/test/test_bitvec.cpp index e03a27f..d25e3ff 100644 --- a/test/test_bitvec.cpp +++ b/test/test_bitvec.cpp @@ -16,6 +16,8 @@ #include <cstddef> #include <cstdlib> +namespace { + template<class T, size_t N> void test_and(Context& ctx) @@ -324,6 +326,8 @@ test(Context& ctx) test_iteration<T, N>(ctx); } +} // namespace + int main() { diff --git a/test/test_gray_code_rank.cpp b/test/test_gray_code_rank.cpp index 1bb70cb..26432b8 100644 --- a/test/test_gray_code_rank.cpp +++ b/test/test_gray_code_rank.cpp @@ -19,6 +19,8 @@ #include <cstddef> #include <iterator> +namespace { + template<class T, size_t Max, size_t D> T get_mask(const std::array<size_t, D>& ms, const size_t d, const size_t step) @@ -106,6 +108,8 @@ test(Context& ctx) test_gray_code_rank<T, Max, D>(ctx); } +} // namespace + int main() { diff --git a/test/test_hilbert.cpp b/test/test_hilbert.cpp index 53177ec..6a1862d 100644 --- a/test/test_hilbert.cpp +++ b/test/test_hilbert.cpp @@ -33,6 +33,8 @@ _Pragma("clang diagnostic pop") #include <cstddef> #include <cstdint> +namespace { + /// Return a `D`-dimensional point within `ms` per-dimension precision template<size_t D> std::array<uint64_t, D> @@ -159,6 +161,8 @@ test_compact(Context& ctx) assert(squared_distance(pa, pb) == 1); } +} // namespace + int main() { |