Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 91056 invoked from network); 29 Jun 2006 22:29:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Jun 2006 22:29:17 -0000 Received: (qmail 73942 invoked by uid 500); 29 Jun 2006 22:29:16 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 73925 invoked by uid 500); 29 Jun 2006 22:29:16 -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 73914 invoked by uid 99); 29 Jun 2006 22:29:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jun 2006 15:29:16 -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; Thu, 29 Jun 2006 15:29:15 -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 k5TMSYN1023471 for ; Thu, 29 Jun 2006 22:28:34 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 29 Jun 2006 16:29:20 -0600 Message-ID: <44A45437.9050404@roguewave.com> Date: Thu, 29 Jun 2006 16:29:11 -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: test for lib.string.io References: <4D6A8407B7AC6F4D95B0E55C4E7C4C62047935DD@exmsk.moscow.vdiweb.com> In-Reply-To: <4D6A8407B7AC6F4D95B0E55C4E7C4C62047935DD@exmsk.moscow.vdiweb.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 29 Jun 2006 22:29:20.0111 (UTC) FILETIME=[76D70FF0:01C69BCB] 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 updated 21.string.io test with required changes to the test driver > is here: > http://people.apache.org/~antonp/stdcxx06292006/ I noticed _rw_sigcat() simply appends the string "istream" or "ostream" rather than the fully expanded template name. I think we should format them the same way as string, i.e., "istream" when charT=char and Traits=char_traits, "basic_istream" when Traits=char_traits, and "basic_istream" otherwise, with charT and Traits expanded to the actual type, of course). Also, I think inserter and extractor (rather than op_in and op_out) would better names for the command line options. And similarly for the StringIds constants. Assuming you agree with these suggestions please go ahead and commit the changes to the driver (in a separate check-in). I also have a few comments on the test itself. Feel free to commit the test as it is for now (w/o making the changes I propose below). We can make some or all of the changes in a subsequent commit. The name STR_SPACES suggests that it stands for a string consisting of 2 or more spaces when it actually is a string consisting of one of each of the whitespace characters (in the "C" locale). I suggest to rename it to WHITESPACE. The macros _RWSTD_SIZE_T, _RWSTD_STREAMSIZE, etc. should only be used in library and general test suite headers to avoid namespace pollution. Tests should use the standard names wherever possible. The macro _RWSTD_STATIC_CAST() should be used instead of the C++ keyword static_cast. In general it's not safe to assume that std::ctype is defined for any T other than char and wchar_t so the Ctype facet should not derive from it. Btw., it might make sense to define Ctype as a template and specialize if for char, wchar_t, and UserChar, similarly to UserTraits. That would let us test whether it is used irrespective of char_type and allow us to exercise the behavior of the functions in non-C locales (where whitespace might include other characters besides " \f\n\r\t\v"). This will be useful in other tests exercising iostreams. When installing the Ctype facet in a locale it's more efficient to create the facet on the stack instead of dynamically allocating it on the heap. I.e., I suggest Ctype ctyp; Istream is (&inbuf); Ostream os (&outbuf); is.imbue (std::locale (is.getloc (), &ctyp)); os.imbue (is.getloc ()); instead of // add facet std::ctype is.imbue (std::locale (is.getloc (), new Ctype)); os.imbue (std::locale (os.getloc (), new Ctype)); Martin