Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 9556 invoked from network); 21 Nov 2005 17:57:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Nov 2005 17:57:15 -0000 Received: (qmail 26044 invoked by uid 500); 21 Nov 2005 17:57:15 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 26013 invoked by uid 500); 21 Nov 2005 17:57:14 -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 26002 invoked by uid 99); 21 Nov 2005 17:57:14 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2005 09:57:14 -0800 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, 21 Nov 2005 09:58:46 -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 S0A37F6S; Mon, 21 Nov 2005 10:52:32 -0700 Message-ID: <43820B19.9000601@roguewave.com> Date: Mon, 21 Nov 2005 10:59:53 -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: question about 25.for.each.cpp (was Re: Stdcxx test porting) References: <4D6A8407B7AC6F4D95B0E55C4E7C4C6202E455EF@exmsk.moscow.vdiweb.com> In-Reply-To: <4D6A8407B7AC6F4D95B0E55C4E7C4C6202E455EF@exmsk.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: > Martin, [...] > Btw, I have a question about the for_each algorithm test. Shall we test > this algorithm in additional with InputIterator? Actually we test it > with Forward, Bidirectional and Random Access iterators, but as far as I > know the for_each algorithm requires InputIterator. Yes, we should, eventually. Good catch! I'm fine with you just porting the test as they are, or with enhancing them at the same as we're discussing. I think doing both in one go might be less time-consuming than porting them first and then coming back to them and enhancing them. In addition, while you're doing the porting I would encourage you to think about how to improve and simplify the tests even further. For instance, the for.each test isn't quite as exhaustive as it should be (the function object isn't being sufficiently exercised), nor does it readily lend itself to being enhanced to be (ditto for the equal test). I think the adjacent.find test is structured much better (with one test case per line) and would eventually like to rewrite the other tests along the same lines. Another example of where the tests could be improved is the amount of boilerplate code required to set them up (the run_tests function and all the invocations of the specializations of the test function). It would be nice to reduce this overhead by getting the test driver to do all of this work and have the test just provide the data (i.e., the addresses of the functions and the names of the command line arguments to enable/disable them). Martin