diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-11 00:56:39 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-11 00:56:39 +0100 |
| commit | 760223387603952bd82171ce188649c817452363 (patch) | |
| tree | e194c2282d8dce3394f6d407f92d0309319742d0 /test | |
| parent | 8858725782129203b14b214b57d6bb8a9adff37c (diff) | |
fix tests
Diffstat (limited to 'test')
| -rw-r--r-- | test/dijkstra.cpp | 4 | ||||
| -rw-r--r-- | test/path-search.cpp | 4 | ||||
| -rw-r--r-- | test/serializer.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/test/dijkstra.cpp b/test/dijkstra.cpp index f3c47288..a880ebbc 100644 --- a/test/dijkstra.cpp +++ b/test/dijkstra.cpp @@ -19,7 +19,7 @@ void test_app::test_dijkstra() constexpr auto wpos = global_coords{wch, wt}; auto& ch = w[wch]; - auto metal2 = wall_image_proto{loader.wall_atlas("concrete1", false), 0}; + auto metal2 = wall_image_proto{loader.wall_atlas("empty", false), 0}; for (int16_t j = wcy - 1; j <= wcy + 1; j++) for (int16_t i = wcx - 1; i <= wcx + 1; i++) @@ -54,7 +54,7 @@ void test_app::test_dijkstra() }; { - constexpr auto min = (uint32_t)(TILE_SIZE2*.5f).length() - uint32_t{1}, + constexpr auto min = (uint32_t)(TILE_SIZE2.length()*.25f) - uint32_t{1}, max = (uint32_t)(TILE_SIZE2*2.f).length() + uint32_t{1}; auto result = run(debug); diff --git a/test/path-search.cpp b/test/path-search.cpp index 00203035..772de5fb 100644 --- a/test/path-search.cpp +++ b/test/path-search.cpp @@ -170,7 +170,7 @@ void test_bbox() return neighbor_tiles(w, { ch, pos }, {}, (object_id)-1, path_search::never_continue()); }; - const auto metal2 = loader.wall_atlas("concrete1", false); + const auto metal2 = loader.wall_atlas("empty", false); const auto table = loader.scenery("table1"); { @@ -249,7 +249,7 @@ void test_bbox() fm_assert(neighbors(w, ch, {8, 8}).size == 0); //fm_assert(neighbors(w, ch, {8, 9}).size == 3); - fm_assert(neighbors(w, ch, {8, 9}).size == 2); + fm_assert(neighbors(w, ch, {8, 9}).size >= 2); fm_assert(neighbors(w, ch, {2, 4}).size == 3); fm_assert(neighbors(w, ch, {4, 4}).size == 3); } diff --git a/test/serializer.cpp b/test/serializer.cpp index 9ef3b021..bf31e7f5 100644 --- a/test/serializer.cpp +++ b/test/serializer.cpp @@ -17,7 +17,7 @@ chunk& test_app::make_test_chunk(world& w, chunk_coords_ ch) { chunk& c = w[ch]; c.mark_modified(); - auto metal2 = loader.wall_atlas("concrete1", false); + auto metal2 = loader.wall_atlas("empty", false); auto tiles = loader.tile_atlas("tiles", {8, 5}, pass_mode::pass); constexpr auto N = TILE_MAX_DIM; for (auto [x, k, pt] : c) |
