stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Pevtsov" <>
Subject RE: svn commit: r407684 - /incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp
Date Mon, 22 May 2006 15:11:06 GMT
I updated the tests which exercises the exception safety:

I used Function.alloc_id_ to determine the number of the expected
Also there is small changes to 21.strings.cpp allowing to avoid
duplicating strings in log info for std::string and std::wstring.

With best wishes,
Anton Pevtsov

-----Original Message-----
From: Martin Sebor [] 
Sent: Friday, May 19, 2006 19:58
Subject: Re: svn commit: r407684 -

Anton Pevtsov wrote:
> Martin Sebor wrote:
>>Anton, the most important bit here enables the exception safety tests
> for all test cases (except those that test other exceptions such as >
> out_of_range). I'd like to do the same in the rest of     > the tests
> well.
> I see, thanks.  I made few changes to force it working on Windows 
> without asserts. Also I suggest to add new helper functions

I've been thinking about these kinds of helpers and realized that we
don't really need them. All we need is to change the driver to pass the
entire StringMembers::Function object to the test function template
instead of just OverloadId. That way we can simply look at the alloc_id_
or traits_id_ fields when we need to know what type of allocator or
traits we're using. It does mean changing all the tests...

> Sounds good. This allows us to avoid the tricky code, but how about 
> the exercising of the length_error for std::string and std::wstring ?

We can't use the same approach for these specializations. There's no
(reliable or conforming) way to change their behavior since they are (or
may be) instantiated in the library.


View raw message