diff --git a/tests/CollisionTest.cpp b/tests/CollisionTest.cpp index 7d296203..69c75207 100644 --- a/tests/CollisionTest.cpp +++ b/tests/CollisionTest.cpp @@ -31,7 +31,7 @@ TEST_CASE("Collision test", "[Component][System]") pos.position.y = 1; pos.position.z = 1; } catch (std::exception &e) {}; - }, 5.0); + }, [](Entity &, const Entity &){}, 5.0); Entity &entity = wal.scene->getEntities()[0]; REQUIRE(entity.getComponent().position == Vector3f()); @@ -68,17 +68,17 @@ TEST_CASE("Collsion test with movable", "[Component][System]") wal.scene = std::shared_ptr(new Scene); wal.scene->addEntity("player") .addComponent() - .addComponent([](Entity &actual, const Entity &) { - try { - auto &mov = actual.getComponent(); - mov._velocity = {0, 0, 0}; - } catch (std::exception &e) {}; - }, 5.0) + .addComponent([](Entity &actual, const Entity &) {}, [](Entity &actual, const Entity &) {}, 5.0) .addComponent(); wal.scene->addEntity("block") .addComponent(0, 0, 0) - .addComponent(1); + .addComponent([](Entity &actual, const Entity &){}, [](Entity &actual, const Entity &) { + try { + auto &mov = actual.getComponent(); + mov.resetVelocity(); + } catch (std::exception &e) {}; + }, 1); Entity &entity = wal.scene->getEntities()[0]; REQUIRE(entity.getComponent().position == Vector3f());