You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Anton Pevtsov <an...@moscow.vdiweb.com> on 2006/03/24 17:12:16 UTC
Re: svn commit: r387797 - /incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp
The updated test version which uses generic strings (/*.*Gs} format is
attached.
Here is the change log:
2006-03-24 Anton Pevtsov <an...@moscow.vdiweb.com>
* 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 <an...@moscow.vdiweb.com>
* 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
Re: svn commit: r387797 - /incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp
Posted by Martin Sebor <se...@roguewave.com>.
Anton Pevtsov wrote:
> The updated test version which uses generic strings (/*.*Gs} format is
> attached.
Looks good.
Martin
Btw., ...
[...]
> "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
...yikes! These conditionals aeem to getting out of control!
We should think about how to simplify this stuff, it's almost
impossible to read.