diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index 271451857f9..885b68f5b53 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -12,6 +12,8 @@ set(hfiles Combinatorial_map_2_test.h Combinatorial_map_3_test.h # create a target per cppfile create_single_source_cgal_program(Combinatorial_map_test.cpp ${hfiles}) create_single_source_cgal_program(Combinatorial_map_copy_test.cpp ${hfiles}) +create_single_source_cgal_program(cmap_test_split_attribute.cpp) +create_single_source_cgal_program(Combinatorial_map_empty_it_test.cpp) # Same targets, defining USE_COMPACT_CONTAINER_WITH_INDEX to test index version add_executable(Combinatorial_map_test_index Combinatorial_map_test.cpp ${hfiles}) @@ -24,7 +26,9 @@ target_compile_definitions(Combinatorial_map_copy_test_index PRIVATE USE_COMPACT target_link_libraries(Combinatorial_map_copy_test_index PRIVATE CGAL::CGAL CGAL::Data) cgal_add_compilation_test(Combinatorial_map_copy_test_index) -create_single_source_cgal_program(cmap_test_split_attribute.cpp) +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) +cgal_add_compilation_test(Combinatorial_map_empty_it_test_index) # Link with OpenMesh if possible find_package(OpenMesh QUIET) 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 new file mode 100644 index 00000000000..cf8270f4b95 --- /dev/null +++ b/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_empty_it_test.cpp @@ -0,0 +1,36 @@ +#include + +struct Map_3_dart_items_3: public CGAL::Generic_map_min_items +{ +#ifdef USE_COMPACT_CONTAINER_WITH_INDEX + typedef CGAL::Tag_true Use_index; +#endif +}; + +using Map3=CGAL::Combinatorial_map<3, Map_3_dart_items_3>; + +template +bool test_empty_it(Range& r, const std::string& txt) +{ + bool res=true; + Map3 m; + if(r.size()!=0) + { + std::cout<<"[ERROR "<