From c554cdbc0cf894ccc6c330e0743649a4bdb34658 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 23 Jan 2024 15:11:26 +0100 Subject: a --- test/scenery.cpp | 3 --- test/serializer.cpp | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'test') diff --git a/test/scenery.cpp b/test/scenery.cpp index 01f30781..42de1ab6 100644 --- a/test/scenery.cpp +++ b/test/scenery.cpp @@ -9,9 +9,6 @@ namespace { void test_loading() { fm_assert(!loader.sceneries().isEmpty()); - - for (const auto& [name, proto] : loader.sceneries()) - fm_assert(proto.sc_type != scenery_type::none); } } // namespace diff --git a/test/serializer.cpp b/test/serializer.cpp index e14f5c1e..6153d6ee 100644 --- a/test/serializer.cpp +++ b/test/serializer.cpp @@ -53,15 +53,17 @@ chunk& test_app::make_test_chunk(world& w, chunk_coords_ ch) const auto index = e.index(); const auto end = e.atlas->info().nframes-1; fm_assert(e.frame == end); - fm_assert(!e.active); - e.activate(e.index()); - fm_assert(e.active); - e.update(index, 1.f/60); - fm_assert(e.frame != end); - for (int i = 0; i < 60*3; i++) + { auto& x = std::get(e.subtype); + fm_assert(!x.active); + e.activate(e.index()); + fm_assert(x.active); e.update(index, 1.f/60); - fm_assert(e.frame == 0); - fm_assert(!e.active); + fm_assert(e.frame != end); + for (int i = 0; i < 60*3; i++) + e.update(index, 1.f/60); + fm_assert(e.frame == 0); + fm_assert(!x.active); + } } return c; } -- cgit v1.2.3