Bug fix in gmap tests, for the second dart given as parameter to the insert_cell_1_in_cell_2 method.

This commit is contained in:
Guillaume Damiand 2022-11-30 10:37:54 +01:00
parent 8b114241ca
commit f8b6e2c272
1 changed files with 3 additions and 10 deletions

View File

@ -149,7 +149,7 @@ bool test_edge_insertion(GMAP& gmap)
trace_test_begin(); trace_test_begin();
d1 = gmap.make_combinatorial_polygon(4); d1 = gmap.make_combinatorial_polygon(4);
gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1,0)); gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1));
if ( !check_number_of_cells_3(gmap, 4, 5, 2, 1, 1) ) if ( !check_number_of_cells_3(gmap, 4, 5, 2, 1, 1) )
return false; return false;
gmap.clear(); gmap.clear();
@ -158,7 +158,7 @@ bool test_edge_insertion(GMAP& gmap)
d1 = gmap.make_combinatorial_polygon(4); d1 = gmap.make_combinatorial_polygon(4);
d2 = gmap.make_combinatorial_polygon(4); d2 = gmap.make_combinatorial_polygon(4);
gmap.template sew<3>(d1, d2); gmap.template sew<3>(d1, d2);
gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1,0)); gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1));
if ( !check_number_of_cells_3(gmap, 4, 5, 2, 2, 1) ) if ( !check_number_of_cells_3(gmap, 4, 5, 2, 2, 1) )
return false; return false;
gmap.clear(); gmap.clear();
@ -167,18 +167,11 @@ bool test_edge_insertion(GMAP& gmap)
d1 = gmap.make_combinatorial_polygon(4); d1 = gmap.make_combinatorial_polygon(4);
d2 = gmap.make_combinatorial_polygon(4); d2 = gmap.make_combinatorial_polygon(4);
gmap.template sew<2>(d1, d2); gmap.template sew<2>(d1, d2);
gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1,0)); gmap.insert_cell_1_in_cell_2(d1, gmap.alpha(d1,0,1));
if ( !check_number_of_cells_3(gmap, 6, 8, 3, 1, 1) ) if ( !check_number_of_cells_3(gmap, 6, 8, 3, 1, 1) )
return false; return false;
gmap.clear(); gmap.clear();
trace_test_begin();
d1 = gmap.create_dart();
gmap.insert_dangling_cell_1_in_cell_2(d1);
if ( !check_number_of_cells_3(gmap, 2, 2, 1, 1, 1) )
return false;
gmap.clear();
trace_test_begin(); trace_test_begin();
d1 = gmap.make_edge(); d1 = gmap.make_edge();
gmap.template sew<1>(d1, gmap.alpha(d1, 0)); gmap.template sew<1>(d1, gmap.alpha(d1, 0));