test coverage

This commit is contained in:
Michele Caini
2019-03-25 16:39:57 +01:00
parent 2147436a2a
commit 90197abc5c
3 changed files with 8 additions and 2 deletions

View File

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

6
TODO
View File

@@ -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 :-)

View File

@@ -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);