noexcept destroy

This commit is contained in:
2019-04-10 17:54:50 +07:00
parent e3358ee2e6
commit cb3272d0dc
2 changed files with 69 additions and 68 deletions

View File

@@ -405,11 +405,15 @@ TEST_CASE("registry") {
ecs::registry w;
using namespace ecs::detail;
std::vector<ecs::entity> entities;
for ( std::size_t i = 0; i < entity_id_index_mask; ++i ) {
w.create_entity();
entities.push_back(w.create_entity());
}
// entity index overflow
REQUIRE_THROWS_AS(w.create_entity(), std::logic_error);
for ( auto& ent : entities ) {
ent.destroy();
}
}
{
ecs::registry w;