diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-14 20:15:23 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-15 09:49:38 +0200 |
commit | db1a4ec9558f856e3a58362dee9b3b1404f41f62 (patch) | |
tree | be5be9a82eadf3e17afb0faecdce30c00bba1c65 | |
parent | 0551686dadd26485a134d11408355bb1a49e8287 (diff) |
add tests
-rw-r--r-- | test/path-search.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/path-search.cpp b/test/path-search.cpp index d58e68b6..7253f4d5 100644 --- a/test/path-search.cpp +++ b/test/path-search.cpp @@ -50,9 +50,12 @@ void test_bbox() } { using enum rotation; + constexpr auto C = rotation_COUNT; constexpr auto ch = chunk_coords_{11, 22, 0}; + auto w = world(); auto& c = w[ch]; + c[{8, 7}].wall_north() = {metal2,0}; c[{8, 9}].wall_north() = {metal2,0}; fm_assert( is_passable_1(c, bbox({8, 8}, N)) ); @@ -63,6 +66,9 @@ void test_bbox() c[{8, 8}].wall_north() = {metal2,0}; c.mark_passability_modified(); fm_assert( !is_passable_1(c, bbox({8, 8}, N)) ); + fm_assert( is_passable_1(c, bbox({8, 8}, C))); + fm_assert( is_passable_1(c, bbox({8, 8}, E)) ); + fm_assert( is_passable_1(c, bbox({8, 8}, W)) ); } // todo use test chunk } |