Skip to content

Commit c8af1fb

Browse files
committed
Do not initialize meshes in assertions
Otherwise things break when DNDEBUG is used
1 parent 652a503 commit c8af1fb

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

BGL/test/BGL/test_Prefix.h

+16-8
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ std::vector<LCC> lcc_data()
156156
template <typename Graph>
157157
struct Surface_fixture_1 {
158158
Surface_fixture_1() {
159-
assert(read_a_mesh(m, "data/fixture1.off"));
159+
const bool is_reading_successful = read_a_mesh(m, "data/fixture1.off");
160+
assert(is_reading_successful);
160161
assert(CGAL::is_valid_polygon_mesh(m));
161162
typename boost::property_map<Graph, CGAL::vertex_point_t>::const_type
162163
pm = get(CGAL::vertex_point, const_cast<const Graph&>(m));
@@ -205,7 +206,8 @@ struct Surface_fixture_1 {
205206
template <typename Graph>
206207
struct Surface_fixture_2 {
207208
Surface_fixture_2() {
208-
assert(read_a_mesh(m, "data/fixture2.off"));
209+
const bool is_reading_successful = read_a_mesh(m, "data/fixture2.off");
210+
assert(is_reading_successful);
209211
assert(CGAL::is_valid_polygon_mesh(m));
210212

211213
typename boost::property_map<Graph, CGAL::vertex_point_t>::const_type
@@ -266,7 +268,8 @@ struct Surface_fixture_2 {
266268
template <typename Graph>
267269
struct Surface_fixture_3 {
268270
Surface_fixture_3() {
269-
assert(read_a_mesh(m, "data/fixture3.off"));
271+
const bool is_reading_successful = read_a_mesh(m, "data/fixture3.off");
272+
assert(is_reading_successful);
270273
assert(CGAL::is_valid_polygon_mesh(m));
271274

272275
typename boost::property_map<Graph, CGAL::vertex_point_t>::const_type
@@ -312,7 +315,8 @@ struct Surface_fixture_3 {
312315
template <typename Graph>
313316
struct Surface_fixture_4 {
314317
Surface_fixture_4() {
315-
assert(read_a_mesh(m, "data/fixture4.off"));
318+
const bool is_reading_successful = read_a_mesh(m, "data/fixture4.off");
319+
assert(is_reading_successful);
316320
assert(CGAL::is_valid_polygon_mesh(m));
317321

318322
typename boost::property_map<Graph, CGAL::vertex_point_t>::const_type
@@ -347,7 +351,8 @@ struct Surface_fixture_4 {
347351
template <typename Graph>
348352
struct Surface_fixture_5 {
349353
Surface_fixture_5() {
350-
assert(read_a_mesh(m, "data/add_face_to_border.off"));
354+
const bool is_reading_successful = read_a_mesh(m, "data/add_face_to_border.off");
355+
assert(is_reading_successful);
351356
assert(CGAL::is_valid_polygon_mesh(m));
352357

353358
typename boost::property_map<Graph, CGAL::vertex_point_t>::const_type
@@ -377,7 +382,8 @@ struct Surface_fixture_5 {
377382
template <typename Graph>
378383
struct Surface_fixture_6 {
379384
Surface_fixture_6() {
380-
assert(read_a_mesh(m, "data/quad.off"));
385+
const bool is_reading_successful = read_a_mesh(m, "data/quad.off");
386+
assert(is_reading_successful);
381387
assert(CGAL::is_valid_polygon_mesh(m));
382388

383389
typename boost::graph_traits<Graph>::halfedge_descriptor h;
@@ -396,7 +402,8 @@ struct Surface_fixture_6 {
396402
template <typename Graph>
397403
struct Surface_fixture_7 {
398404
Surface_fixture_7() {
399-
assert(read_a_mesh(m, "data/cube.off"));
405+
const bool is_reading_successful = read_a_mesh(m, "data/cube.off");
406+
assert(is_reading_successful);
400407
assert(CGAL::is_valid_polygon_mesh(m));
401408

402409
h = *(halfedges(m).first);
@@ -409,7 +416,8 @@ struct Surface_fixture_7 {
409416
template <typename Graph>
410417
struct Surface_fixture_8 {
411418
Surface_fixture_8() {
412-
assert(read_a_mesh(m, "data/fixture5.off"));
419+
const bool is_reading_successful = read_a_mesh(m, "data/fixture5.off");
420+
assert(is_reading_successful);
413421
assert(CGAL::is_valid_polygon_mesh(m));
414422

415423
typename boost::property_map<Graph, CGAL::vertex_point_t>::const_type

0 commit comments

Comments
 (0)