diff options
author | Vincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com> | 2023-01-13 15:19:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 15:19:40 +0100 |
commit | 83d1fc15e402551d2d4a7be8d4ecc124e9f886d5 (patch) | |
tree | 736241d96c9bd6813816d3ff2dd37966c85a24e4 | |
parent | 533efd51253b0770f9a7de04a42f0820f1a1af66 (diff) | |
parent | d35581357525d02e3126e9fe901904cc764e1f5c (diff) |
Merge pull request #789 from VincentRouvreau/split_delaunay_triangulation_unitary_testsupstream-2/latest
Split Delaunay complex in 4 executables to relieve windows CI
-rw-r--r-- | src/Alpha_complex/test/CMakeLists.txt | 20 | ||||
-rw-r--r-- | src/Alpha_complex/test/Delaunay_complex_Epeck_dynamic_unit_test.cpp | 22 | ||||
-rw-r--r-- | src/Alpha_complex/test/Delaunay_complex_Epeck_static_unit_test.cpp | 22 | ||||
-rw-r--r-- | src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp | 22 | ||||
-rw-r--r-- | src/Alpha_complex/test/Delaunay_complex_Epick_static_unit_test.cpp | 22 | ||||
-rw-r--r-- | src/Alpha_complex/test/Delaunay_complex_unit_test.h (renamed from src/Alpha_complex/test/Delaunay_complex_unit_test.cpp) | 29 |
6 files changed, 109 insertions, 28 deletions
diff --git a/src/Alpha_complex/test/CMakeLists.txt b/src/Alpha_complex/test/CMakeLists.txt index dd2c235f..7838a15d 100644 --- a/src/Alpha_complex/test/CMakeLists.txt +++ b/src/Alpha_complex/test/CMakeLists.txt @@ -10,17 +10,29 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) target_link_libraries(Alpha_complex_test_unit ${CGAL_LIBRARY}) add_executable ( Alpha_complex_dim3_test_unit Alpha_complex_dim3_unit_test.cpp ) target_link_libraries(Alpha_complex_dim3_test_unit ${CGAL_LIBRARY}) - add_executable ( Delaunay_complex_test_unit Delaunay_complex_unit_test.cpp ) - target_link_libraries(Delaunay_complex_test_unit ${CGAL_LIBRARY}) + add_executable ( Delaunay_complex_Epeck_dynamic_test_unit Delaunay_complex_Epeck_dynamic_unit_test.cpp ) + target_link_libraries(Delaunay_complex_Epeck_dynamic_test_unit ${CGAL_LIBRARY}) + add_executable ( Delaunay_complex_Epeck_static_test_unit Delaunay_complex_Epeck_static_unit_test.cpp ) + target_link_libraries(Delaunay_complex_Epeck_static_test_unit ${CGAL_LIBRARY}) + add_executable ( Delaunay_complex_Epick_dynamic_test_unit Delaunay_complex_Epick_dynamic_unit_test.cpp ) + target_link_libraries(Delaunay_complex_Epick_dynamic_test_unit ${CGAL_LIBRARY}) + add_executable ( Delaunay_complex_Epick_static_test_unit Delaunay_complex_Epick_static_unit_test.cpp ) + target_link_libraries(Delaunay_complex_Epick_static_test_unit ${CGAL_LIBRARY}) if (TBB_FOUND) target_link_libraries(Alpha_complex_test_unit ${TBB_LIBRARIES}) target_link_libraries(Alpha_complex_dim3_test_unit ${TBB_LIBRARIES}) - target_link_libraries(Delaunay_complex_test_unit ${TBB_LIBRARIES}) + target_link_libraries(Delaunay_complex_Epeck_dynamic_test_unit ${TBB_LIBRARIES}) + target_link_libraries(Delaunay_complex_Epeck_static_test_unit ${TBB_LIBRARIES}) + target_link_libraries(Delaunay_complex_Epick_dynamic_test_unit ${TBB_LIBRARIES}) + target_link_libraries(Delaunay_complex_Epick_static_test_unit ${TBB_LIBRARIES}) endif() gudhi_add_boost_test(Alpha_complex_test_unit) gudhi_add_boost_test(Alpha_complex_dim3_test_unit) - gudhi_add_boost_test(Delaunay_complex_test_unit) + gudhi_add_boost_test(Delaunay_complex_Epeck_dynamic_test_unit) + gudhi_add_boost_test(Delaunay_complex_Epeck_static_test_unit) + gudhi_add_boost_test(Delaunay_complex_Epick_dynamic_test_unit) + gudhi_add_boost_test(Delaunay_complex_Epick_static_test_unit) endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) diff --git a/src/Alpha_complex/test/Delaunay_complex_Epeck_dynamic_unit_test.cpp b/src/Alpha_complex/test/Delaunay_complex_Epeck_dynamic_unit_test.cpp new file mode 100644 index 00000000..afe065fc --- /dev/null +++ b/src/Alpha_complex/test/Delaunay_complex_Epeck_dynamic_unit_test.cpp @@ -0,0 +1,22 @@ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Vincent Rouvreau + * + * Copyright (C) 2020 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE "delaunay_complex_exact_kernel_dynamic" +#include <boost/test/unit_test.hpp> + +#include <CGAL/Epeck_d.h> + +#include "Delaunay_complex_unit_test.h" + +BOOST_AUTO_TEST_CASE(Delaunay_complex_exact_kernel_dynamic_simplices_comparison) { + // Use dynamic_dimension_tag for the user to be able to set dimension + compare_delaunay_complex_simplices<CGAL::Epeck_d< CGAL::Dynamic_dimension_tag >>(); +} diff --git a/src/Alpha_complex/test/Delaunay_complex_Epeck_static_unit_test.cpp b/src/Alpha_complex/test/Delaunay_complex_Epeck_static_unit_test.cpp new file mode 100644 index 00000000..c84766ea --- /dev/null +++ b/src/Alpha_complex/test/Delaunay_complex_Epeck_static_unit_test.cpp @@ -0,0 +1,22 @@ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Vincent Rouvreau + * + * Copyright (C) 2020 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE "delaunay_complex_exact_kernel_static" +#include <boost/test/unit_test.hpp> + +#include <CGAL/Epeck_d.h> + +#include "Delaunay_complex_unit_test.h" + +BOOST_AUTO_TEST_CASE(Delaunay_complex_exact_kernel_static_simplices_comparison) { + // Use static dimension_tag for the user not to be able to set dimension + compare_delaunay_complex_simplices<CGAL::Epeck_d< CGAL::Dimension_tag<5> >>(); +} diff --git a/src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp b/src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp new file mode 100644 index 00000000..956bab41 --- /dev/null +++ b/src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp @@ -0,0 +1,22 @@ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Vincent Rouvreau + * + * Copyright (C) 2020 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE "delaunay_complex_inexact_kernel_dynamic" +#include <boost/test/unit_test.hpp> + +#include <CGAL/Epick_d.h> + +#include "Delaunay_complex_unit_test.h" + +BOOST_AUTO_TEST_CASE(Delaunay_complex_inexact_kernel_dynamic_simplices_comparison) { + // Use dynamic_dimension_tag for the user to be able to set dimension + compare_delaunay_complex_simplices<CGAL::Epick_d< CGAL::Dynamic_dimension_tag >>(); +} diff --git a/src/Alpha_complex/test/Delaunay_complex_Epick_static_unit_test.cpp b/src/Alpha_complex/test/Delaunay_complex_Epick_static_unit_test.cpp new file mode 100644 index 00000000..a401f09e --- /dev/null +++ b/src/Alpha_complex/test/Delaunay_complex_Epick_static_unit_test.cpp @@ -0,0 +1,22 @@ +/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + * Author(s): Vincent Rouvreau + * + * Copyright (C) 2020 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE "delaunay_complex_inexact_kernel_static" +#include <boost/test/unit_test.hpp> + +#include <CGAL/Epick_d.h> + +#include "Delaunay_complex_unit_test.h" + +BOOST_AUTO_TEST_CASE(Delaunay_complex_inexact_kernel_static_simplices_comparison) { + // Use static dimension_tag for the user not to be able to set dimension + compare_delaunay_complex_simplices<CGAL::Epick_d< CGAL::Dimension_tag<5> >>(); +} diff --git a/src/Alpha_complex/test/Delaunay_complex_unit_test.cpp b/src/Alpha_complex/test/Delaunay_complex_unit_test.h index c1cc1fab..e9a73f62 100644 --- a/src/Alpha_complex/test/Delaunay_complex_unit_test.cpp +++ b/src/Alpha_complex/test/Delaunay_complex_unit_test.h @@ -8,14 +8,6 @@ * - YYYY/MM Author: Description of the modification */ -#define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE "delaunay_complex" -#include <boost/test/unit_test.hpp> -#include <boost/mpl/list.hpp> - -#include <CGAL/Epick_d.h> -#include <CGAL/Epeck_d.h> - #include <vector> #include <limits> // NaN #include <cmath> @@ -27,29 +19,18 @@ #include <gudhi/Unitary_tests_utils.h> #include <gudhi/random_point_generators.h> -// Use dynamic_dimension_tag for the user to be able to set dimension -typedef CGAL::Epeck_d< CGAL::Dynamic_dimension_tag > Exact_kernel_d; -// Use static dimension_tag for the user not to be able to set dimension -typedef CGAL::Epeck_d< CGAL::Dimension_tag<5> > Exact_kernel_s; -// Use dynamic_dimension_tag for the user to be able to set dimension -typedef CGAL::Epick_d< CGAL::Dynamic_dimension_tag > Inexact_kernel_d; -// Use static dimension_tag for the user not to be able to set dimension -typedef CGAL::Epick_d< CGAL::Dimension_tag<5> > Inexact_kernel_s; -// The triangulation uses the default instantiation of the TriangulationDataStructure template parameter - -typedef boost::mpl::list<Exact_kernel_d, Exact_kernel_s, Inexact_kernel_d, Inexact_kernel_s> list_of_kernel_variants; - using Simplex_tree = Gudhi::Simplex_tree<>; using Simplex_handle = Simplex_tree::Simplex_handle; -BOOST_AUTO_TEST_CASE_TEMPLATE(Alpha_complex_from_OFF_file, TestedKernel, list_of_kernel_variants) { +template<class CGAL_kernel> +void compare_delaunay_complex_simplices() { std::cout << "*****************************************************************************************************"; - using Point = typename TestedKernel::Point_d; + using Point = typename CGAL_kernel::Point_d; std::vector<Point> points; // 50 points on a 4-sphere - points = Gudhi::generate_points_on_sphere_d<TestedKernel>(10, 5, 1.); + points = Gudhi::generate_points_on_sphere_d<CGAL_kernel>(10, 5, 1.); - Gudhi::alpha_complex::Alpha_complex<TestedKernel> alpha_complex(points); + Gudhi::alpha_complex::Alpha_complex<CGAL_kernel> alpha_complex(points); // Alpha complex Simplex_tree stree_from_alpha_complex; |