Namespacified tests aswell

This commit is contained in:
Leonetienne 2022-03-06 20:05:34 +01:00
parent be63652df6
commit da18c59969
20 changed files with 35 additions and 37 deletions

View File

@ -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;
}
}

View File

@ -1,7 +1,7 @@
#include "Catch2.h"
#include <Eule/Math.h>
using namespace Eule;
using namespace Leonetienne::Eule;
/** Equivalence classes:
* -- value > 0

View File

@ -1,7 +1,7 @@
#include "Catch2.h"
#include <Eule/Math.h>
using namespace Eule;
using namespace Leonetienne::Eule;
/** Equivalence classes:
* -- min < v < max -> v

View File

@ -1,7 +1,7 @@
#include "Catch2.h"
#include <Eule/Math.h>
using namespace Eule;
using namespace Leonetienne::Eule;
/** Equivalence classes:
* -- a < b, 0 < t < 1 -> a < result < b

View File

@ -1,7 +1,7 @@
#include "Catch2.h"
#include <Eule/Math.h>
using namespace Eule;
using namespace Leonetienne::Eule;
/** Equivalence classes:
* -- a < b

View File

@ -1,7 +1,7 @@
#include "Catch2.h"
#include <Eule/Math.h>
using namespace Eule;
using namespace Leonetienne::Eule;
/** Equivalence classes:
* -- min < v < max

View File

@ -2,7 +2,7 @@
#include <Eule/Math.h>
#include <stdexcept>
using namespace Eule;
using namespace Leonetienne::Eule;
/** Equivalence classes:
* a -> numerator

View File

@ -4,7 +4,7 @@
#include <Eule/Math.h>
#include <Eule/Constants.h>
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]")

View File

@ -1,7 +1,7 @@
#include "Catch2.h"
#include <Eule/Math.h>
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]")

View File

@ -4,7 +4,7 @@
#include "../_TestingUtilities/HandyMacros.h"
#include <random>
using namespace Eule;
using namespace Leonetienne::Eule;
namespace {
static std::mt19937 rng = std::mt19937((std::random_device())());

View File

@ -5,7 +5,7 @@
#include <random>
#include <sstream>
using namespace Eule;
using namespace Leonetienne::Eule;
namespace {
static std::mt19937 rng = std::mt19937((std::random_device())());

View File

@ -4,7 +4,7 @@
#include <array>
#include <sstream>
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]")

View File

@ -1,7 +1,7 @@
#include "Catch2.h"
#include <Eule/Random.h>
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]")

View File

@ -3,7 +3,7 @@
#include <Eule/Random.h>
#include <array>
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]")

View File

@ -3,7 +3,7 @@
#include <Eule/Random.h>
#include <array>
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]")

View File

@ -4,7 +4,7 @@
#include <random>
#include <array>
using namespace Eule;
using namespace Leonetienne::Eule;
using TPC = TrapazoidalPrismCollider;
namespace {

View File

@ -5,7 +5,7 @@
#include <random>
#include <sstream>
using namespace Eule;
using namespace Leonetienne::Eule;
namespace {
static std::mt19937 rng = std::mt19937((std::random_device())());

View File

@ -4,7 +4,7 @@
#include "../_TestingUtilities/HandyMacros.h"
#include <random>
using namespace Eule;
using namespace Leonetienne::Eule;
namespace {
static std::mt19937 rng = std::mt19937((std::random_device())());

View File

@ -5,7 +5,7 @@
#include <_TestingUtilities/HandyMacros.h>
#include <random>
using namespace Eule;
using namespace Leonetienne::Eule;
namespace {
static std::mt19937 rng = std::mt19937((std::random_device())());

View File

@ -6,7 +6,7 @@
#include <random>
#include <sstream>
using namespace Eule;
using namespace Leonetienne::Eule;
namespace {
static std::mt19937 rng = std::mt19937((std::random_device())());