summaryrefslogtreecommitdiff
path: root/src/Subsampling
diff options
context:
space:
mode:
authorcjamin <cjamin@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-06-21 13:53:51 +0000
committercjamin <cjamin@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-06-21 13:53:51 +0000
commit1ed4039613bee6d3cd85b312e88af71acdbdc163 (patch)
treed1cc10ecc98701fcb25665db9cdc824daad2e15c /src/Subsampling
parent4fcd44cbaf631e764e7cd7a9b1e23d209685bba5 (diff)
Boostify the test
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/subsampling_and_spatialsearching@1323 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 58b2cfba030198debf2831809e430e3bf3251346
Diffstat (limited to 'src/Subsampling')
-rw-r--r--src/Subsampling/test/CMakeLists.txt3
-rw-r--r--src/Subsampling/test/test_sparsify_point_set.cpp9
2 files changed, 9 insertions, 3 deletions
diff --git a/src/Subsampling/test/CMakeLists.txt b/src/Subsampling/test/CMakeLists.txt
index 0c591e8b..6fd70e39 100644
--- a/src/Subsampling/test/CMakeLists.txt
+++ b/src/Subsampling/test/CMakeLists.txt
@@ -26,7 +26,8 @@ if(CGAL_FOUND)
add_executable( Subsampling_test_choose_farthest_point test_choose_farthest_point.cpp )
target_link_libraries(Subsampling_test_choose_farthest_point ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
- add_executable( Subsampling_test_sparsify_point_set test_sparsify_point_set.cpp)
+ add_executable(Subsampling_test_sparsify_point_set test_sparsify_point_set.cpp)
+ target_link_libraries(Subsampling_test_sparsify_point_set ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
else()
message(WARNING "Eigen3 not found. Version 3.1.0 is required for Subsampling feature.")
endif()
diff --git a/src/Subsampling/test/test_sparsify_point_set.cpp b/src/Subsampling/test/test_sparsify_point_set.cpp
index e9d2a8f6..8e89f81a 100644
--- a/src/Subsampling/test/test_sparsify_point_set.cpp
+++ b/src/Subsampling/test/test_sparsify_point_set.cpp
@@ -2,6 +2,10 @@
// # define TBB_USE_THREADING_TOOL
// #endif
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MODULE Subsampling - test sparsify_point_set
+#include <boost/test/unit_test.hpp>
+
#include <gudhi/sparsify_point_set.h>
#include <CGAL/Epick_d.h>
@@ -11,7 +15,8 @@
#include <vector>
#include <iterator>
-int main() {
+BOOST_AUTO_TEST_CASE(test_sparsify_point_set)
+{
typedef CGAL::Epick_d<CGAL::Dimension_tag<4> > K;
typedef typename K::FT FT;
typedef typename K::Point_d Point_d;
@@ -30,5 +35,5 @@ int main() {
//for (auto p : results)
// std::cout << p << "\n";
- return 0;
+ BOOST_CHECK(points.size() > results.size());
}