summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/test/Alpha_complex_unit_test.cpp
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-10-05 20:57:19 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-10-05 20:57:19 +0000
commit1693786349ba3a3c7ca003d8a2e8afd6f0556539 (patch)
treefb09a15da9fcfe240b33d7f991fe81424ed7a483 /src/Alpha_complex/test/Alpha_complex_unit_test.cpp
parent3950bb33f65f4831060f10a73c7e88cdfe9717bf (diff)
Fix review comments
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alpha_complex_create_complex@1648 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: de0b4f12b6eb814224df13c5cec1069310115efa
Diffstat (limited to 'src/Alpha_complex/test/Alpha_complex_unit_test.cpp')
-rw-r--r--src/Alpha_complex/test/Alpha_complex_unit_test.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp
index 0d4132f8..b03851d1 100644
--- a/src/Alpha_complex/test/Alpha_complex_unit_test.cpp
+++ b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp
@@ -235,3 +235,32 @@ BOOST_AUTO_TEST_CASE(Alpha_complex_from_points) {
}
}
+
+BOOST_AUTO_TEST_CASE(Alpha_complex_from_empty_points) {
+ // ----------------------------------------------------------------------------
+ // Init of a list of points
+ // ----------------------------------------------------------------------------
+ Vector_of_points points;
+
+ // ----------------------------------------------------------------------------
+ // Init of an alpha complex from the list of points
+ // ----------------------------------------------------------------------------
+ Gudhi::alpha_complex::Alpha_complex<Kernel_s> alpha_complex_from_points(points);
+
+ std::cout << "========== Alpha_complex_from_empty_points ==========" << std::endl;
+
+ Gudhi::Simplex_tree<> simplex_tree;
+ BOOST_CHECK(alpha_complex_from_points.create_complex(simplex_tree));
+
+ std::cout << "simplex_tree.num_simplices()=" << simplex_tree.num_simplices() << std::endl;
+ BOOST_CHECK(simplex_tree.num_simplices() == 0);
+
+ std::cout << "simplex_tree.dimension()=" << simplex_tree.dimension() << std::endl;
+ BOOST_CHECK(simplex_tree.dimension() == 4);
+
+ std::cout << "simplex_tree.num_vertices()=" << simplex_tree.num_vertices() << std::endl;
+ BOOST_CHECK(simplex_tree.num_vertices() == 0);
+
+ // Test to the limit
+ BOOST_CHECK_THROW (alpha_complex_from_points.get_point(0), std::out_of_range);
+}