From 90197abc5c06067050dd84e849fe510b1407e793 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 25 Mar 2019 16:39:57 +0100 Subject: [PATCH] test coverage --- AUTHORS | 1 + TODO | 6 +++++- test/entt/entity/registry.cpp | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 8e3d354d0..ef39ca464 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,6 +22,7 @@ Milerius morbo84 m-waka Kerndog73 +Paolo-Oliverio pgruenbacher prowolf vblanco20-1 diff --git a/TODO b/TODO index e9f140e48..d8deabc03 100644 --- a/TODO +++ b/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 :-) diff --git a/test/entt/entity/registry.cpp b/test/entt/entity/registry.cpp index 14049e4c7..115e9fbc1 100644 --- a/test/entt/entity/registry.cpp +++ b/test/entt/entity/registry.cpp @@ -55,8 +55,9 @@ TEST(Registry, Context) { ASSERT_EQ(registry.try_ctx(), nullptr); registry.set('c'); - registry.set(42); + registry.set(0); registry.set(1.); + registry.set(42); ASSERT_EQ(registry.ctx(), 'c'); ASSERT_NE(registry.try_ctx(), nullptr);