Skip to content

Commit

Permalink
Add tests concerning max depth
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Aug 17, 2020
1 parent 0b1c9a7 commit b8b1e2b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Octree/test/Octree/test_octree_refine.cpp
Expand Up @@ -30,6 +30,7 @@ void test_1_point() {
Octree::Node single_node{};
single_node.points() = octree.root().points();
assert(single_node == octree.root());
assert(0 == octree.max_depth_reached());

}

Expand All @@ -48,6 +49,9 @@ void test_2_points() {
Octree::Node other{};
other.split();
assert(other == octree.root());
std::cout << octree << std::endl;
std::cout << octree.max_depth_reached() << std::endl;
assert(1 == octree.max_depth_reached());

}

Expand All @@ -69,6 +73,7 @@ void test_4_points() {
other[3].split();
other[7].split();
assert(other == octree.root());
assert(2 == octree.max_depth_reached());
}

int main(void) {
Expand Down

0 comments on commit b8b1e2b

Please sign in to comment.