浏览代码

test: minor changes

Michele Caini 2 年之前
父节点
当前提交
5f9e4344ba
共有 1 个文件被更改,包括 11 次插入 和 0 次删除
  1. 11 0
      test/entt/entity/sigh_mixin.cpp

+ 11 - 0
test/entt/entity/sigh_mixin.cpp

@@ -122,6 +122,17 @@ TEST(SighMixin, StableType) {
     std::size_t on_destroy{};
 
     pool.bind(entt::forward_as_any(registry));
+
+    ASSERT_EQ(pool.size(), 0u);
+
+    pool.insert(entity.begin(), entity.begin() + 1u);
+    pool.erase(entity[0u]);
+
+    ASSERT_EQ(pool.size(), 1u);
+
+    ASSERT_EQ(on_construct, 0u);
+    ASSERT_EQ(on_destroy, 0u);
+
     pool.on_construct().connect<&listener<entt::registry>>(on_construct);
     pool.on_destroy().connect<&listener<entt::registry>>(on_destroy);