From fff5f578ac04f6f485cc7f376247a3ff8eb724ce Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 26 May 2023 15:11:53 +0200 Subject: [PATCH] test: avoid using deprecated functions in an example --- test/snapshot/snapshot.cpp | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/test/snapshot/snapshot.cpp b/test/snapshot/snapshot.cpp index ac1d6ee0b..6c30ce3c0 100644 --- a/test/snapshot/snapshot.cpp +++ b/test/snapshot/snapshot.cpp @@ -64,11 +64,21 @@ TEST(Snapshot, Full) { { // output finishes flushing its contents when it goes out of scope cereal::JSONOutputArchive output{storage}; - entt::snapshot{source}.entities(output).component>(output); + entt::snapshot{source} + .entities(output) + .component(output) + .component(output) + .component(output) + .component>(output); } cereal::JSONInputArchive input{storage}; - entt::snapshot_loader{destination}.entities(input).component>(input); + entt::snapshot_loader{destination} + .entities(input) + .component(input) + .component(input) + .component(input) + .component>(input); ASSERT_TRUE(destination.valid(e0)); ASSERT_TRUE(destination.all_of(e0)); @@ -129,14 +139,21 @@ TEST(Snapshot, Continuous) { { // output finishes flushing its contents when it goes out of scope cereal::JSONOutputArchive output{storage}; - entt::snapshot{source}.entities(output).component>(output); + entt::snapshot{source} + .entities(output) + .component(output) + .component(output) + .component(output) + .component>(output); } cereal::JSONInputArchive input{storage}; entt::continuous_loader loader{destination}; loader.entities(input) - .component(input, &relationship::parent) - .component>(input); + .component(input) + .component(input, &relationship::parent) + .component(input) + .component>(input); ASSERT_FALSE(destination.valid(e0)); ASSERT_TRUE(loader.contains(e0));