stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: string exception safety tests
Date Wed, 03 May 2006 16:08:20 GMT
Anton Pevtsov wrote:
> I am not that I understand your completely. Do you mean that the
> exception safety should be verified for each test case (say first pass
> with exception and second with expected result) instead of the
> verification on the special cases only (current state)?


> If yes, I expect that the execution time of each test doubled.

Probably quite a bit more than that, since each call would be
executed repeatedly in loop with an exception thrown in each
iteration. That should be fine except perhaps in the test cases
involving very long strings. We might want to reserve a special
value (e.g., -1 :) to *disable* the exception safety tests in
a small number of test cases (as opposed to enabling then for
just a subset of them as we do now).


> With best wishes,
> Anton Pevtsov
> -----Original Message-----
> From: Martin Sebor [] 
> Sent: Wednesday, May 03, 2006 05:26
> To:
> Subject: string exception safety tests
> Currently there is just one exception safety per member function. But
> since the exception safety test loops until no exception is thrown and
> the operation succeeds, returning the expected result, is there any
> reason not to exercise exception safety in each test case
> unconditionally?
> Martin

View raw message