incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Pevtsov" <Ant...@moscow.vdiweb.com>
Subject RE: RE: test for lib.alg.remove
Date Wed, 21 Dec 2005 16:46:45 GMT

Martin Sebor wrote:
> I'm trying this format:
>
>   remove<ForwardIterator>("aba", ..., 'a') ==>
>   ">90:b<91:b92:a"; unstable at offset 0 element ids: 90 and 91
>
> Let me know what you think.

Yes, this format will be more suitable for the debugging.
Maybe it will be useful to add a parameter which tells the ToString
class how to interpret the X value (is it character or integer).

Also I suggest to reuse the ToString class in other algorithms tests
(for example, replace). And there is EqualityPredicate structure in the
remove test - it may be reused in other tests (e.g. replace) too. So it
will be nice to move them to the alg_test.h. What do you think about it?

I can create this patch for alg_test.h and 25_remove.cpp and deliver it
with the ported test for the replace algorithm (I am working on this
test now).


With best wishes,
Anton Pevtsov


-----Original Message-----
From: Martin Sebor [mailto:sebor@roguewave.com] 
Sent: Wednesday, December 21, 2005 00:55
To: stdcxx-dev@incubator.apache.org
Subject: Re: test for lib.alg.remove


Martin Sebor wrote:
[...]
> Now, consider this more involved output:
> 
> # ITRACE_ASSERTION (S0) (3 lines):
> # TEXT: line 279: remove<ForwardIterator>("aba", ..., 'a') => >90:98<,

> 91:98, 92:97 unstable: incorrect elements order at 0 position elements
> ids: 90 and 91
> # LINE: 467
> 
> Can you tell what all the pairs of numbers separated by colons mean? I
> can because I wrote the formatting function and you now can as well 
> because you reimplemented it, but I'll bet no one else would be able 
> to. (They denote a <id>:<value> pair of each element in the resulting 
> sequence, with each <id> being unique among all objects of the type in

> a program; knowing the id is important in determining the positions of

> copies of the moved elements).
> 
> I'm not sure what would be a better format in this case, though.

I'm trying this format:

   remove<ForwardIterator>("aba", ..., 'a') ==>
   ">90:b<91:b92:a"; unstable at offset 0 element ids: 90 and 91

Let me know what you think.

Martin

Mime
View raw message