incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: [jira] Created: (STDCXX-72) [25.adjacent.find.cpp] predicate form of std::adjacent_find not exercised
Date Fri, 02 Dec 2005 17:01:03 GMT
Martin Sebor wrote:
> Anton Pevtsov wrote:
> 
>> The attached file contains my attempt to fix this problem - I added test
>> for the predicate version of adjacent_find.
> 
> 
> This looks good, thanks! I'll go ahead and commit it (we're having
> network trouble so won't probably be until tomorrow).

This is in: http://svn.apache.org/viewcvs.cgi?rev=351771&view=rev

One thing, though. We should avoid using other parts of the library
(such as std:equal_to) when exercising these algorithms. There are
at least two reasons for this: First, the other parts of the library
might themselves be broken which could skew the test results of the
algorithms (and yield false negatives, or worse, false positives).
Second, with the function objects defined by the library we don't
have as much control over the testing environment as we would with
those written specifically for testing purposes.

So instead of the standard function objects we ought to roll our own,
such as we do in 25.for.each.cpp, and use them in the algorithms tests.
Once we've implemented a few of these critters we can move them to
alg_test.h.

Martin

Mime
View raw message