diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2019-04-26 09:55:22 +0200 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2019-04-26 09:55:22 +0200 |
commit | bd8591187090a59c979947825fe9eff2645161ae (patch) | |
tree | b5f5f39488530941444b278be66384139652e6d1 /src/Tangential_complex/test/test_tangential_complex.cpp | |
parent | 6f9bbc57d9abb1bd395b7c4d58184ee53656fc72 (diff) | |
parent | 145f6084b734c24d594ab7dddf5a664953ca4545 (diff) |
Merge branch 'master' into toplex_map
Diffstat (limited to 'src/Tangential_complex/test/test_tangential_complex.cpp')
-rw-r--r-- | src/Tangential_complex/test/test_tangential_complex.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Tangential_complex/test/test_tangential_complex.cpp b/src/Tangential_complex/test/test_tangential_complex.cpp index 4e2d4f65..103b8b30 100644 --- a/src/Tangential_complex/test/test_tangential_complex.cpp +++ b/src/Tangential_complex/test/test_tangential_complex.cpp @@ -126,3 +126,33 @@ BOOST_AUTO_TEST_CASE(test_mini_tangential) { BOOST_CHECK(stree.num_vertices() == 4); BOOST_CHECK(stree.num_simplices() == 6); } + +#ifdef GUDHI_DEBUG +BOOST_AUTO_TEST_CASE(test_basic_example_throw) { + typedef CGAL::Epick_d<CGAL::Dynamic_dimension_tag> Kernel; + typedef Kernel::FT FT; + typedef Kernel::Point_d Point; + typedef Kernel::Vector_d Vector; + typedef tc::Tangential_complex<Kernel, CGAL::Dynamic_dimension_tag,CGAL::Parallel_tag> TC; + + const int INTRINSIC_DIM = 2; + const int AMBIENT_DIM = 3; + const int NUM_POINTS = 1000; + + Kernel k; + + // Generate points on a 2-sphere + CGAL::Random_points_on_sphere_d<Point> generator(AMBIENT_DIM, 3.); + std::vector<Point> points; + points.reserve(NUM_POINTS); + for (int i = 0; i < NUM_POINTS; ++i) + points.push_back(*generator++); + + // Compute the TC + TC tc(points, INTRINSIC_DIM, k); + tc.set_max_squared_edge_length(0.01); + std::cout << "test_basic_example_throw - set_max_squared_edge_length(0.01) to make GUDHI_CHECK fail" << std::endl; + BOOST_CHECK_THROW(tc.compute_tangential_complex(), std::invalid_argument); + +} +#endif |