mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-27 00:06:49 +00:00
Creating a basic view
This commit is contained in:
+2
-3
@@ -18,8 +18,7 @@ using namespace BBM;
|
||||
|
||||
TEST_CASE("View creation", "[View]")
|
||||
{
|
||||
Wal wal;
|
||||
Scene scene(wal);
|
||||
Scene scene;
|
||||
scene.addEntity("player")
|
||||
.addComponent<PositionComponent>()
|
||||
.addComponent<ControllableComponent>();
|
||||
@@ -28,6 +27,6 @@ TEST_CASE("View creation", "[View]")
|
||||
REQUIRE(scene.view<PositionComponent>().size() == 2);
|
||||
REQUIRE(scene.view<PositionComponent, ControllableComponent>().size() == 1);
|
||||
Entity &entity = *scene.getEntities().begin();
|
||||
Entity &firstView = *scene.view<PositionComponent, ControllableComponent>().begin();
|
||||
Entity &firstView = *scene.view<PositionComponent, ControllableComponent>().entities.begin();
|
||||
REQUIRE(&entity == &firstView);
|
||||
}
|
||||
Reference in New Issue
Block a user