summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/path-search-result.cpp23
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);
}
}