stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r407399 - /incubator/stdcxx/trunk/tests/src/21.strings.cpp
Date Wed, 17 May 2006 23:40:51 GMT
Author: sebor
Date: Wed May 17 16:40:50 2006
New Revision: 407399

URL: http://svn.apache.org/viewvc?rev=407399&view=rev
Log:
2006-05-17  Martin Sebor  <sebor@roguewave.com>

	* 21.strings.cpp (_rw_setvars): Made static.
	Defined the {charT}, {Traits}, and {Allocator} environment variables
	to the name of the character type and the Traits and Allocator
	template arguments specified by each test.
	Removed an extraneous space from the format of the function call.
	Added the missing "|-no-self-ref# " option specification.

Modified:
    incubator/stdcxx/trunk/tests/src/21.strings.cpp

Modified: incubator/stdcxx/trunk/tests/src/21.strings.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/21.strings.cpp?rev=407399&r1=407398&r2=407399&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/21.strings.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/21.strings.cpp Wed May 17 16:40:50 2006
@@ -149,7 +149,7 @@
 // FUNCALL: a string describing the call to the basic_string member
 //          function with function with function arguments expanded
 //          (as specified by the TestCase argument)
-void
+static void
 _rw_setvars (const StringMembers::Function &fun,
              const StringMembers::TestCase *pcase = 0)
 {
@@ -157,6 +157,18 @@
     size_t bufsize = 0;
 
     if (0 == pcase) {
+        // set the {charT}, {Traits}, and {Allocator} environment
+        // variables to the name of the character type and the
+        // Traits and Allocator specializations
+        rw_putenv ("charT=");
+        rw_fprintf (0, "%{charT:=*}", _rw_char_names [fun.char_id_ - 1]);
+
+        rw_putenv ("Traits=");
+        rw_fprintf (0, "%{Traits:=*}", _rw_traits_names [fun.traits_id_ - 1]);
+
+        rw_putenv ("Allocator=");
+        rw_fprintf (0, "%{Allocator:=*}", _rw_alloc_names [fun.alloc_id_ - 1]);
+
         // set the {CLASS}, {FUNC}, and {FUNCSIG} environment variables
         // to the name of the specialization of the template, the name
         // of the member function, and the name of the overload of the
@@ -307,7 +319,7 @@
     case StringMembers::op_set_ptr:
         // format self-referential ptr argument without size as c_str()
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (%{?}c_str()%{:}%{#*s}%{;})",
+                      "%{+}(%{?}c_str()%{:}%{#*s}%{;})",
                       self, int (arg_len), arg);
         break;
 
@@ -326,7 +338,7 @@
     case StringMembers::swap_str:
         // format self-referential str argument as *this
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (%{?}*this%{:}string(%{#*s})%{;})",
+                      "%{+}(%{?}*this%{:}string(%{#*s})%{;})",
                       self, int (arg_len), arg);
         break;
 
@@ -335,7 +347,7 @@
     case StringMembers::copy_ptr_size:
     case StringMembers::ctor_ptr_size:
         // format self-referential ptr argument with size as data()
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%{?}data()%{:}%{#*s}%{;}, %zu)",
                       self, int (arg_len), arg, pcase->size);
         break;
@@ -347,7 +359,7 @@
     case StringMembers::find_first_not_of_ptr_size:
     case StringMembers::find_last_not_of_ptr_size:
         // format self-referential ptr argument with size as data()
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%{?}data()%{:}%{#*s}%{;}, %zu)",
                       self, int (arg_len), arg, pcase->off);
         break;
@@ -360,7 +372,7 @@
     case StringMembers::find_last_not_of_str_size:
     case StringMembers::ctor_str_size:
         // format self-referential str argument as *this
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%{?}*this%{:}string(%{#*s})%{;}, %zu)",
                       self, int (arg_len), arg, pcase->off);
         break;
@@ -372,7 +384,7 @@
     case StringMembers::find_first_not_of_ptr_size_size:
     case StringMembers::find_last_not_of_ptr_size_size:
         // format self-referential ptr argument with size as data()
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%{?}data()%{:}%{#*s}%{;}, %zu, %zu)",
                       self, int (arg_len), arg,
                       pcase->off, pcase->size);
@@ -380,7 +392,7 @@
 
     case StringMembers::copy_ptr_size_size:
         // format self-referential ptr argument with size as data()
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%{?}data()%{:}%{#*s}%{;}, %zu, %zu)",
                       self, int (arg_len), arg,
                       pcase->size, pcase->off);
@@ -390,7 +402,7 @@
     case StringMembers::assign_str_size_size:
     case StringMembers::ctor_str_size_size:
         // format self-referential str argument as *this
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%{?}*this%{:}string(%{#*s})%{;}, %zu, %zu)",
                       self, int (arg_len), arg,
                       pcase->off, pcase->size);
@@ -400,13 +412,13 @@
     case StringMembers::assign_size_val:
     case StringMembers::ctor_size_val:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (%zu, %{#c})", pcase->size, pcase->val);
+                      "%{+}(%zu, %{#c})", pcase->size, pcase->val);
         break;
 
     case StringMembers::append_range:
     case StringMembers::assign_range:
     case StringMembers::ctor_range:
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%{?}begin()%{:}Iterator(%{#*s})%{;}"
                       "%{?} + %zu%{;}, "
                       "%{?}begin()%{:}Iterator(...)%{;}"
@@ -419,20 +431,20 @@
     case StringMembers::insert_size_ptr:
         // format self-referential ptr argument without size as c_str()
         rw_asnprintf (&buf, &bufsize, 
-                      "%{+} (%zu, %{?}c_str()%{:}%{#*s}%{;})",
+                      "%{+}(%zu, %{?}c_str()%{:}%{#*s}%{;})",
                       pcase->off, self, int (arg_len), arg);
         break;
 
     case StringMembers::insert_size_str:
         // format self-referential str argument as *this
         rw_asnprintf (&buf, &bufsize,  
-                      "%{+} (%zu, %{?}*this%{:}string(%{#*s})%{;})",
+                      "%{+}(%zu, %{?}*this%{:}string(%{#*s})%{;})",
                       pcase->off, self, int (arg_len), arg);
         break;
 
     case StringMembers::insert_size_ptr_size:
         // format self-referential ptr argument with size as data()
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%zu, %{?}data()%{:}%{#*s}%{;}, %zu)", 
                       pcase->off, self, int (arg_len), arg,
                       pcase->size2);
@@ -440,7 +452,7 @@
 
     case StringMembers::insert_size_str_size_size:
         // format self-referential str argument as *this
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%zu, %{?}*this%{:}string(%{#*s})%{;}, %zu, %zu)",
                       pcase->off, self, int (arg_len), arg,
                       pcase->off2, pcase->size2);
@@ -448,24 +460,24 @@
 
     case StringMembers::insert_size_size_val:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (%zu, %zu, %{#c})",
+                      "%{+}(%zu, %zu, %{#c})",
                       pcase->off, pcase->size2, pcase->val);
         break;
 
     case StringMembers::insert_size_val:
         rw_asnprintf (&buf, &bufsize, 
-                      "%{+} (begin()%{?} + %zu%{;}, %zu, %{#c})",
+                      "%{+}(begin()%{?} + %zu%{;}, %zu, %{#c})",
                       0 != pcase->off, pcase->off, pcase->size2, pcase->val);
         break;
 
     case StringMembers::insert_val:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (begin()%{? + %zu%{;}, %{#c})",
+                      "%{+}(begin()%{? + %zu%{;}, %{#c})",
                       0 != pcase->off, pcase->off, pcase->val);
         break;
 
     case StringMembers::insert_range:
-        rw_asnprintf (&buf, &bufsize, "%{+} (begin()%{?} + %zu%{;}, "
+        rw_asnprintf (&buf, &bufsize, "%{+}(begin()%{?} + %zu%{;}, "
                       "%{?}begin()%{:}Iterator(%{#*s})%{;}"
                       "%{?} + %zu%{;}, "
                       "%{?}begin()%{:}Iterator(...)%{?} + %zu%{;})",
@@ -478,7 +490,7 @@
     case StringMembers::replace_size_size_ptr:
     case StringMembers::compare_size_size_ptr:
         // format self-referential ptr argument without size as c_str()
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%zu, %zu, %{?}c_str()%{:}%{#*s}%{;})",
                       pcase->off, pcase->size, self,
                       int (arg_len), arg);
@@ -487,7 +499,7 @@
     case StringMembers::replace_size_size_str:
     case StringMembers::compare_size_size_str:
         // format self-referential str argument as *this
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%zu, %zu, %{?}*this%{:}string(%{#*s}))",
                       pcase->off, pcase->size, self, 
                       int (arg_len), arg);
@@ -496,7 +508,7 @@
     case StringMembers::replace_size_size_ptr_size:
     case StringMembers::compare_size_size_ptr_size:
         // format self-referential ptr argument with size as data()
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "%zu, %zu, %{?}data()%{:}%{#*s}%{;}, %zu)", 
                       pcase->off, pcase->size, self,
                       int (arg_len), arg, pcase->size2);
@@ -505,7 +517,7 @@
     case StringMembers::replace_size_size_str_size_size:
     case StringMembers::compare_size_size_str_size_size:
         // format self-referential str argument as *this
-        rw_asnprintf (&buf, &bufsize, "%{+} (%zu, %zu, "
+        rw_asnprintf (&buf, &bufsize, "%{+}(%zu, %zu, "
                       "%{?}*this%{:}string(%{#*s})%{;}, %zu, %zu)",
                       pcase->off, pcase->size, self,
                       int (arg_len), arg,
@@ -514,13 +526,13 @@
 
     case StringMembers::replace_size_size_size_val:
         rw_asnprintf (&buf, &bufsize, 
-                      "%{+} (%zu, %zu, %zu, %{#c})",
+                      "%{+}(%zu, %zu, %zu, %{#c})",
                       pcase->off, pcase->size, pcase->size2, pcase->val);
         break;
 
     case StringMembers::replace_iter_iter_ptr:
         // format self-referential ptr argument without size as c_str()
-        rw_asnprintf (&buf, &bufsize, "%{+} (begin()%{?} + %zu%{;}, "
+        rw_asnprintf (&buf, &bufsize, "%{+}(begin()%{?} + %zu%{;}, "
                       "begin()%{?} + %zu%{;}, "
                       "%{?}c_str()%{:}%{#*s}%{;})",
                       0 != pcase->off, pcase->off,
@@ -530,7 +542,7 @@
 
     case StringMembers::replace_iter_iter_str:
         // format self-referential str argument as *this
-        rw_asnprintf (&buf, &bufsize, "%{+} (begin()%{?} + %zu%{;}, "
+        rw_asnprintf (&buf, &bufsize, "%{+}(begin()%{?} + %zu%{;}, "
                       "begin()%{?} + %zu%{;}, "
                       "%{?}*this%{:}string(%{#*s})%{;})",
                       0 != pcase->off, pcase->off,
@@ -540,7 +552,7 @@
 
     case StringMembers::replace_iter_iter_ptr_size:
         // format self-referential ptr argument with size as data()
-        rw_asnprintf (&buf, &bufsize, "%{+} (begin()%{?} + %zu%{;}, "
+        rw_asnprintf (&buf, &bufsize, "%{+}(begin()%{?} + %zu%{;}, "
                       "begin()%{?} + %zu%{;}, " 
                       "%{?}data()%{:}%{#*s}%{;}, %zu)", 
                       0 != pcase->off, pcase->off,
@@ -550,14 +562,14 @@
 
     case StringMembers::replace_iter_iter_size_val:
         rw_asnprintf (&buf, &bufsize, 
-                      "%{+} (begin()%{?} + %zu%{;}, begin()%{? + %zu%{;}, "
+                      "%{+}(begin()%{?} + %zu%{;}, begin()%{? + %zu%{;}, "
                       "%zu, %{#c})",
                       0 != pcase->off, pcase->off, 0 != range1_end, range1_end,
                       pcase->size2, pcase->val);
         break;
 
     case StringMembers::replace_iter_iter_range:
-        rw_asnprintf (&buf, &bufsize, "%{+} ("
+        rw_asnprintf (&buf, &bufsize, "%{+}("
                       "begin()%{?} + %zu%{;}, "
                       "begin()%{?} + %zu%{;}, "
                       "%{?}begin()%{:}Iterator(%{#*s})%{;}"
@@ -580,7 +592,7 @@
     case StringMembers::op_set_val:
     case StringMembers::push_back_val:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (%{#c})", pcase->val);
+                      "%{+}(%{#c})", pcase->val);
         break;
 
     case StringMembers::find_val_size:
@@ -590,14 +602,14 @@
     case StringMembers::find_first_not_of_val_size:
     case StringMembers::find_last_not_of_val_size:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (%{#c}, %zu)", pcase->val, pcase->off);
+                      "%{+}(%{#c}, %zu)", pcase->val, pcase->off);
         break;
 
     case StringMembers::erase_void:
     case StringMembers::substr_void:
     case StringMembers::ctor_void:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} ()");
+                      "%{+}()");
         break;
 
     case StringMembers::erase_size:
@@ -605,30 +617,30 @@
     case StringMembers::op_index_size:
     case StringMembers::at_size:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (%zu)", pcase->off);
+                      "%{+}(%zu)", pcase->off);
         break;
 
     case StringMembers::op_index_size_const:
     case StringMembers::at_size_const:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (%zu) const", pcase->off);
+                      "%{+}(%zu) const", pcase->off);
         break;
 
     case StringMembers::erase_size_size:
     case StringMembers::substr_size_size:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (%zu, %zu)", pcase->off, pcase->size);
+                      "%{+}(%zu, %zu)", pcase->off, pcase->size);
         break;
 
     case StringMembers::erase_iter:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (begin()%{?} + %zu%{;})",
+                      "%{+}(begin()%{?} + %zu%{;})",
                       0 != pcase->off, pcase->off);
         break;
 
     case StringMembers::erase_iter_iter:
         rw_asnprintf (&buf, &bufsize,
-                      "%{+} (begin()%{?} + %zu%{;}, begin()%{?} + %zu%{;})", 
+                      "%{+}(begin()%{?} + %zu%{;}, begin()%{?} + %zu%{;})", 
                       0 != pcase->off, pcase->off,
                       0 != range1_end, range1_end);
         break;
@@ -917,6 +929,8 @@
 
                     "|-no-exceptions# "
                     "|-no-exception-safety# "
+
+                    "|-no-self-ref# "
 
                     "|-no-void# "
                     "|-no-ptr# "



Mime
View raw message