Header include fixes and implementation of more unit tests.

This commit is contained in:
2024-07-10 14:16:51 -04:00
parent 926defe7bb
commit 62aeb36628
11 changed files with 53 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
#include <J3ML/Algorithm/RNG.h>
#include <J3ML/Algorithm/RNG.hpp>
#include <jtest/jtest.hpp>
using J3ML::Algorithm::RNG;

View File

@@ -1,3 +1,5 @@
#pragma once
#include <J3ML/Geometry/Common.h>
#include <jtest/jtest.hpp>
using J3ML::Geometry::Interval;

View File

@@ -1,6 +1,23 @@
/// 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/Geometry.hpp"
#include "Geometry/TriangleTests.hpp"
#include "Geometry/AABBTests.hpp"
#include "Geometry/FrustumTests.hpp"
#include "LinearAlgebra/EulerAngleTests.hpp"
#include "LinearAlgebra/Matrix2x2Tests.hpp"
#include "LinearAlgebra/Matrix3x3Tests.hpp"
@@ -10,20 +27,27 @@
#include "LinearAlgebra/Vector4Tests.hpp"
#include "LinearAlgebra/QuaternionTests.hpp"
// TODO: Fix this once Automatic Test Discovery is implemented in jtest
#include "MathFuncTests.hpp"
int AlgorithmTests() {
RNGTests();
return 0;
// TODO: Fix this once Automatic Test Discovery is implemented in jtest
// TODO: Add test category blocks as feature to jtest
void MiscTests() {
MathFuncTests();
}
int GeometryTests() {
void AlgorithmTests() {
RNGTests();
}
void GeometryTests() {
CommonGeometryTests();
TriangleTests();
return 0;
AABBTests();
FrustumTests();
}
int LinearAlgebraTests() {
void LinearAlgebraTests() {
EulerAngleTests();
Vector2Tests();
Vector3Tests();
@@ -32,19 +56,17 @@ int LinearAlgebraTests() {
Matrix2x2Tests();
Matrix3x3Tests();
Matrix4x4Tests();
return 0;
}
int MiscTests() {
return 0;
}
int main(int argc, char** argv)
{
AlgorithmTests();
LinearAlgebraTests();
//MiscTests();
//AlgorithmTests();
//LinearAlgebraTests();
GeometryTests();
MiscTests();
jtest::run_tests();