summaryrefslogtreecommitdiff
path: root/src/Tangential_complex
diff options
context:
space:
mode:
Diffstat (limited to 'src/Tangential_complex')
-rw-r--r--src/Tangential_complex/example/CMakeLists.txt9
-rw-r--r--src/Tangential_complex/include/gudhi/Tangential_complex.h5
-rw-r--r--src/Tangential_complex/test/CMakeLists.txt15
3 files changed, 8 insertions, 21 deletions
diff --git a/src/Tangential_complex/example/CMakeLists.txt b/src/Tangential_complex/example/CMakeLists.txt
index 47a56e3b..339d0581 100644
--- a/src/Tangential_complex/example/CMakeLists.txt
+++ b/src/Tangential_complex/example/CMakeLists.txt
@@ -11,9 +11,8 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
target_link_libraries(Tangential_complex_example_with_perturb ${TBB_LIBRARIES})
endif(TBB_FOUND)
- add_test(Tangential_complex_example_basic
- ${CMAKE_CURRENT_BINARY_DIR}/Tangential_complex_example_basic)
-
- add_test(Tangential_complex_example_with_perturb
- ${CMAKE_CURRENT_BINARY_DIR}/Tangential_complex_example_with_perturb)
+ add_test(NAME Tangential_complex_example_basic
+ COMMAND $<TARGET_FILE:Tangential_complex_example_basic>)
+ add_test(NAME Tangential_complex_example_with_perturb
+ COMMAND $<TARGET_FILE:Tangential_complex_example_with_perturb>)
endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex.h
index cfc82eb1..9fa7c825 100644
--- a/src/Tangential_complex/include/gudhi/Tangential_complex.h
+++ b/src/Tangential_complex/include/gudhi/Tangential_complex.h
@@ -1059,7 +1059,6 @@ class Tangential_complex {
Triangulation &triangulation, bool verbose = false) {
int tangent_space_dim = tsb.dimension();
const Tr_traits &local_tr_traits = triangulation.geom_traits();
- Tr_vertex_handle center_vertex;
// Kernel functor & objects
typename K::Squared_distance_d k_sqdist = m_k.squared_distance_d_object();
@@ -1084,7 +1083,7 @@ class Tangential_complex {
proj_wp = project_point_and_compute_weight(wp, tsb, local_tr_traits);
}
- center_vertex = triangulation.insert(proj_wp);
+ Tr_vertex_handle center_vertex = triangulation.insert(proj_wp);
center_vertex->data() = i;
if (verbose)
std::cerr << "* Inserted point #" << i << "\n";
@@ -1823,7 +1822,6 @@ class Tangential_complex {
bool is_inconsistent = false;
Star const& star = m_stars[tr_index];
- Tr_vertex_handle center_vh = m_triangulations[tr_index].center_vertex();
// For each incident simplex
Star::const_iterator it_inc_simplex = star.begin();
@@ -1950,7 +1948,6 @@ class Tangential_complex {
bool is_star_inconsistent = false;
Triangulation const& tr = it_tr->tr();
- Tr_vertex_handle center_vh = it_tr->center_vertex();
if (tr.current_dimension() < m_intrinsic_dim)
continue;
diff --git a/src/Tangential_complex/test/CMakeLists.txt b/src/Tangential_complex/test/CMakeLists.txt
index b2bf5dd7..fc710676 100644
--- a/src/Tangential_complex/test/CMakeLists.txt
+++ b/src/Tangential_complex/test/CMakeLists.txt
@@ -1,23 +1,14 @@
cmake_minimum_required(VERSION 2.6)
project(Tangential_complex_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
-
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
+ include(GUDHI_test_coverage)
+
add_executable( Tangential_complex_test_TC test_tangential_complex.cpp )
target_link_libraries(Tangential_complex_test_TC ${CGAL_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
if (TBB_FOUND)
target_link_libraries(Tangential_complex_test_TC ${TBB_LIBRARIES})
endif()
- add_test(Tangential_complex_test_TC ${CMAKE_CURRENT_BINARY_DIR}/Tangential_complex_test_TC
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/Tangential_complex_UT.xml --log_level=test_suite --report_level=no)
+ gudhi_add_coverage_test(Tangential_complex_test_TC)
endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)