[Dune] [Dune-Commit] dune-grid r8200 - trunk/dune/grid/test
Christian Engwer
christian.engwer at uni-muenster.de
Thu May 31 19:01:46 CEST 2012
On Thu, May 31, 2012 at 06:55:30PM +0200, Jö Fahlke wrote:
> Am Thu, 31. May 2012, 16:24:07 +0200 schrieb Christian Engwer:
> > I disagree. The tests aren't production code and usually not run by
> > the users. I think it is reasonable to use assert in different places
> > of the code, but the tests should make use of these assertions.
> >
> > I'm not sure how easy it is to undefine NDEBUG via the Makefiles.
>
> I'm quiet certain that it isn't possible in any clean way.
>
> > The
> > solution with #undef NDEBUG in the header is also not really nice,
> > although perhaps the better option. In this case I would create an
> > other header which does exactly this, or we might even add the
> > appropricate code to config.h.
>
> If you really want to undef NDEBUG, it's probably best to do it from the .cc
> file of the test itself, because then at least you have a hint in the same
> file of what is going on.
Either way, I don't think it is useful to change all assertions to
some _always on_ checks and I don't think it is useful to run tests
without these checks.
Christian
More information about the Dune
mailing list