Skip to content

Commit 0f60ad5

Browse files
committed
Update per review.
1 parent 8937343 commit 0f60ad5

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

test/surface/test_moving_least_squares.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ PointCloud<PointNormal>::Ptr cloud_with_normals1 (new PointCloud<PointNormal>);
6161
search::KdTree<PointXYZ>::Ptr tree3;
6262
search::KdTree<PointNormal>::Ptr tree4;
6363

64-
PointCloud<PointXYZ>::Ptr cloud_almost_on_line(new PointCloud<PointXYZ>);
65-
6664
TEST(PCL, MovingLeastSquares_almost_on_line)
6765
{
66+
PointCloud<PointXYZ>::Ptr cloud_almost_on_line (new PointCloud<PointXYZ>);
6867
cloud_almost_on_line->push_back(pcl::PointXYZ(-89.546, 4.03964, 450.883));
6968
cloud_almost_on_line->push_back(pcl::PointXYZ(-88.8728, 4.03964, 450.883));
7069
cloud_almost_on_line->push_back(pcl::PointXYZ(-86.8529, 4.03964, 450.883));
@@ -83,10 +82,12 @@ TEST(PCL, MovingLeastSquares_almost_on_line)
8382

8483
// Reconstruct
8584
mls.process(mls_points);
85+
ASSERT_FALSE(mls_points.empty());
8686

87-
for (size_t i = 0; i < mls_points.size(); ++i) {
87+
for (const auto& mls_point : mls_points)
88+
{
8889
// Check for NaNs in output
89-
EXPECT_TRUE(pcl::isFinite(mls_points[i]));
90+
EXPECT_TRUE(pcl::isFinite(mls_points));
9091
}
9192
}
9293

0 commit comments

Comments
 (0)