stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: svn commit: r407684 - /incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp
Date Fri, 19 May 2006 15:58:12 GMT
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 as
> 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