From 247abef1d75014f8b3d89772fdf1aeceb2c009fe Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 8 Jun 2023 09:47:40 +0200 Subject: [PATCH] test: rollback for code coverage purposes on the snapshot class --- test/entt/entity/snapshot.cpp | 184 +++++++++++++++++----------------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/test/entt/entity/snapshot.cpp b/test/entt/entity/snapshot.cpp index 3a4bbdd30..8a94133ce 100644 --- a/test/entt/entity/snapshot.cpp +++ b/test/entt/entity/snapshot.cpp @@ -510,12 +510,12 @@ TEST(Snapshot, Dump) { input_archive input{storage}; entt::snapshot{registry} - .get(output) - .get(output) - .get(output) - .get(output) - .get(output) - .get(output); + .entities(output) + .component(output) + .component(output) + .component(output) + .component(output) + .component(output); registry.clear(); @@ -525,12 +525,12 @@ TEST(Snapshot, Dump) { ASSERT_FALSE(registry.valid(e3)); entt::snapshot_loader{registry} - .get(input) - .get(input) - .get(input) - .get(input) - .get(input) - .get(input) + .entities(input) + .component(input) + .component(input) + .component(input) + .component(input) + .component(input) .orphans(); ASSERT_TRUE(registry.valid(e0)); @@ -586,9 +586,9 @@ TEST(Snapshot, Partial) { input_archive input{storage}; entt::snapshot{registry} - .get(output) - .get(output) - .get(output); + .entities(output) + .component(output) + .component(output); registry.clear(); @@ -598,9 +598,9 @@ TEST(Snapshot, Partial) { ASSERT_FALSE(registry.valid(e3)); entt::snapshot_loader{registry} - .get(input) - .get(input) - .get(input); + .entities(input) + .component(input) + .component(input); ASSERT_TRUE(registry.valid(e0)); ASSERT_FALSE(registry.valid(e1)); @@ -615,7 +615,7 @@ TEST(Snapshot, Partial) { ASSERT_EQ(registry.get(e3), '0'); entt::snapshot{registry} - .get(output); + .entities(output); registry.clear(); @@ -625,7 +625,7 @@ TEST(Snapshot, Partial) { ASSERT_FALSE(registry.valid(e3)); entt::snapshot_loader{registry} - .get(input) + .entities(input) .orphans(); ASSERT_FALSE(registry.valid(e0)); @@ -663,14 +663,14 @@ TEST(Snapshot, Iterator) { const auto size = view.size(); entt::snapshot{registry} - .get(output, view.begin(), view.end()) - .get>(output, view.begin(), view.end()); + .component(output, view.begin(), view.end()) + .component>(output, view.begin(), view.end()); registry.clear(); entt::snapshot_loader{registry} - .get(input) - .get>(input); + .component(input) + .component>(input); ASSERT_EQ(registry.view().size(), size / 2u); @@ -742,20 +742,20 @@ TEST(Snapshot, Continuous) { dst.emplace>(entity, std::make_unique(-1)); entt::snapshot{src} - .get(output) - .get(output) - .get(output) - .get(output) - .get(output) - .get>(output); + .entities(output) + .component(output) + .component(output) + .component(output) + .component(output) + .component>(output); loader - .get(input) - .get(input) - .get(input) - .get(input) - .get(input) - .get>(input) + .entities(input) + .component(input) + .component(input) + .component(input, &what_a_component::bar, &what_a_component::quux) + .component(input, &map_component::keys, &map_component::values, &map_component::both) + .component>(input) .orphans(); decltype(dst.size()) a_component_cnt{}; @@ -813,18 +813,18 @@ TEST(Snapshot, Continuous) { auto size = dst.size(); entt::snapshot{src} - .get(output) - .get(output) - .get(output) - .get(output) - .get(output); + .entities(output) + .component(output) + .component(output) + .component(output) + .component(output); loader - .get(input) - .get(input) - .get(input) - .get(input) - .get(input) + .entities(input) + .component(input) + .component(input, &what_a_component::bar, &what_a_component::quux) + .component(input, &map_component::keys, &map_component::values, &map_component::both) + .component(input) .orphans(); ASSERT_EQ(size, dst.size()); @@ -846,18 +846,18 @@ TEST(Snapshot, Continuous) { }); entt::snapshot{src} - .get(output) - .get(output) - .get(output) - .get(output) - .get(output); + .entities(output) + .component(output) + .component(output) + .component(output) + .component(output); loader - .get(input) - .get(input) - .get(input) - .get(input) - .get(input) + .entities(input) + .component(input) + .component(input, &what_a_component::bar, &what_a_component::quux) + .component(input, &map_component::keys, &map_component::values, &map_component::both) + .component(input) .orphans(); dst.view().each([&loader, entity](auto, auto &component) { @@ -873,18 +873,18 @@ TEST(Snapshot, Continuous) { loader.shrink(); entt::snapshot{src} - .get(output) - .get(output) - .get(output) - .get(output) - .get(output); + .entities(output) + .component(output) + .component(output) + .component(output) + .component(output); loader - .get(input) - .get(input) - .get(input) - .get(input) - .get(input) + .entities(input) + .component(input) + .component(input) + .component(input, &what_a_component::bar, &what_a_component::quux) + .component(input, &map_component::keys, &map_component::values, &map_component::both) .orphans() .shrink(); @@ -904,18 +904,18 @@ TEST(Snapshot, Continuous) { a_component_cnt = src.storage().size(); entt::snapshot{src} - .get(output) - .get(output) - .get(output) - .get(output) - .get(output); + .entities(output) + .component(output) + .component(output) + .component(output) + .component(output); loader - .get(input) - .get(input) - .get(input) - .get(input) - .get(input) + .entities(input) + .component(input) + .component(input, &what_a_component::bar, &what_a_component::quux) + .component(input, &map_component::keys, &map_component::values, &map_component::both) + .component(input) .orphans(); ASSERT_EQ(dst.storage().size(), a_component_cnt); @@ -924,18 +924,18 @@ TEST(Snapshot, Continuous) { a_component_cnt = {}; entt::snapshot{src} - .get(output) - .get(output) - .get(output) - .get(output) - .get(output); + .entities(output) + .component(output) + .component(output) + .component(output) + .component(output); loader - .get(input) - .get(input) - .get(input) - .get(input) - .get(input) + .entities(input) + .component(input, &what_a_component::bar, &what_a_component::quux) + .component(input, &map_component::keys, &map_component::values, &map_component::both) + .component(input) + .component(input) .orphans(); ASSERT_EQ(dst.storage().size(), a_component_cnt); @@ -1009,14 +1009,14 @@ TEST(Snapshot, SyncDataMembers) { decltype(map_component::both){{{child, child}}}); entt::snapshot{src} - .get(output) - .get(output) - .get(output); + .entities(output) + .component(output) + .component(output); loader - .get(input) - .get(input) - .get(input); + .entities(input) + .component(input, &what_a_component::bar, &what_a_component::quux) + .component(input, &map_component::keys, &map_component::values, &map_component::both); ASSERT_FALSE(dst.valid(parent)); ASSERT_FALSE(dst.valid(child));