stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r384036 - /incubator/stdcxx/trunk/tests/strings/21.string.capacity.cpp
Date Tue, 07 Mar 2006 22:26:25 GMT
Author: sebor
Date: Tue Mar  7 14:26:23 2006
New Revision: 384036

URL: http://svn.apache.org/viewcvs?rev=384036&view=rev
Log:
2006-03-07  Martin Sebor  <sebor@roguewave.com>

	* 21.string.capacity.cpp (test_resize): Printed the (narrow)
	string before modifying it (as opposed to after) in diagnostics.

Modified:
    incubator/stdcxx/trunk/tests/strings/21.string.capacity.cpp

Modified: incubator/stdcxx/trunk/tests/strings/21.string.capacity.cpp
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/strings/21.string.capacity.cpp?rev=384036&r1=384035&r2=384036&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/strings/21.string.capacity.cpp (original)
+++ incubator/stdcxx/trunk/tests/strings/21.string.capacity.cpp Tue Mar  7 14:26:23 2006
@@ -113,7 +113,7 @@
 {
     typedef unsigned char UChar;
     charT chart_param = charT (UChar (cparam));
-    charT chart_eof = charT (UChar ('\0'));
+    charT chart_eof   = charT (UChar ('\0'));
 
     bool resize2args = charT (UChar (-1)) != chart_param;
 
@@ -138,12 +138,12 @@
     }
 
     rw_assert (should_throw == ex_thrown, 0, line,
-               "line %d. basic_string<%s, %s<%2$s>, %s<%2$s>>(%{#*S})"
-               ".resize(%zu%{?}, %#c%{;}) "
+               "line %d. basic_string<%s, %s<%2$s>, %s<%2$s>>"
+               "(%{#*s}, %zu).resize(%zu%{?}, %{#c}%{;}) "
                "should throw == %b, was thrown == %b",
                __LINE__, pfid->cname_, pfid->tname_, pfid->aname_,
-               int (sizeof (charT)), pstr, nparam,
-               resize2args, chart_param, should_throw, ex_thrown);
+               int (str_len), str, str_len,
+               nparam, resize2args, chart_param, should_throw, ex_thrown);
 
     if (ex_thrown)
         return;
@@ -172,10 +172,12 @@
         i = i < ubound ? i : ubound - 1;
 
         rw_assert (success, 0, line,
-                   "line %d. basic_string<%s, %s<%2$s>, %s<%2$s>>(%{#*S})"
-                   ".resize(%zu%{?}, %#c%{;}): got %#c at %zu, expected %#c",
+                   "line %d. basic_string<%s, %s<%2$s>, %s<%2$s>>"
+                   "(%{#*s}, %zu).resize(%zu%{?}, %{#c}%{;}): "
+                   "got %{#c} at %zu, expected %{#c}",
                    __LINE__, pfid->cname_, pfid->tname_, pfid->aname_,
-                   int (sizeof (charT)), pstr, nparam, resize2args, chart_param,
+                   int (str_len), str, str_len,
+                   nparam, resize2args, chart_param,
                    pstr->c_str()[i], i + 1, wstr_tmp[i]);
     }
 
@@ -193,11 +195,11 @@
             i = i < ubound ? i : ubound - 1;
 
             rw_assert (success, 0, line,
-                       "line %d. basic_string<%s, %s<%2$s, %s<%2$s>>(%{#*S})."
-                       "resize(%zu, %#c): got %{?}%#c%{;}%{?}'%s'%{;} "
-                       "at %zu, expected %#c",
+                       "line %d. basic_string<%s, %s<%2$s, %s<%2$s>>"
+                       "(%{#*s}, %zu).resize(%zu, %{#c}): "
+                       "got %{?}%{#c}%{;}%{?}'%s'%{;} at %zu, expected %{#c}",
                        __LINE__, pfid->cname_, pfid->tname_, pfid->aname_,
-                       int (sizeof (charT)), pstr, nparam, cparam,
+                       int (str_len), str, str_len, nparam, cparam,
                        chart_eof != pstr->c_str()[i], pstr->c_str()[i],
                        chart_eof == pstr->c_str()[i], "eof", i + 1,
                        chart_param);
@@ -206,10 +208,10 @@
     else {
         const std::string::size_type sz_tmp = pstr->size ();
         rw_assert (nparam == sz_tmp, 0, line,
-                   "line %d. basic_string<%s, %s<%2$s>, %s<%2$s>>(%{#*S})"
-                   ".resize(%zu): size() == %5$zu, got %zu",
+                   "line %d. basic_string<%s, %s<%2$s>, %s<%2$s>>"
+                   "(%{#*s}, %zu).resize(%zu): size() == %5$zu, got %zu",
                    __LINE__, pfid->cname_, pfid->tname_, pfid->aname_,
-                   int (sizeof (charT)), pstr, nparam, sz_tmp);
+                   int (str_len), str, str_len, nparam, sz_tmp);
     }
 }
 



Mime
View raw message