Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 10967 invoked from network); 3 May 2006 01:39:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 May 2006 01:39:33 -0000 Received: (qmail 82197 invoked by uid 500); 3 May 2006 01:39:33 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 82181 invoked by uid 500); 3 May 2006 01:39:33 -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 82167 invoked by uid 99); 3 May 2006 01:39:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 May 2006 18:39:33 -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; Tue, 02 May 2006 18:39:32 -0700 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 k431d8lj031837 for ; Wed, 3 May 2006 01:39:08 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 2YG6D0VD; Tue, 2 May 2006 19:35:45 -0600 Message-ID: <445809D4.1010600@roguewave.com> Date: Tue, 02 May 2006 19:39:32 -0600 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: svn commit: r398856 - /incubator/stdcxx/trunk/tests/strings/21.string.find.cpp References: <20060502083824.50282.qmail@minotaur.apache.org> In-Reply-To: <20060502083824.50282.qmail@minotaur.apache.org> 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 antonp@apache.org wrote: > Author: antonp > Date: Tue May 2 01:37:49 2006 > New Revision: 398856 > > URL: http://svn.apache.org/viewcvs?rev=398856&view=rev [...] > +// used to exercise > +// find (const value_type*, size_type, size_type) > +static const TestCase ptr_size_size_test_cases [] = { > + > +#undef TEST > +#define TEST(str, arg, off, size, res, bthrow) \ > + { __LINE__, off, size, -1, -1, -1, str, sizeof str - 1, arg, \ > + sizeof arg - 1, 0, 0, res, bthrow } > + > + // +--------------------------------------- controlled sequence > + // | +-------------------------- sequence to be found > + // | | +---------- find() off argument > + // | | | +------ find() n argument > + // | | | | +-- expected result > + // | | | | | exception info > + // | | | | | | 0 - no exception > + // | | | | | | 1 - length_error > + // | | | | | | > + // | | | | | +----+ > + // V V V V V V [...] > + TEST ("", "cba", 0, -1, 0, 1), > + TEST ("abcdefghij", "cba", 0, -1, 0, 1), > + TEST (LSTR, "xxx", 0, -1, 0, 1), > + TEST ("abcdefghij", LSTR, 0, -1, 0, 1), I'm not certain this is correct. Can you explain what makes you think the find function should throw length_error in these cases (or in any case for that matter)? Thanks Martin