diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-23 15:11:26 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-23 15:11:26 +0100 |
| commit | c554cdbc0cf894ccc6c330e0743649a4bdb34658 (patch) | |
| tree | 80b5fa2e64136eb2740d9c9524daf92b8a447b3d /test | |
| parent | 573f8f2bcbfd86119e00a13fedc5abf2bf7deafb (diff) | |
a
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; } |
