Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 734 invoked from network); 9 Jun 2006 18:12:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jun 2006 18:12:40 -0000 Received: (qmail 10287 invoked by uid 500); 9 Jun 2006 18:12:40 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 10272 invoked by uid 500); 9 Jun 2006 18:12:40 -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 10261 invoked by uid 99); 9 Jun 2006 18:12:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jun 2006 11:12:40 -0700 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; Fri, 09 Jun 2006 11:12:39 -0700 Received: from qxvcexch01.ad.quovadx.com ([192.168.170.59]) by moroha.quovadx.com (8.13.4/8.13.4) with ESMTP id k59ICDJo021401 for ; Fri, 9 Jun 2006 18:12:14 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 9 Jun 2006 12:12:33 -0600 Message-ID: <4489BA04.8050200@roguewave.com> Date: Fri, 09 Jun 2006 12:12:20 -0600 From: Martin Sebor Organization: Rogue Wave Software 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: svn commit: r412249 - in /incubator/stdcxx/trunk/tests: include/21.strings.h src/21.strings.cpp References: <4D6A8407B7AC6F4D95B0E55C4E7C4C62045BD64B@exmsk.moscow.vdiweb.com> In-Reply-To: <4D6A8407B7AC6F4D95B0E55C4E7C4C62045BD64B@exmsk.moscow.vdiweb.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 09 Jun 2006 18:12:33.0108 (UTC) FILETIME=[4749F940:01C68BF0] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Anton Pevtsov wrote: [...] > Yes it is possible to reverse the expanded substring in known range, but > we check results in other way: > > std::size_t match = rw_match (tcase.res, str.data (), > tcase.nres); > > Here the rw_match calls rw_expand. These functions know nothing about > the iterators and range bounds and this seems to be a problem. I'm not sure I understand why that would be a problem. If the driver replaced the whole tcase structure with one created to match the expected result when reverse_iterator is used why would rw_match() or rw_expand() care? (The driver would have to expand the hardcoded source string and argument in order to figure out the new expected result). Suppose the test case is: string ("abcdef").insert (begin() + 2, first, last); with the range denoted by the offset into the string and the number of characters, extent, like so: (offset == 1) and (extent == 3). The test invokes insert with (first == begin() + offset) and (last == begin() + offset + extent). The test invokes insert with (first == begin() + offset) and (last == first + extent) and expects the result to be the hardcoded "abbcdcdef". When the driver gets around to exercising reverse_iterators it changes the offset so that (new_offset == str_size - offset - extent) and the expected result to "abdbccdef". The test invokes the function with (first = rbegin() + new_offset) and (last == first + extent). Martin