From 13cf0b677dac1ba6e1b8c1f8f66e2e678eb96ddd Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 29 Jun 2023 14:47:57 +0100 Subject: [PATCH] Move a range test --- SMDS_3/test/SMDS_3/test_c3t3.cpp | 12 +----------- SMDS_3/test/SMDS_3/test_c3t3_with_features.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/SMDS_3/test/SMDS_3/test_c3t3.cpp b/SMDS_3/test/SMDS_3/test_c3t3.cpp index c06443308d6..9fe7b744aae 100644 --- a/SMDS_3/test/SMDS_3/test_c3t3.cpp +++ b/SMDS_3/test/SMDS_3/test_c3t3.cpp @@ -123,6 +123,7 @@ struct Tester assert(c3t3.is_in_complex(ch)); assert(c3t3.subdomain_index(ch) == subdomain_index); + // Test iterator range { Cell_handle ch = *c3t3.cells_in_complex().begin(); for (auto c : c3t3.cells_in_complex()) { @@ -131,17 +132,6 @@ struct Tester } } - { - if (!c3t3.vertices_in_complex().empty()) - { - Vertex_handle vh = *c3t3.vertices_in_complex().begin(); - for (auto v : c3t3.vertices_in_complex()) { - assert(v == vh); - break; - } - } - } - //------------------------------------------------------- // Test move construction //------------------------------------------------------- diff --git a/SMDS_3/test/SMDS_3/test_c3t3_with_features.cpp b/SMDS_3/test/SMDS_3/test_c3t3_with_features.cpp index 737bfcacb33..713d0f6ac9b 100644 --- a/SMDS_3/test/SMDS_3/test_c3t3_with_features.cpp +++ b/SMDS_3/test/SMDS_3/test_c3t3_with_features.cpp @@ -218,6 +218,18 @@ struct Tester || ( v == vp4 && tr.point(vit) == p4 ) ); assert ( tv1.in_dimension() == tv2.in_dimension() ); + + + // Test iterator range + { + Vertex_handle vh = *c3t3.vertices_in_complex().begin(); + for (auto v : c3t3.vertices_in_complex()) { + assert(v == vh); + break; + } + } + + //------------------------------------------------------- // Check adjacencies //-------------------------------------------------------