Skip to content
Snippets Groups Projects
Commit 4c5bf302 authored by Sam Yates's avatar Sam Yates Committed by Ben Cumming
Browse files

Fix issue #224 test assertion failure. (#225)

`cell_tree::depth_from_root()` was incorrectly traversing only
the first branch from the tree root, leading to uninitialized
values in the returned depth array.

This leads to an incorrect maximum leaf node in `find_minimum_root()`,
which then returns `no_parent`. This gets passed to
`tree::change_root(size_t)`.

* Correct `cell_tree::depth_from_root()` implementation.
* Re-enable curiously disabled test case in `cell_tree.from_parent_index`
* Add unit tests for `cell_tree::depth_from_root`.
parent 3867a6c4
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment