Files
j3ml/tests/tests.cpp
josh 51d51a9cc7
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m2s
Build Docs With Doxygen / Explore-Gitea-Actions (push) Successful in 26s
Add AxisAngle members and fill out more unit tests.
2025-03-03 23:33:03 -05:00

144 lines
3.0 KiB
C++

/// Josh's 3D Math Library
/// A C++20 Library for 3D Math, Computer Graphics, and Scientific Computing.
/// Developed and Maintained by Josh O'Leary @ Redacted Software.
/// Special Thanks to William Tomasine II and Maxine Hayes.
/// (c) 2024 Redacted Software
/// This work is dedicated to the public domain.
/// @file tests.cpp
/// @desc Includes and runs all project unit tests.
/// @edit 2024-07-06
#include "Algorithm/RNGTests.hpp"
#include "Geometry/CommonGeometryTests.hpp"
#include "Geometry/TriangleTests.hpp"
#include "Geometry/AABBTests.hpp"
#include "Geometry/FrustumTests.hpp"
#include "LinearAlgebra/AxisAngleTests.hpp"
#include "LinearAlgebra/Matrix2x2Tests.hpp"
#include "LinearAlgebra/Matrix3x3Tests.hpp"
#include "LinearAlgebra/Matrix4x4Tests.hpp"
#include "LinearAlgebra/Vector2Tests.hpp"
#include "LinearAlgebra/Vector3Tests.hpp"
#include "LinearAlgebra/Vector4Tests.hpp"
#include "LinearAlgebra/QuaternionTests.hpp"
#include "MathFuncTests.hpp"
// TODO: Fix this once Automatic Test Discovery is implemented in jtest
// TODO: Add test category blocks as feature to jtest
//void GeometryTests() {
//CommonGeometryTests();
//TriangleTests();
//AABBTests();
//FrustumTests();
//}
//void LinearAlgebraTests() {
//EulerAngleTests();
//Vector2Tests();
//Vector3Tests();
//Vector4Tests();
//QuaternionTests();
//Matrix2x2Tests();
//Matrix3x3Tests();
//Matrix4x4Tests();
//}
namespace AlgorithmTests
{
void Define()
{
RNGTests::Define();
}
void Run()
{
RNGTests::Run();
}
}
namespace LinearAlgebraTests
{
void Define()
{
Vector2Tests::Define();
Vector3Tests::Define();
Vector4Tests::Define();
AxisAngleTests::Define();
QuaternionTests::Define();
Matrix2x2Tests::Define();
Matrix3x3Tests::Define();
Matrix4x4Tests::Define();
}
void Run()
{
Vector2Tests::Run();
Vector3Tests::Run();
Vector4Tests::Run();
AxisAngleTests::Run();
QuaternionTests::Run();
Matrix2x2Tests::Run();
Matrix3x3Tests::Run();
Matrix4x4Tests::Run();
}
}
namespace GeometryTests
{
void Define()
{
CommonGeometryTests::Define();
TriangleTests::Define();
AABBTests::Define();
FrustumTests::Define();
}
void Run()
{
CommonGeometryTests::Run();
TriangleTests::Run();
AABBTests::Run();
FrustumTests::Run();
}
}
void DefineTests()
{
MathTests::Define();
AlgorithmTests::Define();
LinearAlgebraTests::Define();
GeometryTests::Define();
}
void RunTests()
{
MathTests::Run();
AlgorithmTests::Run();
LinearAlgebraTests::Run();
GeometryTests::Run();
}
int main(int argc, char** argv)
{
DefineTests();
RunTests();
return 0;
}
#ifdef __WIN32
extern "C" {
int wmain(int argc, wchar_t* argv[])
{
return main(argc, reinterpret_cast<char **>(argv));
}
};
#endif