summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/test/Alpha_complex_unit_test.cpp
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-08-18 12:45:13 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-08-18 12:45:13 +0000
commit2ca2d175f0b49ff267d9a99e5a4c0a5f03e0d30c (patch)
tree24f7df7a0116576d4ace896640111406efa5dcd5 /src/Alpha_complex/test/Alpha_complex_unit_test.cpp
parent3d47e5f4f22e82f2af246ae7d67f19307d57a053 (diff)
exception throw on get_point not found
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@740 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fd2efc725a140f978d2624fe7879dc32f5566ab0
Diffstat (limited to 'src/Alpha_complex/test/Alpha_complex_unit_test.cpp')
-rw-r--r--src/Alpha_complex/test/Alpha_complex_unit_test.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp
index aa9500e7..c15f07e1 100644
--- a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp
+++ b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp
@@ -92,11 +92,11 @@ BOOST_AUTO_TEST_CASE(S4_100_OFF_file_filtered) {
std::cout << "alpha_complex_from_file.dimension()=" << alpha_complex_from_file.dimension() << std::endl;
BOOST_CHECK(alpha_complex_from_file.dimension() == DIMENSION);
- const int NUMBER_OF_VERTICES = 13; // Versus 100, because of filtered alpha value
+ const int NUMBER_OF_VERTICES = 100;
std::cout << "alpha_complex_from_file.num_vertices()=" << alpha_complex_from_file.num_vertices() << std::endl;
BOOST_CHECK(alpha_complex_from_file.num_vertices() == NUMBER_OF_VERTICES);
- const int NUMBER_OF_SIMPLICES = 90; // Versus 6879, because of filtered alpha value
+ const int NUMBER_OF_SIMPLICES = 5966; // Versus 6879, because of filtered alpha value
std::cout << "alpha_complex_from_file.num_simplices()=" << alpha_complex_from_file.num_simplices() << std::endl;
// TODO(VR) : BOOST_CHECK(alpha_complex_from_file.num_simplices() == NUMBER_OF_SIMPLICES);
@@ -166,7 +166,7 @@ BOOST_AUTO_TEST_CASE(S8_10_OFF_file_filtered) {
std::cout << "alpha_complex_from_file.num_vertices()=" << alpha_complex_from_file.num_vertices() << std::endl;
BOOST_CHECK(alpha_complex_from_file.num_vertices() == NUMBER_OF_VERTICES);
- const int NUMBER_OF_SIMPLICES = 895; // Versus 1007, because of filtered alpha value
+ const int NUMBER_OF_SIMPLICES = 1004; // Versus 1007, because of filtered alpha value
std::cout << "alpha_complex_from_file.num_simplices()=" << alpha_complex_from_file.num_simplices() << std::endl;
// TODO(VR) : BOOST_CHECK(alpha_complex_from_file.num_simplices() == NUMBER_OF_SIMPLICES);
@@ -283,15 +283,7 @@ BOOST_AUTO_TEST_CASE(Alpha_complex_from_points) {
BOOST_CHECK(4 == p4.dimension());
BOOST_CHECK(is_point_in_list(points, p4));
- Point p5 = alpha_complex_from_points.get_point(5);
- std::cout << "alpha_complex_from_points.get_point(5)=" << p5 << std::endl;
- BOOST_CHECK(!is_point_in_list(points, p5));
-
- Point p0 = alpha_complex_from_points.get_point(0);
- std::cout << "alpha_complex_from_points.get_point(0)=" << p0 << std::endl;
- BOOST_CHECK(!is_point_in_list(points, p0));
-
- Point p1234 = alpha_complex_from_points.get_point(1234);
- std::cout << "alpha_complex_from_points.get_point(1234)=" << p1234.dimension() << std::endl;
- BOOST_CHECK(!is_point_in_list(points, p1234));
+ BOOST_CHECK_THROW (alpha_complex_from_points.get_point(5), std::out_of_range);
+ BOOST_CHECK_THROW (alpha_complex_from_points.get_point(0), std::out_of_range);
+ BOOST_CHECK_THROW (alpha_complex_from_points.get_point(1234), std::out_of_range);
}