|
46 | 46 | #include <pcl/point_cloud.h>
|
47 | 47 | #include <pcl/features/pfh.h>
|
48 | 48 | #include <pcl/features/fpfh.h>
|
49 |
| -#include <pcl/features/fpfh_omp.h> |
50 | 49 | #include <pcl/features/vfh.h>
|
51 | 50 | #include <pcl/features/gfpfh.h>
|
52 | 51 | #include <pcl/io/pcd_io.h>
|
@@ -262,46 +261,28 @@ TEST (PCL, PFHEstimation)
|
262 | 261 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
263 | 262 |
|
264 | 263 | using pcl::FPFHEstimation;
|
265 |
| -using pcl::FPFHEstimationOMP; |
266 | 264 | using pcl::FPFHSignature33;
|
267 | 265 |
|
268 |
| -// "Placeholder" for the type specialized test fixture |
269 |
| -template<typename T> |
270 |
| -struct FPFHTest; |
271 |
| - |
272 |
| -// Template specialization test for FPFHEstimation |
273 |
| -template<> |
274 |
| -struct FPFHTest<FPFHEstimation<PointT, PointT, FPFHSignature33> > |
275 |
| - : public ::testing::Test |
| 266 | +struct FPFHTest |
| 267 | + : public ::testing::TestWithParam<int> |
276 | 268 | {
|
277 | 269 | FPFHEstimation<PointT, PointT, FPFHSignature33> fpfh;
|
278 | 270 | };
|
279 | 271 |
|
280 |
| -// Template specialization test for FPFHEstimationOMP |
281 |
| -template<> |
282 |
| -struct FPFHTest<FPFHEstimationOMP<PointT, PointT, FPFHSignature33> > |
283 |
| - : public ::testing::Test |
284 |
| -{ |
285 |
| - // Default Constructor is defined to instantiate 4 threads |
286 |
| - FPFHTest<FPFHEstimationOMP<PointT, PointT, FPFHSignature33> > () |
287 |
| - : fpfh (4) |
288 |
| - {} |
289 |
| - |
290 |
| - FPFHEstimationOMP<PointT, PointT, FPFHSignature33> fpfh; |
291 |
| -}; |
292 |
| - |
293 |
| -// Types which will be instantiated |
294 |
| -using FPFHEstimatorTypes = ::testing::Types |
295 |
| - <FPFHEstimation<PointT, PointT, FPFHSignature33>, |
296 |
| - FPFHEstimationOMP<PointT, PointT, FPFHSignature33> >; |
297 |
| -TYPED_TEST_SUITE (FPFHTest, FPFHEstimatorTypes); |
| 272 | +INSTANTIATE_TEST_CASE_P( |
| 273 | + FPFHEstimationTests, |
| 274 | + FPFHTest, |
| 275 | + ::testing::Values( |
| 276 | + -1, 4 |
| 277 | + )); |
298 | 278 |
|
299 | 279 | // This is a copy of the old FPFHEstimation test which will now
|
300 | 280 | // be applied to both FPFHEstimation and FPFHEstimationOMP
|
301 |
| -TYPED_TEST (FPFHTest, Estimation) |
| 281 | +TEST_P (FPFHTest, Estimation) |
302 | 282 | {
|
303 | 283 | // Create reference
|
304 |
| - TypeParam& fpfh = this->fpfh; |
| 284 | + FPFHEstimation<PointT, PointT, FPFHSignature33>& fpfh = this->fpfh; |
| 285 | + fpfh.setNumberOfThreads(GetParam()); |
305 | 286 | fpfh.setInputNormals (cloud);
|
306 | 287 | EXPECT_EQ (fpfh.getInputNormals (), cloud);
|
307 | 288 |
|
|
0 commit comments