explicit entity and component ctors

This commit is contained in:
2019-10-15 13:27:49 +07:00
parent 67fc2054a4
commit 1f5d08a675
2 changed files with 33 additions and 14 deletions

View File

@@ -435,6 +435,15 @@ TEST_CASE("registry") {
}
}
SECTION("components") {
{
ecs::registry w;
ecs::entity e{w};
ecs::component<position_c> c1{e};
ecs::const_component<velocity_c> c2{e};
REQUIRE_FALSE(e.valid());
REQUIRE_FALSE(c1.valid());
REQUIRE_FALSE(c2.valid());
}
{
ecs::registry w;
ecs::entity e1 = w.create_entity();