You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2006/04/24 21:22:08 UTC
svn commit: r396666 - /incubator/stdcxx/trunk/tests/src/21.strings.cpp
Author: sebor
Date: Mon Apr 24 12:22:05 2006
New Revision: 396666
URL: http://svn.apache.org/viewcvs?rev=396666&view=rev
Log:
2006-04-24 Anton Pevtsov <an...@moscow.vdiweb.com>
* 21.strings.cpp (setvars): Added formatting of calls to overloads
of insert.
2006-04-24 Martin Sebor <se...@roguewave.com>
* 21.strings.cpp (setvars): Corrected an off-by-one error indexing
into an array of signatures.
Modified:
incubator/stdcxx/trunk/tests/src/21.strings.cpp
Modified: incubator/stdcxx/trunk/tests/src/21.strings.cpp
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/src/21.strings.cpp?rev=396666&r1=396665&r2=396666&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/21.strings.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/21.strings.cpp Mon Apr 24 12:22:05 2006
@@ -163,9 +163,12 @@
"iterator, iterator, InputIterator, InputIterator",
};
+ const size_t siginx = size_t (fun.which_ & ~mem_mask) - 1U;
+
+ RW_ASSERT (siginx < sizeof signatures / sizeof *signatures);
+
// append the function signature
- rw_asnprintf (&buf, &bufsize,
- "%{+} (%s)", signatures [fun.which_ & ~mem_mask]);
+ rw_asnprintf (&buf, &bufsize, "%{+} (%s)", signatures [siginx]);
rw_putenv ("FUNCSIG=");
rw_fprintf (0, "%{$FUNCSIG:=*}", buf);
@@ -228,6 +231,61 @@
!self, int (pcase->arg_len), pcase->arg,
self, pcase->off, !self, int (pcase->arg_len), pcase->arg,
self, pcase->off + pcase->size);
+ break;
+
+ case insert_size_ptr:
+ rw_asnprintf (&buf, &bufsize,
+ "%{+} (%zu, %{?}%{#*s}%{;}%{?}this->c_str ()%{;})",
+ pcase->off, !self, int (pcase->arg_len),
+ pcase->arg, self);
+ break;
+
+ case insert_size_str:
+ rw_asnprintf (&buf, &bufsize,
+ "%{+} (%zu, %{?}string (%{#*s})%{;}%{?}*this%{;})",
+ pcase->off, !self, int (pcase->arg_len),
+ pcase->arg, self);
+ break;
+
+ case insert_size_ptr_size:
+ rw_asnprintf (&buf, &bufsize, "%{+} ("
+ "%zu, %{?}%{#*s}%{;}%{?}this->c_str ()%{;}, %zu)",
+ pcase->off, !self, int (pcase->arg_len),
+ pcase->arg, self, pcase->size2);
+ break;
+
+ case insert_size_str_size_size:
+ rw_asnprintf (&buf, &bufsize, "%{+} ("
+ "%zu, %{?}string (%{#*s})%{;}%{?}*this%{;}, %zu, %zu)",
+ pcase->off, !self, int (pcase->arg_len), pcase->arg,
+ self, pcase->off2, pcase->size2);
+ break;
+
+ case insert_size_size_val:
+ rw_asnprintf (&buf, &bufsize,
+ "%{+} (%zu, %zu, %#c)",
+ pcase->off, pcase->size2, pcase->val);
+ break;
+
+ case insert_size_val:
+ rw_asnprintf (&buf, &bufsize,
+ "%{+} (begin + %zu, %zu, %#c)",
+ pcase->off, pcase->size2, pcase->val);
+ break;
+
+ case insert_val:
+ rw_asnprintf (&buf, &bufsize,
+ "%{+} (begin + %zu, %#c)",
+ pcase->off, pcase->val);
+ break;
+
+ case insert_range:
+ rw_asnprintf (&buf, &bufsize, "%{+} (begin + %zu, "
+ "%{?}%{#*s}%{;}%{?}*this%{;}.begin + %zu, "
+ "%{?}%{#*s}%{;}%{?}*this%{;}.begin + %zu)",
+ pcase->off, !self, int (pcase->arg_len), pcase->arg,
+ self, pcase->off2, !self, int (pcase->arg_len),
+ pcase->arg, self, pcase->off2 + pcase->size2);
break;
case replace_size_size_ptr: