|
|
@@ -298,6 +298,9 @@ TEST(BasicHandle, HandleStorageIterator) {
|
|
|
const auto entity = registry.create();
|
|
|
|
|
|
registry.emplace<int>(entity);
|
|
|
+ registry.emplace<double>(entity);
|
|
|
+ // required to test the find-first initialization step
|
|
|
+ registry.storage<entt::entity>().erase(entity);
|
|
|
|
|
|
auto test = [](auto iterable) {
|
|
|
auto end{iterable.begin()};
|
|
|
@@ -313,6 +316,13 @@ TEST(BasicHandle, HandleStorageIterator) {
|
|
|
ASSERT_EQ(++begin, iterable.end());
|
|
|
};
|
|
|
|
|
|
- test(entt::handle{registry, entity}.storage());
|
|
|
- test(entt::const_handle{std::as_const(registry), entity}.storage());
|
|
|
+ const auto handle = entt::handle{registry, entity};
|
|
|
+ const auto chandle = entt::const_handle{std::as_const(registry), entity};
|
|
|
+
|
|
|
+ ASSERT_FALSE(registry.valid(entity));
|
|
|
+ ASSERT_FALSE(handle);
|
|
|
+ ASSERT_FALSE(chandle);
|
|
|
+
|
|
|
+ test(handle.storage());
|
|
|
+ test(chandle.storage());
|
|
|
}
|