tests + bug fixing

This commit is contained in:
Michele Caini
2018-05-23 12:28:10 +02:00
parent ff935efea1
commit c45de0c032
2 changed files with 8 additions and 1 deletions

View File

@@ -440,10 +440,12 @@ public:
const auto other = create();
for(auto pos = pools.size(); pos; --pos) {
auto &cpool = std::get<0>(pools[pos-1]);
auto &tup = pools[pos-1];
auto &cpool = std::get<0>(tup);
if(cpool && cpool->has(entity)) {
cpool->clone(other, entity);
std::get<1>(tup).publish(*this, other);
}
}

View File

@@ -719,6 +719,11 @@ TEST(DefaultRegistry, ComponentSignals) {
ASSERT_EQ(listener.counter, 1);
ASSERT_EQ(listener.last, e1);
e1 = registry.clone(e0);
ASSERT_EQ(listener.counter, 2);
ASSERT_EQ(listener.last, e1);
}
TEST(DefaultRegistry, TagSignals) {