瀏覽代碼

test coverage

Michele Caini 7 年之前
父節點
當前提交
90197abc5c
共有 3 個文件被更改,包括 8 次插入2 次删除
  1. 1 0
      AUTHORS
  2. 5 1
      TODO
  3. 2 1
      test/entt/entity/registry.cpp

+ 1 - 0
AUTHORS

@@ -22,6 +22,7 @@ Milerius
 morbo84
 m-waka
 Kerndog73
+Paolo-Oliverio
 pgruenbacher
 prowolf
 vblanco20-1

+ 5 - 1
TODO

@@ -20,5 +20,9 @@
   - each components only return actual component, so shared components are returned only once
 * types defined at runtime that refer to the same compile-time type (but to different pools) are possible, the library is almost there
 * add take functionality, eg registry.take(entity, other); where it takes the entity and all its components from registry and move them to other
-* what about paged pools? vector of fixed-size blocks (ease shared components, multi-ownership, etc).
 * add entity function to views/groups (component -> owner, see sparse sets)
+
+* what about paged pools? vector of fixed-size blocks (ease shared components, multi-ownership, etc).
+  - still separate the three arrays, work with page size, not number of components, arrays don't have to have the same number of pages
+  - opaque input iterator that returns a proxy object (tuple of entity+references) and each can hide the underlying details about paging
+  - it can avoid [] most of the times, that annoying thing current it does and I dislike so much :-)

+ 2 - 1
test/entt/entity/registry.cpp

@@ -55,8 +55,9 @@ TEST(Registry, Context) {
     ASSERT_EQ(registry.try_ctx<double>(), nullptr);
 
     registry.set<char>('c');
-    registry.set<int>(42);
+    registry.set<int>(0);
     registry.set<double>(1.);
+    registry.set<int>(42);
 
     ASSERT_EQ(registry.ctx<char>(), 'c');
     ASSERT_NE(registry.try_ctx<char>(), nullptr);