Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 22186 invoked from network); 24 Mar 2006 16:12:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Mar 2006 16:12:59 -0000 Received: (qmail 7387 invoked by uid 500); 24 Mar 2006 16:12:58 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 7371 invoked by uid 500); 24 Mar 2006 16:12:58 -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 7360 invoked by uid 99); 24 Mar 2006 16:12:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Mar 2006 08:12:58 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of AntonP@moscow.vdiweb.com designates 195.210.189.132 as permitted sender) Received: from [195.210.189.132] (HELO exmsk.moscow.vdiweb.com) (195.210.189.132) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Mar 2006 08:12:55 -0800 Received: from [10.11.0.125] ([10.11.0.125]) by exmsk.moscow.vdiweb.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 24 Mar 2006 19:12:17 +0300 Message-ID: <44241A60.4040000@moscow.vdiweb.com> Date: Fri, 24 Mar 2006 19:12:16 +0300 From: Anton Pevtsov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040514 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: svn commit: r387797 - /incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp Content-Type: multipart/mixed; boundary="------------090106070003000706000803" X-OriginalArrivalTime: 24 Mar 2006 16:12:17.0424 (UTC) FILETIME=[B8993900:01C64F5D] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------090106070003000706000803 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit The updated test version which uses generic strings (/*.*Gs} format is attached. Here is the change log: 2006-03-24 Anton Pevtsov * 21.string.replace.cpp (test_replace): Strings format in rw_assert calls changed to generic strings, workaround for UserChars strings output removed as obsolete. With best wishes, Anton Pevtsov -----Original Message----- From: antonp@apache.org [mailto:antonp@apache.org] Sent: Wednesday, March 22, 2006 11:41 To: stdcxx-commits@incubator.apache.org Subject: svn commit: r387797 - /incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp Author: antonp Date: Wed Mar 22 00:40:57 2006 New Revision: 387797 URL: http://svn.apache.org/viewcvs?rev=387797&view=rev Log: 2006-03-22 Anton Pevtsov * 21.string.replace.cpp (LPAR): Macro definition changed (long_parity_len): Removed as obsolete. (ReplaceTags): New enum containing the descriptive "which" arguments. (test_cases): Strings alignment changed. (test_replace): Changed to use ReplaceTags members, type of "which" variable changed to ReplaceTags. (note_test_disabled): The same. (run_test): The same. Modified: incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp --------------090106070003000706000803 Content-Type: text/plain; name="21.string.replace.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="21.string.replace.diff" Index: 21.string.replace.cpp =================================================================== --- 21.string.replace.cpp (revision 388480) +++ 21.string.replace.cpp (working copy) @@ -403,15 +403,6 @@ TestString s_src (wsrc, cs.src_len); TestString s_res (wres, res_len); - // used to workaround the problem with empty UserChar strings output - static charT wempty [10]; - rw_widen (wempty, "", 7); - - const TestString s_empty (wempty, 7); - - bool src_use_empty = - 0 == s_src.size () && sizeof (charT) > sizeof (wchar_t); - const int first1_off = cs.pos1; const int last1_off = cs.pos1 + cs.num1; @@ -448,7 +439,7 @@ "line %d. std::basic_string<%s, %s<%2$s>, %s<%2$s>>(%{#*s})." \ "replace (%{?}%zu%{;}%{?}begin + %zu%{;}" \ "%{?}, %zu%{;}%{?}, begin + %zu%{;}" \ - "%{?}, %{#*s}%{;}%{?}, %{#*S}%{;}" \ + "%{?}, %{/*.*Gs}%{;}%{?}, string(%{/*.*Gs})%{;}" \ "%{?}, %zu%{;}%{?}, %zu%{;}" \ "%{?}, %zu%{;}%{?}, %#c%{;}" \ "%{?}, begin + %zu%{;}%{?}, begin + %zu%{;})" @@ -458,13 +449,14 @@ cs.str, r_char >= which, cs.pos1, r_iters_ptr <= which, first1_off, \ r_char >= which, cs.num1, r_iters_ptr <= which, last1_off, \ r_ptr == which || r_num_ptr == which || r_iters_ptr == which || \ - r_iters_num_ptr == which, int (cs.src_len), cs.src, r_str == which || \ - r_num_str == which || r_iters_str == which, int (sizeof (charT)), \ - src_use_empty ? &s_empty : &s_src, r_char == which || \ - r_iters_char == which, cs.cnt, r_num_str == which, cs.pos2, \ - r_num_ptr == which || r_num_str == which || r_iters_num_ptr == which, \ - cs.num2, r_char == which || r_iters_char == which, cs.ch, \ - r_iters_range == which, first2_off, r_iters_range == which, last2_off + r_iters_num_ptr == which, int (sizeof (charT)), int (cs.src_len), wsrc, \ + r_str == which || r_num_str == which || r_iters_str == which, \ + int (sizeof (charT)), int (s_src.size ()), s_src.c_str (), \ + r_char == which || r_iters_char == which, cs.cnt, r_num_str == which, \ + cs.pos2, r_num_ptr == which || r_num_str == which || \ + r_iters_num_ptr == which, cs.num2, r_char == which || \ + r_iters_char == which, cs.ch, r_iters_range == which, first2_off, \ + r_iters_range == which, last2_off // verify the results if (r_num_str == which || r_iters_str == which) { @@ -486,16 +478,10 @@ !TestString::traits_type::compare (res_str.c_str(), ctl_str.c_str(), ctl_str.size ()); - // to workaround UserChar's empty string output problem - const bool use_empty_res = - 0 == res_str.size () && sizeof (charT) > sizeof (wchar_t); - const bool use_empty_ctl = - 0 == ctl_str.size () && sizeof (charT) > sizeof (wchar_t); - rw_assert (success, 0, cs.line, - CALLFMAT " == %{#*S}, got %{#*S}", CALLARGS, - int (sizeof (charT)), use_empty_ctl ? &s_empty : &ctl_str, - int (sizeof (charT)), use_empty_res ? &s_empty : &res_str); + CALLFMAT " == %{/*.*Gs}, got %{/*.*Gs}", CALLARGS, + int (sizeof (charT)), int (ctl_str.size ()), ctl_str.c_str (), + int (sizeof (charT)), int (res_str.size ()), res_str.c_str ()); #ifndef _RWSTD_NO_EXCEPTIONS --------------090106070003000706000803--