diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/scenery.cpp | 3 | ||||
| -rw-r--r-- | test/serializer.cpp | 18 |
2 files changed, 10 insertions, 11 deletions
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<door_scenery>(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; } |
