Fix unit tests

This commit is contained in:
Lynix 2019-04-03 22:15:53 +02:00
parent 5e724b9c04
commit 2f5e9e481b
2 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ SCENARIO("IpAddress", "[NETWORK][IPADDRESS]")
Nz::IpAddress google(8, 8, 8, 8); Nz::IpAddress google(8, 8, 8, 8);
THEN("Google (DNS) is 8.8.8.8") THEN("Google (DNS) is 8.8.8.8")
{ {
CHECK(Nz::IpAddress::ResolveAddress(google) == "dns.google"); CHECK(Nz::IpAddress::ResolveAddress(google) == "google-public-dns-a.google.com");
} }
} }
} }

View File

@ -90,17 +90,17 @@ SCENARIO("RenderSystem", "[NDK][RenderSystem]")
{ {
CHECK(physicsComponent2D.GetAngularVelocity() == angularSpeed); CHECK(physicsComponent2D.GetAngularVelocity() == angularSpeed);
CHECK(physicsComponent2D.GetRotation() == angularSpeed); CHECK(physicsComponent2D.GetRotation() == angularSpeed);
CHECK(physicsComponent2D.GetAABB() == Nz::Rectf(1.f, 4.f, 2.f, 1.f)); CHECK(physicsComponent2D.GetAABB() == Nz::Rectf(2.5f, 4.5f, 2.f, 1.f));
CompareAABB(physicsComponent2D.GetAABB(), graphicsComponent.GetAABB()); CompareAABB(physicsComponent2D.GetAABB(), graphicsComponent.GetAABB());
world.Update(1.f); world.Update(1.f);
CHECK(physicsComponent2D.GetRotation() == 2.f * angularSpeed); CHECK(physicsComponent2D.GetRotation() == 2.f * angularSpeed);
CHECK(physicsComponent2D.GetAABB() == Nz::Rectf(2.f, 2.f, 1.f, 2.f)); CHECK(physicsComponent2D.GetAABB() == Nz::Rectf(3.f, 4.0f, 1.f, 2.f));
CompareAABB(physicsComponent2D.GetAABB(), graphicsComponent.GetAABB()); CompareAABB(physicsComponent2D.GetAABB(), graphicsComponent.GetAABB());
world.Update(1.f); world.Update(1.f);
CHECK(physicsComponent2D.GetRotation() == 3.f * angularSpeed); CHECK(physicsComponent2D.GetRotation() == 3.f * angularSpeed);
CHECK(physicsComponent2D.GetAABB() == Nz::Rectf(3.f, 3.f, 2.f, 1.f)); CHECK(physicsComponent2D.GetAABB() == Nz::Rectf(2.5f, 4.5f, 2.f, 1.f));
CompareAABB(physicsComponent2D.GetAABB(), graphicsComponent.GetAABB()); CompareAABB(physicsComponent2D.GetAABB(), graphicsComponent.GetAABB());
world.Update(1.f); world.Update(1.f);