diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-16 12:36:24 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-16 12:36:24 +0200 |
| commit | 06e152c0985620a41535e48d2507a566ab532064 (patch) | |
| tree | 0a9f1dc44a6c40c811ff2b16397dc1d2a642a7d3 /test | |
| parent | 4bb0637fe81d79bba0de34f72caa632d1da03424 (diff) | |
more path_search asserts
Diffstat (limited to 'test')
| -rw-r--r-- | test/path-search.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/path-search.cpp b/test/path-search.cpp index f6a567a6..eb4ff4a5 100644 --- a/test/path-search.cpp +++ b/test/path-search.cpp @@ -75,7 +75,22 @@ void test_bbox() fm_assert( !is_passable_1(c, bbox({8, 8}, S)) ); fm_assert( is_passable_1(c, bbox({8, 8}, W)) ); } - // todo use test chunk + { + using enum rotation; + constexpr auto ch = chunk_coords_{0, 0, 0}; + auto w = world(); + auto& c = test_app::make_test_chunk(w, ch); + + fm_assert( !is_passable_1(c, bbox({8, 8}, N)) ); + fm_assert( !is_passable_1(c, bbox({8, 8}, E)) ); + fm_assert( !is_passable_1(c, bbox({8, 8}, S)) ); + fm_assert( !is_passable_1(c, bbox({8, 8}, W)) ); + + fm_assert( !is_passable_1(c, bbox({8, 9}, N)) ); + fm_assert( is_passable_1(c, bbox({8, 9}, E)) ); + fm_assert( is_passable_1(c, bbox({8, 9}, S)) ); + fm_assert( is_passable_1(c, bbox({8, 9}, W)) ); + } } } // namespace |
