diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-11-18 07:52:49 +0100 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-11-18 07:52:49 +0100 |
commit | c6fe07e6d403e733047b1ce4d86c0d5f7b4d4f38 (patch) | |
tree | 223a36b85389850b959e434155103f2a25dae2fc /src/Coxeter_triangulation/test | |
parent | 0bdf0dfbf29a39b0de47a8600331c3cc7d78d6ed (diff) |
Use GUDHI_CHECK and exceptions instead of asserts and test them
Diffstat (limited to 'src/Coxeter_triangulation/test')
-rw-r--r-- | src/Coxeter_triangulation/test/freud_triang_test.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Coxeter_triangulation/test/freud_triang_test.cpp b/src/Coxeter_triangulation/test/freud_triang_test.cpp index 9e06acc9..2cf8f00e 100644 --- a/src/Coxeter_triangulation/test/freud_triang_test.cpp +++ b/src/Coxeter_triangulation/test/freud_triang_test.cpp @@ -97,3 +97,18 @@ BOOST_AUTO_TEST_CASE(freudenthal_triangulation) { BOOST_CHECK(tr.matrix() == new_matrix); BOOST_CHECK(tr.offset() == new_offset); } + +#ifdef GUDHI_DEBUG +BOOST_AUTO_TEST_CASE(freudenthal_triangulation_exceptions_in_debug_mode) { + // Point location check + typedef Gudhi::coxeter_triangulation::Freudenthal_triangulation<> FK_triangulation; + + BOOST_CHECK_THROW (FK_triangulation tr(3, Eigen::MatrixXd::Identity(3, 3), Eigen::VectorXd::Zero(4)), + std::invalid_argument); + + FK_triangulation tr(3); + // Point of dimension 4 + std::vector<double> point({3.5, -1.8, 0.3, 4.1}); + BOOST_CHECK_THROW (tr.locate_point(point), std::invalid_argument); +} +#endif |