From 06e152c0985620a41535e48d2507a566ab532064 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 16 Sep 2023 12:36:24 +0200 Subject: more path_search asserts --- test/path-search.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'test') 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 -- cgit v1.2.3