Files
XCEngine/tests/fixtures/MathFixtures.h
ssdfasd d575532966 docs: update TEST_SPEC.md and README.md to reflect new directory structure
- TEST_SPEC.md: Updated test directory structure to reflect Core/Asset,
  Core/IO, and Resources/<Type> subdirectories
- TEST_SPEC.md: Updated module names and test counts (852 total)
- TEST_SPEC.md: Updated build commands for new Resources subdirectories
- README.md: Updated engine structure with Core/Asset/ and Core/IO/
- README.md: Updated Resources section with layered architecture
- README.md: Updated test coverage table with accurate counts
2026-03-24 16:14:05 +08:00

41 lines
1.1 KiB
C++

#pragma once
#include <gtest/gtest.h>
#include <XCEngine/Core/Math/Math.h>
namespace XCEngine {
namespace Math {
namespace Test {
constexpr float TEST_EPSILON = 1e-5f;
constexpr double TEST_EPSILON_D = 1e-8;
class MathTest : public ::testing::Test {
protected:
void SetUp() override {
v1 = Vector3(1.0f, 0.0f, 0.0f);
v2 = Vector3(0.0f, 1.0f, 0.0f);
v3 = Vector3(0.0f, 0.0f, 1.0f);
v4 = Vector3(1.0f, 1.0f, 1.0f);
vZero = Vector3::Zero();
vOne = Vector3::One();
mIdentity = Matrix4x4::Identity();
mTranslation = Matrix4x4::Translation(Vector3(1.0f, 2.0f, 3.0f));
mScale = Matrix4x4::Scale(Vector3(2.0f, 2.0f, 2.0f));
qIdentity = Quaternion::Identity();
qRotationX = Quaternion::FromAxisAngle(Vector3::Right(), Math::PI * 0.5f);
qRotationY = Quaternion::FromAxisAngle(Vector3::Up(), Math::PI * 0.5f);
}
Vector3 v1, v2, v3, v4;
Vector3 vZero, vOne;
Matrix4x4 mIdentity, mTranslation, mScale;
Quaternion qIdentity, qRotationX, qRotationY;
};
} // namespace Test
} // namespace Math
} // namespace XCEngine