* sparse_set: added optional user data to ::remove and ::clear
* sparse_set: remove the payload, it was really meh
* storage: review sigh_storage_mixin, simplified storage_adapter_mixin
* registry: pass itself twhen adding/patchin/removing components

test: updated tests for sparse set and poly storage
examples: added a test to avoid regressions on storage_adapter_mixin
This commit is contained in:
Michele Caini
2021-02-22 14:32:29 +01:00
parent c6a2ed78c3
commit bb1acee36a
7 changed files with 165 additions and 112 deletions

View File

@@ -14,12 +14,6 @@ struct boxed_int { int value; };
TEST(SparseSet, Functionalities) {
entt::sparse_set set;
ASSERT_EQ(set.payload(), nullptr);
set.payload(&set);
ASSERT_EQ(set.payload(), &set);
set.reserve(42);
ASSERT_EQ(set.capacity(), 42u);
@@ -84,8 +78,6 @@ TEST(SparseSet, Functionalities) {
ASSERT_EQ(other.begin(), other.end());
ASSERT_FALSE(other.contains(entt::entity{0}));
ASSERT_FALSE(other.contains(entt::entity{42}));
ASSERT_EQ(set.payload(), &set);
}
TEST(SparseSet, Pagination) {