updated docs + added reset<Component> to the registry

This commit is contained in:
Michele Caini
2017-04-07 09:32:35 +02:00
parent 70f5ad250b
commit 67e41e79f6
5 changed files with 63 additions and 22 deletions

View File

@@ -148,5 +148,18 @@ TEST(ComponentPool, EntitiesReset) {
ASSERT_EQ(pool.entities<int>()[1], typename pool_type::entity_type{1});
ASSERT_EQ(pool.entities<int>()[2], typename pool_type::entity_type{3});
ASSERT_EQ(pool.construct<char>(0, 'c'), 'c');
ASSERT_FALSE(pool.empty<int>());
ASSERT_FALSE(pool.empty<char>());
ASSERT_NO_THROW(pool.reset<char>());
ASSERT_FALSE(pool.empty<int>());
ASSERT_TRUE(pool.empty<char>());
ASSERT_NO_THROW(pool.reset());
ASSERT_TRUE(pool.empty<int>());
ASSERT_TRUE(pool.empty<char>());
}