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.merge
Date Tue, 07 Feb 2006 16:37:42 GMT
Martin Sebor wrote:
> Btw., the StrictWeakLess functor (that I took the liberty to rename to
just Less) is probably going to be usable in other tests, no? If so, we
should move it to alg_test.h.

Yes, moving of the StrictWeakLess functor to alg_test.h will be useful.

Martin Sebor wrote:
> Incidentally, the test takes very long to compile (see the times below
for gcc 4.0.2 on a 400 MHz Solaris 9/SPARC). 
[...]
> iterators and the algorithm to test), and pass this object by
reference to the base class to the test function.

I'll try this way.

Thanks,
Anton Pevtsov


-----Original Message-----
From: Martin Sebor [mailto:sebor@roguewave.com] 
Sent: Tuesday, February 07, 2006 02:55
To: stdcxx-dev@incubator.apache.org
Subject: Re: test for lib.alg.merge


Anton Pevtsov wrote:
> The attached file contains the tests for the lib.alg.merge algorithm.

Okay, thanks. I'll trust you that the test does the right thing :)
Committed thus: http://svn.apache.org/viewcvs.cgi?rev=375412&view=rev

Btw., the StrictWeakLess functor (that I took the liberty to rename to
just Less) is probably going to be usable in other tests, no? If so, we
should move it to alg_test.h.

Incidentally, the test takes very long to compile (see the times below
for gcc 4.0.2 on a 400 MHz Solaris 9/SPARC). I suspect it's because of
the large number of instantiations of the test function. It would be
nice to do something about it. One idea might be factor all the code
that inevitably must be iterator- and algorithm-specific to a small
helper template derived from an ordinary (non-template) base class,
construct an object of the appropriate derived type in the function that
sets up all the template arguments (i.e., the types of the iterators and
the algorithm to test), and pass this object by reference to the base
class to the test function.

The timing:
   real    1m34.767s
   user    1m30.590s
   sys     0m2.280s


> 
...
> /*********************************************************************
> ******
>  *
>  * sort.cpp - test exercising 25.3.1-3 [lib.alg.sort]

Please remember to change this comment when copying from an existing
test :)

Martin

Mime
View raw message