diff --git a/Octree/test/Octree/test_octree_bbox.cpp b/Octree/test/Octree/test_octree_bbox.cpp index 3f01e784227..8c23115ce0d 100644 --- a/Octree/test/Octree/test_octree_bbox.cpp +++ b/Octree/test/Octree/test_octree_bbox.cpp @@ -17,14 +17,39 @@ typedef CGAL::Octree::Octree void test_1_node() { + // Define the dataset + Point_set points; + points.insert({-1, -1, -1}); + auto point_map = points.point_map(); + + // Create the octree + Octree octree(points, point_map); + octree.refine(10, 1); + + // Compare the top (only) node + assert(octree.bbox(octree.root()) == CGAL::Bbox_3(-1, -1, -1, -1, -1, -1)); } void test_9_nodes() { + // Define the dataset + Point_set points; + points.insert({-1, -1, -1}); + points.insert({1, 1, 1}); + auto point_map = points.point_map(); + + // Create the octree + Octree octree(points, point_map, 1.1); + octree.refine(10, 1); + + // Compare the top node + assert(octree.bbox(octree.root()) == CGAL::Bbox_3(-1.1, -1.1, -1.1, 1.1, 1.1, 1.1)); } int main(void) { + test_1_node(); + test_9_nodes(); return EXIT_SUCCESS; }