AzCore Math tests produce errors that need to be disabled in debug (#6678)

* Tests produce errors that need to be disabled in debug

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* PR suggestion

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2022-01-05 16:07:52 -08:00
committed by GitHub
parent 01c5fb7817
commit 09fd52ef73
5 changed files with 41 additions and 6 deletions
@@ -15,6 +15,8 @@
#include <AzCore/Math/Obb.h>
#include <AzCore/Math/Aabb.h>
#include <Math/MathTest.h>
using namespace AZ;
namespace UnitTest
@@ -1409,13 +1411,17 @@ namespace UnitTest
script->Execute("AZTestAssertFloatClose(pl:GetNormal().y,-1)");
script->Execute("AZTestAssertFloatClose(pl:GetNormal().z,0)");
AZ_MATH_TEST_START_TRACE_SUPPRESSION;
script->Execute("pl:Set(12, 13, 14, 15)");
AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(1);
script->Execute("AZTestAssertFloatClose(pl:GetDistance(), 15)");
script->Execute("AZTestAssertFloatClose(pl:GetNormal().x, 12)");
script->Execute("AZTestAssertFloatClose(pl:GetNormal().y, 13)");
script->Execute("AZTestAssertFloatClose(pl:GetNormal().z, 14)");
AZ_MATH_TEST_START_TRACE_SUPPRESSION;
script->Execute("pl:Set(Vector3(22, 23, 24), 25)");
AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(1);
script->Execute("AZTestAssertFloatClose(pl:GetDistance(), 25)");
script->Execute("AZTestAssertFloatClose(pl:GetNormal().x, 22)");
script->Execute("AZTestAssertFloatClose(pl:GetNormal().y, 23)");
@@ -1493,7 +1499,9 @@ namespace UnitTest
script->Execute("pl:Set(1, 0, 0, 0)");
script->Execute("AZTestAssert(pl:IsFinite())");
AZ_MATH_TEST_START_TRACE_SUPPRESSION;
script->Execute("pl:Set(math.huge, math.huge, math.huge, math.huge)");
AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(1);
script->Execute("AZTestAssert( not pl:IsFinite())");
}