Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 11435 invoked from network); 7 Aug 2006 23:36:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Aug 2006 23:36:59 -0000 Received: (qmail 78346 invoked by uid 500); 7 Aug 2006 23:36:59 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 78286 invoked by uid 500); 7 Aug 2006 23:36:59 -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 78275 invoked by uid 99); 7 Aug 2006 23:36:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Aug 2006 16:36:59 -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; Mon, 07 Aug 2006 16:36:56 -0700 Received: from qxvcexch01.ad.quovadx.com (qxvcexch01.ad.quovadx.com [192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.4) with ESMTP id k77NaQOp011297 for ; Mon, 7 Aug 2006 23:36:26 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 7 Aug 2006 17:36:35 -0600 Message-ID: <44D7CE86.5060503@roguewave.com> Date: Mon, 07 Aug 2006 17:36:38 -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: [PATCH] 23.list.iterators 23.list.cons tests with environment References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 07 Aug 2006 23:36:35.0784 (UTC) FILETIME=[52662480:01C6BA7A] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Farid Zaripov wrote: > I have sent this letter to the stdcxx-dev@ at Friday, but its has not > reached, possible due to excess of a limit for the size of attachments. > > I resend this letter. The source files are here: > http://zaripov.kiev.ua/src/ > > ------------------------------------------------------------------------ > ------ > > The files attached is new tests of the list container with > supporting files and changes to the existing files. > > > ChangeLog: [...] > * 23.list.iterators.cpp: New test exercising the list members: > begin(), end(), rbegin(), rend(), front(), back(), get_allocator(). > ------------------------------------------------------------------------ > > /*************************************************************************** > * > * 23.list.iterators.cpp - list test exercising lib.list.iterators > * > * $Id: 23.list.iterators.cpp > * > *************************************************************************** > * > * Copyright 2006 The Apache Software Foundation or its licensors, > * as applicable. Please use the new notice. [...] > // used to exercise > // begin () and rend () and front () > static const ContainerTestCase > begin_void_test_cases [] = { > > #undef TEST > #define TEST(lst, res) { \ > __LINE__, -1, -1, -1, -1, -1, \ > lst, sizeof (lst) - 1, \ > 0, 0, 0, res, 0 \ > } > > // +--------------------------------- controlled sequence > // | +---------------- expected result > // | | > // V V > TEST ("", NPOS), NPOS is specific to string. We should use a different name here or simply -1 to denote the same thing. > TEST ("a", 'a' ), > TEST ("", '\0'), FWIW, there is no need to exercise any other containers with the NUL character. We can just stick to the characters of the alphabet since they are easier to read. (The reason NUL is important to the string tests is to detect the reliance to the traditional C strxxx functions which operate on NUL-terminated character strings and do not permit embedded NULs). [...] > > static inline char to_char(char c) [...] > static inline char to_char(const X& x) I would suggest renaming these to something like to_value() or to_int() (as I mentioned previously, there's no reason to test containers with chars). [...] > // const bool success = (1 == rw_match (&exp_res, res_ptr, 1)); > // due to bug in rw_match we can't compare the single characters What bug is this? We should fix it. Martin