diff options
Diffstat (limited to 'test/path-search-result.cpp')
-rw-r--r-- | test/path-search-result.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/path-search-result.cpp b/test/path-search-result.cpp new file mode 100644 index 00000000..1d464e8c --- /dev/null +++ b/test/path-search-result.cpp @@ -0,0 +1,26 @@ +#include "app.hpp" +#include "compat/assert.hpp" +#include "path-search-result.hpp" + +namespace floormat { + +void test_app::test_path_search_node_pool() +{ + auto& pool = path_search_result::_pool; + fm_debug_assert(!pool); + { + auto a = path_search_result{}; + fm_debug_assert(!pool); + } + fm_debug_assert(pool); + { + auto* pool2 = pool.get(); + auto b = path_search_result{}; + fm_debug_assert(b._node.get() == pool2); + auto c = path_search_result{}; + fm_debug_assert(c._node.get() != pool2); + fm_debug_assert(b._node.get() == pool2); + } +} + +} // namespace floormat |