Whats happening without _GLIBCXX_ASSERT in testsuite?

Paolo Carlini pcarlini@suse.de
Fri May 27 13:23:00 GMT 2005

chris jefferson wrote:

> Sorry, I did remember, but should perhaps have been clearer about what
> I meant in my mail. I remember you telling me this was an older method
> of running the testsuite.

I told you much more. I don't like being addressed private email,
answering plenty of details, and then reading messages that gives the
impression that completely new things are being discovered and noticed.

> What I didn't realise until now (but perhaps should have) is that it
> is totally broken, and doesn't actually do anything useful, although
> it looks a bit like it does at first.

It's not at all broken, it's simply *unused*. A completely different
thing. As long as you remember to add a test bool before using VERIFY in
a given scope, everything will remain in this state, with test becoming
false as soon as a test goes wrong. And, if you want to actually use it,
it's very easy, for instance you can return !test from main, instead of
zero, or something very similar for more complex testcases.

Indeed, we can as well remove the whole thing, if we really want. I have
no principled objections. I would not have objections, because, while
true that avoids using assert, thanks to DejaGNU checking the return
value, on the other hand, as soon as you have more than one VERIFY,
debugging becomes much more difficult, because you don't have the useful
info about the line number that assert prints (which we all like,
otherwise we could use abort() in debug-mode, by the way).


More information about the Libstdc++ mailing list