diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-10-06 19:37:12 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-10-06 19:41:18 +0200 |
commit | 23188750272c89ce88e6944b43683f29be04affc (patch) | |
tree | d9fa779ceaea88832396ab3c64a97b4449552c69 /test | |
parent | 41f8fe4e55a3b0f2e471959374ba36314e19edc0 (diff) |
a
Diffstat (limited to 'test')
-rw-r--r-- | test/path-search-result.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/test/path-search-result.cpp b/test/path-search-result.cpp index 1d464e8c..427de52a 100644 --- a/test/path-search-result.cpp +++ b/test/path-search-result.cpp @@ -7,19 +7,28 @@ namespace floormat { void test_app::test_path_search_node_pool() { auto& pool = path_search_result::_pool; - fm_debug_assert(!pool); + fm_assert(!pool); { auto a = path_search_result{}; - fm_debug_assert(!pool); + fm_assert(!pool); } - fm_debug_assert(pool); + fm_assert(pool); + auto* pool2 = pool.get(); { - auto* pool2 = pool.get(); auto b = path_search_result{}; - fm_debug_assert(b._node.get() == pool2); + fm_assert(b._node.get() == pool2); auto c = path_search_result{}; - fm_debug_assert(c._node.get() != pool2); - fm_debug_assert(b._node.get() == pool2); + fm_assert(!pool); + fm_assert(c._node.get() != pool2); + fm_assert(b._node.get() == pool2); + fm_assert(!b._node->_next); + fm_assert(!c._node->_next); + } + { + auto count = 0uz; + for (const auto* ptr = pool.get(); ptr; ptr = ptr->_next.get()) + count++; + fm_assert(count == 2); } } |