Header include fixes and implementation of more unit tests.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <J3ML/Geometry/AABB2D.h>
|
||||
#include <J3ML/Geometry/AABB2D.hpp>
|
||||
#include <J3ML/Geometry/Plane.h>
|
||||
#include <J3ML/Geometry/Sphere.h>
|
||||
#include <J3ML/Geometry/Line.h>
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <J3ML/Geometry/Frustum.h>
|
||||
#include <J3ML/Geometry/OBB.h>
|
||||
#include <J3ML/Geometry/Capsule.h>
|
||||
#include <J3ML/Geometry/AABB.h>
|
||||
#include <J3ML/Geometry/AABB.hpp>
|
||||
#include <J3ML/Geometry/Polyhedron.h>
|
||||
#include <J3ML/Geometry/QuadTree.h>
|
||||
#include <J3ML/Geometry/Ray.h>
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <J3ML/Geometry/Triangle.h>
|
||||
#include <J3ML/Geometry/Triangle2D.h>
|
||||
#include <J3ML/Geometry/TriangleMesh.h>
|
||||
#include <J3ML/Geometry/PBVolume.hpp>
|
||||
|
||||
#include <J3ML/Geometry/KDTree.h>
|
||||
|
||||
|
@@ -22,6 +22,9 @@ namespace J3ML::Geometry
|
||||
class Triangle;
|
||||
class Triangle2D;
|
||||
class TriangleMesh;
|
||||
|
||||
template <int N> class PBVolume;
|
||||
|
||||
}
|
||||
|
||||
// Methods required by Geometry types
|
||||
|
@@ -19,6 +19,8 @@ namespace J3ML::LinearAlgebra
|
||||
|
||||
|
||||
using Position = Vector3;
|
||||
|
||||
template <int N> class PBVolume;
|
||||
}
|
||||
|
||||
// Methods required by LinearAlgebra types
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include <J3ML/Algorithm/Bezier.h>
|
||||
#include <J3ML/Algorithm/Bezier.hpp>
|
||||
|
||||
namespace J3ML::Algorithm
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include <J3ML/Algorithm/GJK.h>
|
||||
#include <J3ML/Algorithm/GJK.hpp>
|
||||
|
||||
#include <J3ML/Geometry.h>
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include <J3ML/Algorithm/RNG.h>
|
||||
#include <J3ML/Algorithm/RNG.hpp>
|
||||
#include <stdexcept>
|
||||
#include <cassert>
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include <J3ML/Geometry/AABB2D.h>
|
||||
#include <J3ML/Geometry/AABB2D.hpp>
|
||||
|
||||
namespace J3ML::Geometry
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include <J3ML/Algorithm/GJK.h>
|
||||
#include <J3ML/Algorithm/GJK.hpp>
|
||||
#include <J3ML/Geometry/Capsule.h>
|
||||
#include <J3ML/Geometry/AABB.h>
|
||||
#include <J3ML/Geometry/AABB.hpp>
|
||||
#include <J3ML/Geometry/Sphere.h>
|
||||
#include <J3ML/Geometry/Polygon.h>
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include <J3ML/Algorithm/RNG.h>
|
||||
#include <J3ML/Algorithm/RNG.hpp>
|
||||
#include <jtest/jtest.hpp>
|
||||
using J3ML::Algorithm::RNG;
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <J3ML/Geometry/Common.h>
|
||||
#include <jtest/jtest.hpp>
|
||||
using J3ML::Geometry::Interval;
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user