Move a range test

This commit is contained in:
Andreas Fabri 2023-06-29 14:47:57 +01:00
parent 134909378c
commit 13cf0b677d
2 changed files with 13 additions and 11 deletions

View File

@ -123,6 +123,7 @@ struct Tester
assert(c3t3.is_in_complex(ch)); assert(c3t3.is_in_complex(ch));
assert(c3t3.subdomain_index(ch) == subdomain_index); assert(c3t3.subdomain_index(ch) == subdomain_index);
// Test iterator range
{ {
Cell_handle ch = *c3t3.cells_in_complex().begin(); Cell_handle ch = *c3t3.cells_in_complex().begin();
for (auto c : c3t3.cells_in_complex()) { 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 // Test move construction
//------------------------------------------------------- //-------------------------------------------------------

View File

@ -218,6 +218,18 @@ struct Tester
|| ( v == vp4 && tr.point(vit) == p4 ) ); || ( v == vp4 && tr.point(vit) == p4 ) );
assert ( tv1.in_dimension() == tv2.in_dimension() ); 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 // Check adjacencies
//------------------------------------------------------- //-------------------------------------------------------