diff options
Diffstat (limited to 'test/save.cpp')
-rw-r--r-- | test/save.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/save.cpp b/test/save.cpp index f596cf00..3d4a71a0 100644 --- a/test/save.cpp +++ b/test/save.cpp @@ -1,14 +1,15 @@ #include "app.hpp" #include "src/world.hpp" -#include "loader/loader.hpp" -#include "loader/scenery-cell.hpp" #include "src/scenery.hpp" #include "src/scenery-proto.hpp" #include "src/critter.hpp" #include "src/light.hpp" +#include "src/hole.hpp" #include "src/ground-atlas.hpp" #include "src/anim-atlas.hpp" #include "src/nanosecond.inl" +#include "loader/loader.hpp" +#include "loader/scenery-cell.hpp" #include <Corrade/Utility/Path.h> namespace floormat { @@ -98,8 +99,10 @@ void assert_chunks_equal(const chunk& a, const chunk& b) switch (type) { case object_type::none: - case object_type::COUNT: std::unreachable(); + case object_type::COUNT: + fm_assert(false); case object_type::critter: { + // todo! remove duplication const auto& e1 = static_cast<const critter&>(ae); const auto& e2 = static_cast<const critter&>(be); const auto p1 = critter_proto(e1), p2 = critter_proto(e2); @@ -120,6 +123,13 @@ void assert_chunks_equal(const chunk& a, const chunk& b) fm_assert(p1 == p2); break; } + case object_type::hole: { + const auto& e1 = static_cast<const hole&>(ae); + const auto& e2 = static_cast<const hole&>(be); + const auto p1 = hole_proto(e1), p2 = hole_proto(e2); + fm_assert(p1 == p2); + break; + } } } } |