Skip to content

Commit

Permalink
Improve test_2_points, node comparison no longer compares values
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jul 6, 2020
1 parent d5cba79 commit 5b5e71f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Octree/include/CGAL/Octree/Node.h
Expand Up @@ -228,9 +228,9 @@ namespace CGAL {
*/
bool operator==(Node &rhs) const {

// Compare the values they contain
if (m_value != rhs.m_value)
return false;
// TODO: Should I compare the values they contain
// if (m_value != rhs.m_value)
// return false;

// If one node is a leaf, and the other isn't, they're not the same
if (is_leaf() != rhs.is_leaf())
Expand Down
15 changes: 6 additions & 9 deletions Octree/test/Octree/test_octree_refine.cpp
Expand Up @@ -47,15 +47,12 @@ void test_2_points() {
Octree octree(points, point_map);
octree.refine(10, 1);

// Create an analogue for the tree
Octree other{points, point_map};
other.root().split();

// Compare the results of printing them
std::stringstream octree_printed, other_printed;
octree_printed << octree;
other_printed << other;
assert(other_printed.str() == octree_printed.str());
// The octree should have been split once
Octree::Node other{};
other.split();
assert(other == octree.root());


}

void test_9_points() {
Expand Down

0 comments on commit 5b5e71f

Please sign in to comment.