Add tests and SDK
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <NazaraSDK/Components/CollisionComponent2D.hpp>
|
||||
#include <NazaraSDK/Components/NodeComponent.hpp>
|
||||
#include <NazaraSDK/Components/PhysicsComponent2D.hpp>
|
||||
#include <NazaraSDK/Systems/PhysicsSystem2D.hpp>
|
||||
#include <Catch/catch.hpp>
|
||||
#include <limits>
|
||||
|
||||
@@ -13,6 +14,7 @@ SCENARIO("PhysicsSystem2D", "[NDK][PHYSICSSYSTEM2D]")
|
||||
GIVEN("A world and an entity")
|
||||
{
|
||||
Ndk::World world;
|
||||
world.AddSystem<Ndk::PhysicsSystem2D>();
|
||||
|
||||
Nz::Vector2f position(2.f, 3.f);
|
||||
Nz::Rectf movingAABB(0.f, 0.f, 16.f, 18.f);
|
||||
@@ -74,6 +76,7 @@ SCENARIO("PhysicsSystem2D", "[NDK][PHYSICSSYSTEM2D]")
|
||||
GIVEN("A world and a simple entity")
|
||||
{
|
||||
Ndk::World world;
|
||||
world.AddSystem<Ndk::PhysicsSystem2D>();
|
||||
|
||||
Nz::Vector2f position(0.f, 0.f);
|
||||
Nz::Rectf movingAABB(0.f, 0.f, 1.f, 2.f);
|
||||
@@ -120,6 +123,7 @@ SCENARIO("PhysicsSystem2D", "[NDK][PHYSICSSYSTEM2D]")
|
||||
GIVEN("A world and a simple entity not at the origin")
|
||||
{
|
||||
Ndk::World world;
|
||||
world.AddSystem<Ndk::PhysicsSystem2D>();
|
||||
|
||||
Nz::Vector2f position(3.f, 4.f);
|
||||
Nz::Rectf movingAABB(0.f, 0.f, 1.f, 2.f);
|
||||
|
||||
Reference in New Issue
Block a user