[Dune] [#1130] Write Dune-specific assert which ignores -DNDEBUG
flyspray at dune-project.org
Fri Jun 15 11:59:38 CEST 2012
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Christoph Grüninger (gruenich)
Attached to Project - Dune
Summary - Write Dune-specific assert which ignores -DNDEBUG
Task Type - Feature Request
Category - Tests
Status - New
Assigned To -
Operating System - Unspecified / All
Severity - Low
Priority - High
Reported Version - SVN (pre2.3)
Due in Version - 2.3
Due Date - Undecided
Details - Citing from Jö's message :
That means we want to run many of the tests once with -DNDEBUG
and once with -UNDEBUG. In both cases we want to always enable those misused
asserts in the testing code. We could do that in the following way:
- introduce a macro unittest_assert() which is always enabled and use that in
the relevant testing code. Or use "if(!...) abort();" or similar.
- when compiling with -DENABLE_DEBUG forcibly undefine NDEBUG in the test
- when compiling with -DDISABLE_DEBUG forcibly define NDEBUG in the test
- otherwise, leave NDEBUG untouched.
We can put that stuff in a header. But we should use seperate headers for
unittest_assert() and the NDEBUG-fiddling, since the latter needs a very
specific position in the list of includes.
Are all corner-cases covered by this scheme?
More information can be found at the following URL:
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
More information about the Dune