diff options
Diffstat (limited to 'src/Bitmap_cubical_complex/test/Bitmap_test.cpp')
-rw-r--r-- | src/Bitmap_cubical_complex/test/Bitmap_test.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp index ca7bd986..6a917c25 100644 --- a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp +++ b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp @@ -32,6 +32,7 @@ #include <iostream> #include <sstream> #include <vector> +#include <limits> typedef Gudhi::cubical_complex::Bitmap_cubical_complex_base<double> Bitmap_cubical_complex_base; typedef Gudhi::cubical_complex::Bitmap_cubical_complex<Bitmap_cubical_complex_base> Bitmap_cubical_complex; @@ -1576,3 +1577,17 @@ BOOST_AUTO_TEST_CASE(compute_incidence_between_cells_test_periodic_boundary_cond } } } + +BOOST_AUTO_TEST_CASE(perseus_file_read) { + Bitmap_cubical_complex increasing("sinusoid.txt"); + + auto it = increasing.top_dimensional_cells_iterator_begin(); + double value = increasing.get_cell_data(*it); + std::cout << "First value of sinusoid.txt is " << value << std::endl; + BOOST_CHECK(value == 10.); + // Next value + ++it; + value = increasing.get_cell_data(*it); + std::cout << "Second value of sinusoid.txt is " << value << std::endl; + BOOST_CHECK(value == std::numeric_limits<double>::infinity()); +} |