diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index 885b68f5b53..028f26c9d93 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -28,6 +28,7 @@ cgal_add_compilation_test(Combinatorial_map_copy_test_index) add_executable(Combinatorial_map_empty_it_test_index Combinatorial_map_empty_it_test.cpp) target_compile_definitions(Combinatorial_map_empty_it_test_index PRIVATE USE_COMPACT_CONTAINER_WITH_INDEX) +target_link_libraries(Combinatorial_map_empty_it_test_index PRIVATE CGAL::CGAL CGAL::Data) cgal_add_compilation_test(Combinatorial_map_empty_it_test_index) # Link with OpenMesh if possible diff --git a/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_empty_it_test.cpp b/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_empty_it_test.cpp index cf8270f4b95..a7364439192 100644 --- a/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_empty_it_test.cpp +++ b/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_empty_it_test.cpp @@ -8,12 +8,12 @@ struct Map_3_dart_items_3: public CGAL::Generic_map_min_items }; using Map3=CGAL::Combinatorial_map<3, Map_3_dart_items_3>; +Map3 m; template -bool test_empty_it(Range& r, const std::string& txt) +bool test_empty_it(const Range& r, const std::string& txt) { bool res=true; - Map3 m; if(r.size()!=0) { std::cout<<"[ERROR "<(m.darts(), "Dart_range"); + res=res && test_empty_it + (const_cast(m).darts(), "Dart_const_range"); + + res=res && test_empty_it> + (m.one_dart_per_cell<3>(), "One_dart_per_cell_range<0>"); + + res=res && test_empty_it> + (const_cast(m).one_dart_per_cell<3>(), + "One_dart_per_cell_const_range<0>"); + + if(!res) + { return(EXIT_FAILURE); } + + std::cout<<"ALL SUCCESS."<