Lua tests (#158)

* Fix float comparison in tests

* Lua tests
This commit is contained in:
Gawaboumga
2018-01-31 15:27:23 +01:00
committed by Jérôme Leclercq
parent 7c1ffea19c
commit dfd28160a0
9 changed files with 595 additions and 5 deletions

View File

@@ -89,7 +89,7 @@ SCENARIO("PhysicsSystem2D", "[NDK][PHYSICSSYSTEM2D]")
THEN("It should have been rotated")
{
CHECK(physicsComponent2D.GetAngularVelocity() == angularSpeed);
CHECK(physicsComponent2D.GetAngularVelocity() == Approx(angularSpeed));
CHECK(physicsComponent2D.GetAABB() == Nz::Rectf(-2.f, 0.f, 2.f, 1.f));
CHECK(physicsComponent2D.GetRotation() == Approx(Nz::FromDegrees(90.f)));
CHECK(nodeComponent.GetRotation().ToEulerAngles().roll == Approx(Nz::FromDegrees(90.f)));