Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 30183 invoked from network); 25 Mar 2006 22:43:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Mar 2006 22:43:24 -0000 Received: (qmail 62529 invoked by uid 500); 25 Mar 2006 22:43:23 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 62516 invoked by uid 500); 25 Mar 2006 22:43:23 -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 62498 invoked by uid 99); 25 Mar 2006 22:43:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Mar 2006 14:43:23 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Mar 2006 14:43:22 -0800 Received: from bco-exchange.bco.roguewave.com (bco-exchange.bco.roguewave.com [172.19.31.48]) by moroha.quovadx.com (8.13.4/8.13.4) with ESMTP id k2PMgwiH028172 for ; Sat, 25 Mar 2006 22:42:59 GMT 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 HQZ725XJ; Sat, 25 Mar 2006 15:41:15 -0700 Message-ID: <4425C88F.1060406@roguewave.com> Date: Sat, 25 Mar 2006 15:47:43 -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 21.string.copy References: <4422C957.4030909@moscow.vdiweb.com> In-Reply-To: <4422C957.4030909@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 latest version of the test is attached. I plan to commit it to the > svn, ok? Actually, there are a few more simplifying improvements that I think we still ought to make. First, we can use the third argument to copy (pos) to distinguish between the two overloads. When pos is negative (say, -1) the two argument overload will be invoked. Otherwise, the test function will invoke the three-argument overload. That will allow us to eliminate the (redunant) function tag CTag. Second, in the test function, I would like to use rw_match() instead of Traits::compare() to verify that the contents of the buffer match the expected result. This will let us avoid widening the expected result and enable us to display the offset of the first mismatched character (if any) in the rw_assert() diagnostic message. Lastly, in the test_cases array, I think the order of data should match the order of function arguments (i.e., controlled sequence, n, the second argument to copy, and pos, the third argument which should be -1 for the test cases exercising the two-argument overload of the member function). Oh, and one minor nit :) If you could move the indented #ifndef reprocessor directives to the left margin that would be great :) Thanks! Martin