From da18c599690dbfc592f8a086302f2f4fb9d6d66c Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Sun, 6 Mar 2022 20:05:34 +0100 Subject: [PATCH] Namespacified tests aswell --- Eule/Matrix4x4.cpp | 34 +++++++++++++++---------------- Test/Math__Abs.cpp | 2 +- Test/Math__Clamp.cpp | 2 +- Test/Math__Lerp.cpp | 2 +- Test/Math__Max.cpp | 2 +- Test/Math__Min.cpp | 2 +- Test/Math__Mod.cpp | 2 +- Test/Math__Oscillate.cpp | 2 +- Test/Math__Similar.cpp | 2 +- Test/Matrix4x4.cpp | 2 +- Test/Quaternion.cpp | 2 +- Test/Random_RandomIntRange.cpp | 2 +- Test/Random__RandomFloat.cpp | 2 +- Test/Random__RandomInteger.cpp | 2 +- Test/Random__RandomRange.cpp | 2 +- Test/TrapazoidalPrismCollider.cpp | 2 +- Test/Vector2.cpp | 2 +- Test/Vector3.cpp | 2 +- Test/Vector4.cpp | 2 +- Test/VectorConversion.cpp | 2 +- 20 files changed, 35 insertions(+), 37 deletions(-) diff --git a/Eule/Matrix4x4.cpp b/Eule/Matrix4x4.cpp index c35d73a..43d0078 100644 --- a/Eule/Matrix4x4.cpp +++ b/Eule/Matrix4x4.cpp @@ -583,31 +583,29 @@ namespace Leonetienne::Eule { return true; } - namespace Eule { - std::ostream &operator<<(std::ostream &os, const Matrix4x4 &m) { - os << std::endl; + std::ostream &operator<<(std::ostream &os, const Matrix4x4 &m) { + os << std::endl; - for (std::size_t y = 0; y < 4; y++) { - for (std::size_t x = 0; x < 4; x++) - os << " | " << m[y][x]; + for (std::size_t y = 0; y < 4; y++) { + for (std::size_t x = 0; x < 4; x++) + os << " | " << m[y][x]; - os << " |" << std::endl; - } - - return os; + os << " |" << std::endl; } - std::wostream &operator<<(std::wostream &os, const Matrix4x4 &m) { - os << std::endl; + return os; + } - for (std::size_t y = 0; y < 4; y++) { - for (std::size_t x = 0; x < 4; x++) - os << L" | " << m[y][x]; + std::wostream &operator<<(std::wostream &os, const Matrix4x4 &m) { + os << std::endl; - os << L" |" << std::endl; - } + for (std::size_t y = 0; y < 4; y++) { + for (std::size_t x = 0; x < 4; x++) + os << L" | " << m[y][x]; - return os; + os << L" |" << std::endl; } + + return os; } } diff --git a/Test/Math__Abs.cpp b/Test/Math__Abs.cpp index c954560..bd2c102 100644 --- a/Test/Math__Abs.cpp +++ b/Test/Math__Abs.cpp @@ -1,7 +1,7 @@ #include "Catch2.h" #include -using namespace Eule; +using namespace Leonetienne::Eule; /** Equivalence classes: * -- value > 0 diff --git a/Test/Math__Clamp.cpp b/Test/Math__Clamp.cpp index 7aaa34c..fa559c1 100644 --- a/Test/Math__Clamp.cpp +++ b/Test/Math__Clamp.cpp @@ -1,7 +1,7 @@ #include "Catch2.h" #include -using namespace Eule; +using namespace Leonetienne::Eule; /** Equivalence classes: * -- min < v < max -> v diff --git a/Test/Math__Lerp.cpp b/Test/Math__Lerp.cpp index 9d443f8..f31a4f4 100644 --- a/Test/Math__Lerp.cpp +++ b/Test/Math__Lerp.cpp @@ -1,7 +1,7 @@ #include "Catch2.h" #include -using namespace Eule; +using namespace Leonetienne::Eule; /** Equivalence classes: * -- a < b, 0 < t < 1 -> a < result < b diff --git a/Test/Math__Max.cpp b/Test/Math__Max.cpp index a7ddb53..37ff6e8 100644 --- a/Test/Math__Max.cpp +++ b/Test/Math__Max.cpp @@ -1,7 +1,7 @@ #include "Catch2.h" #include -using namespace Eule; +using namespace Leonetienne::Eule; /** Equivalence classes: * -- a < b diff --git a/Test/Math__Min.cpp b/Test/Math__Min.cpp index 68ac59b..f7ddf17 100644 --- a/Test/Math__Min.cpp +++ b/Test/Math__Min.cpp @@ -1,7 +1,7 @@ #include "Catch2.h" #include -using namespace Eule; +using namespace Leonetienne::Eule; /** Equivalence classes: * -- min < v < max diff --git a/Test/Math__Mod.cpp b/Test/Math__Mod.cpp index 4bb832d..2acd350 100644 --- a/Test/Math__Mod.cpp +++ b/Test/Math__Mod.cpp @@ -2,7 +2,7 @@ #include #include -using namespace Eule; +using namespace Leonetienne::Eule; /** Equivalence classes: * a -> numerator diff --git a/Test/Math__Oscillate.cpp b/Test/Math__Oscillate.cpp index 959f9cf..f92aa3d 100644 --- a/Test/Math__Oscillate.cpp +++ b/Test/Math__Oscillate.cpp @@ -4,7 +4,7 @@ #include #include -using namespace Eule; +using namespace Leonetienne::Eule; // Checks that an oscillation of speed 1 between -1 and 1 is just equal to sin(counter*pi-pi/2) TEST_CASE(__FILE__"/Oracle_Sin", "[Math][Oscillate]") diff --git a/Test/Math__Similar.cpp b/Test/Math__Similar.cpp index df3e849..68b027d 100644 --- a/Test/Math__Similar.cpp +++ b/Test/Math__Similar.cpp @@ -1,7 +1,7 @@ #include "Catch2.h" #include -using namespace Eule; +using namespace Leonetienne::Eule; // Checks that the similar function works with an exact comparison -> true TEST_CASE(__FILE__"/Exact_Comparison_True", "[Math][Similar]") diff --git a/Test/Matrix4x4.cpp b/Test/Matrix4x4.cpp index a0d3a73..95b758b 100644 --- a/Test/Matrix4x4.cpp +++ b/Test/Matrix4x4.cpp @@ -4,7 +4,7 @@ #include "../_TestingUtilities/HandyMacros.h" #include -using namespace Eule; +using namespace Leonetienne::Eule; namespace { static std::mt19937 rng = std::mt19937((std::random_device())()); diff --git a/Test/Quaternion.cpp b/Test/Quaternion.cpp index 61b3124..9155b79 100644 --- a/Test/Quaternion.cpp +++ b/Test/Quaternion.cpp @@ -5,7 +5,7 @@ #include #include -using namespace Eule; +using namespace Leonetienne::Eule; namespace { static std::mt19937 rng = std::mt19937((std::random_device())()); diff --git a/Test/Random_RandomIntRange.cpp b/Test/Random_RandomIntRange.cpp index 0514c7c..1d23d8b 100644 --- a/Test/Random_RandomIntRange.cpp +++ b/Test/Random_RandomIntRange.cpp @@ -4,7 +4,7 @@ #include #include -using namespace Eule; +using namespace Leonetienne::Eule; // Checks that a random integer is never outside the specification, two positive values TEST_CASE(__FILE__"/Never_Outside_Specification__pos__pos", "[Random][RandomIntRange]") diff --git a/Test/Random__RandomFloat.cpp b/Test/Random__RandomFloat.cpp index a1ad36d..266a2d5 100644 --- a/Test/Random__RandomFloat.cpp +++ b/Test/Random__RandomFloat.cpp @@ -1,7 +1,7 @@ #include "Catch2.h" #include -using namespace Eule; +using namespace Leonetienne::Eule; // Checks that all values are always 0 <= v <= 1 TEST_CASE(__FILE__"/Always_Satisfies_0_lt_v_lt_1", "[Random][RandomFloat]") diff --git a/Test/Random__RandomInteger.cpp b/Test/Random__RandomInteger.cpp index a3a3a8c..c511309 100644 --- a/Test/Random__RandomInteger.cpp +++ b/Test/Random__RandomInteger.cpp @@ -3,7 +3,7 @@ #include #include -using namespace Eule; +using namespace Leonetienne::Eule; // Checks that the produced unsigned-integer distribution shows a big standard deviation TEST_CASE(__FILE__"/Uint_Big_Standard_Deviation", "[Random][RandomInt]") diff --git a/Test/Random__RandomRange.cpp b/Test/Random__RandomRange.cpp index ee26630..536a879 100644 --- a/Test/Random__RandomRange.cpp +++ b/Test/Random__RandomRange.cpp @@ -3,7 +3,7 @@ #include #include -using namespace Eule; +using namespace Leonetienne::Eule; // Checks that a random double is never outside the specification, two positive values TEST_CASE(__FILE__"/Random_Doublerange_Never_Outside_Specification__pos__pos", "[Random][RandomRange]") diff --git a/Test/TrapazoidalPrismCollider.cpp b/Test/TrapazoidalPrismCollider.cpp index e7e4785..fb96595 100644 --- a/Test/TrapazoidalPrismCollider.cpp +++ b/Test/TrapazoidalPrismCollider.cpp @@ -4,7 +4,7 @@ #include #include -using namespace Eule; +using namespace Leonetienne::Eule; using TPC = TrapazoidalPrismCollider; namespace { diff --git a/Test/Vector2.cpp b/Test/Vector2.cpp index 1da2893..4ab1753 100644 --- a/Test/Vector2.cpp +++ b/Test/Vector2.cpp @@ -5,7 +5,7 @@ #include #include -using namespace Eule; +using namespace Leonetienne::Eule; namespace { static std::mt19937 rng = std::mt19937((std::random_device())()); diff --git a/Test/Vector3.cpp b/Test/Vector3.cpp index 661af82..71102bc 100644 --- a/Test/Vector3.cpp +++ b/Test/Vector3.cpp @@ -4,7 +4,7 @@ #include "../_TestingUtilities/HandyMacros.h" #include -using namespace Eule; +using namespace Leonetienne::Eule; namespace { static std::mt19937 rng = std::mt19937((std::random_device())()); diff --git a/Test/Vector4.cpp b/Test/Vector4.cpp index 7727a0e..4ff6519 100644 --- a/Test/Vector4.cpp +++ b/Test/Vector4.cpp @@ -5,7 +5,7 @@ #include <_TestingUtilities/HandyMacros.h> #include -using namespace Eule; +using namespace Leonetienne::Eule; namespace { static std::mt19937 rng = std::mt19937((std::random_device())()); diff --git a/Test/VectorConversion.cpp b/Test/VectorConversion.cpp index c383d7b..60ee35e 100644 --- a/Test/VectorConversion.cpp +++ b/Test/VectorConversion.cpp @@ -6,7 +6,7 @@ #include #include -using namespace Eule; +using namespace Leonetienne::Eule; namespace { static std::mt19937 rng = std::mt19937((std::random_device())());