COIN-OR::LEMON - Graph Library

Opened 10 years ago

Closed 10 years ago

#99 closed task (fixed)

Revise check() macro

Reported by: kpeter Owned by: alpar
Priority: major Milestone: LEMON 1.0 release
Component: core Version: hg main
Keywords: Cc:
Revision id:

Description (last modified by kpeter)

test/test_tools.h contains

  • the check() macro, which is used in all test files, and
  • some tools about Petersen (sub)graphs.

I suggest separating the widely used check() macro and the Petersen tools, e.g. put the macro into a assert.h.

Shouldn't we use LEMON_ASSERT instead of check() or shouldn't check() be an alias for it?

Change History (5)

comment:1 Changed 10 years ago by kpeter

  • Description modified (diff)

comment:2 in reply to: ↑ description ; follow-up: Changed 10 years ago by alpar

Shouldn't we use LEMON_ASSERT instead of check() or shouldn't check() be an alias for it?

No, because check() should never be switched off.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 10 years ago by kpeter

Replying to alpar:

No, because check() should never be switched off.

OK.

I think the graph related specific tools should be moved from test_tools.h to (di)graph_test.h and maybe only the check() macro should be in test_tools.h.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 10 years ago by kpeter

Replying to kpeter:

I think the graph related specific tools should be moved from test_tools.h to (di)graph_test.h and maybe only the check() macro should be in test_tools.h.

It is done in [02f4d5d9bfd7]. Now test_tools.h contains only the check() macro.
Is it okay or should it be moved to assert.h?

comment:5 in reply to: ↑ 4 Changed 10 years ago by alpar

  • Resolution set to fixed
  • Status changed from new to closed

Replying to kpeter:

It is done in [02f4d5d9bfd7]. Now test_tools.h contains only the check() macro.
Is it okay or should it be moved to assert.h?

No it shouldn't. The current situation is perfect.

Note: See TracTickets for help on using tickets.