Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 85390 invoked from network); 6 Feb 2006 23:51:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Feb 2006 23:51:21 -0000 Received: (qmail 47369 invoked by uid 500); 6 Feb 2006 23:51:20 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 47355 invoked by uid 500); 6 Feb 2006 23:51:20 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 47344 invoked by uid 99); 6 Feb 2006 23:51:19 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 15:51:19 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [12.17.213.84] (HELO bco-exchange.bco.roguewave.com) (12.17.213.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 15:51:18 -0800 Received: from [10.70.3.113] (10.70.3.113 [10.70.3.113]) by bco-exchange.bco.roguewave.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id ZGW28R1J; Mon, 6 Feb 2006 16:43:21 -0700 Message-ID: <43E7E1D8.50400@roguewave.com> Date: Mon, 06 Feb 2006 16:55:04 -0700 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: test for lib.alg.merge References: <43E7783E.6060305@moscow.vdiweb.com> In-Reply-To: <43E7783E.6060305@moscow.vdiweb.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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