|
|
@@ -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<position, timer, relationship, entt::tag<"empty"_hs>>(output);
|
|
|
+ entt::snapshot{source}
|
|
|
+ .entities(output)
|
|
|
+ .component<position>(output)
|
|
|
+ .component<timer>(output)
|
|
|
+ .component<relationship>(output)
|
|
|
+ .component<entt::tag<"empty"_hs>>(output);
|
|
|
}
|
|
|
|
|
|
cereal::JSONInputArchive input{storage};
|
|
|
- entt::snapshot_loader{destination}.entities(input).component<position, timer, relationship, entt::tag<"empty"_hs>>(input);
|
|
|
+ entt::snapshot_loader{destination}
|
|
|
+ .entities(input)
|
|
|
+ .component<position>(input)
|
|
|
+ .component<timer>(input)
|
|
|
+ .component<relationship>(input)
|
|
|
+ .component<entt::tag<"empty"_hs>>(input);
|
|
|
|
|
|
ASSERT_TRUE(destination.valid(e0));
|
|
|
ASSERT_TRUE(destination.all_of<position>(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<position, relationship, timer, entt::tag<"empty"_hs>>(output);
|
|
|
+ entt::snapshot{source}
|
|
|
+ .entities(output)
|
|
|
+ .component<position>(output)
|
|
|
+ .component<relationship>(output)
|
|
|
+ .component<timer>(output)
|
|
|
+ .component<entt::tag<"empty"_hs>>(output);
|
|
|
}
|
|
|
|
|
|
cereal::JSONInputArchive input{storage};
|
|
|
entt::continuous_loader loader{destination};
|
|
|
loader.entities(input)
|
|
|
- .component<position, relationship>(input, &relationship::parent)
|
|
|
- .component<timer, entt::tag<"empty"_hs>>(input);
|
|
|
+ .component<position>(input)
|
|
|
+ .component<relationship>(input, &relationship::parent)
|
|
|
+ .component<timer>(input)
|
|
|
+ .component<entt::tag<"empty"_hs>>(input);
|
|
|
|
|
|
ASSERT_FALSE(destination.valid(e0));
|
|
|
ASSERT_TRUE(loader.contains(e0));
|