stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r565992 - in /incubator/stdcxx/trunk/tests: localization/22.locale.money.put.mt.cpp localization/22.locale.num.put.mt.cpp src/locale.cpp
Date Wed, 15 Aug 2007 01:12:01 GMT
Author: sebor
Date: Tue Aug 14 18:11:59 2007
New Revision: 565992

URL: http://svn.apache.org/viewvc?view=rev&rev=565992
Log:
2007-08-15  Martin Sebor  <sebor@roguewave.com>

	* src/locale.cpp (rw_locales): Fixed up bad formatting introduced
	in r565991.
	* 22.locale.money.put.mt.cpp (thread_func): Ditto.
	* 22.locale.num.put.mt.cpp (put_data): Fixed up indentation and
	formatting. Renamed template parameter for consistency. Added
	a missing template argument.
	(thread_func, run_test): Fixed up formatting.

Modified:
    incubator/stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp
    incubator/stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp
    incubator/stdcxx/trunk/tests/src/locale.cpp

Modified: incubator/stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp?view=diff&rev=565992&r1=565991&r2=565992
==============================================================================
--- incubator/stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp (original)
+++ incubator/stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp Tue Aug 14 18:11:59
2007
@@ -209,7 +209,7 @@
             }
 
             RW_ASSERT (!nio.fail ());
-            RW_ASSERT (!rw_strncmp(ncs, data.ncs_));
+            RW_ASSERT (!rw_strncmp (ncs, data.ncs_));
 
         }
 
@@ -243,7 +243,7 @@
             }
 
             RW_ASSERT (!wio.fail ());
-            RW_ASSERT (!rw_strncmp(wcs, data.wcs_));
+            RW_ASSERT (!rw_strncmp (wcs, data.wcs_));
 
 #endif   // _RWSTD_NO_WCHAR_T
 
@@ -293,7 +293,7 @@
             // initialize with random but valid values
 
             data.money_value_ = inx;
-            data.type_ = MyMoneyData::PutId(nlocales % MyMoneyData::put_max);
+            data.type_ = MyMoneyData::PutId (nlocales % MyMoneyData::put_max);
             data.money_index_ = inx % RW_COUNT_OF (n_money_vals);
 
             // exercise domestic formats every other iteration

Modified: incubator/stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp?view=diff&rev=565992&r1=565991&r2=565992
==============================================================================
--- incubator/stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp (original)
+++ incubator/stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp Tue Aug 14 18:11:59
2007
@@ -141,13 +141,14 @@
     }
 };
 
-template <class charT, class traitT>
+template <class charT, class Traits>
 void
-put_data(const MyNumData& data, 
-         const std::num_put<charT>& np,
-         const std::ostreambuf_iterator<charT>& iter,
-         std::basic_ios<charT, traitT>& io,
-         charT fill, charT term)
+put_data (const MyNumData                               &data,
+          const std::num_put<charT>                     &np,
+          const std::ostreambuf_iterator<charT, Traits> &iter,
+          std::basic_ios<charT, Traits>                 &io,
+          charT                                          fill,
+          charT                                          term)
 {
     switch (data.type_) {
     case MyNumData::put_bool:
@@ -245,8 +246,8 @@
             nio.imbue (loc);
             nsb.pubsetp (ncs, RW_COUNT_OF (ncs));
 
-            put_data(data, np, std::ostreambuf_iterator<char>(&nsb),
-                     nio, ' ', '\0');
+            put_data (data, np, std::ostreambuf_iterator<char>(&nsb),
+                      nio, ' ', '\0');
 
             RW_ASSERT (!nio.fail ()); 
             RW_ASSERT (!rw_strncmp (ncs, data.ncs_));
@@ -265,8 +266,8 @@
             wio.imbue (loc);
             wsb.pubsetp (wcs, RW_COUNT_OF (wcs));
 
-            put_data(data, wp, std::ostreambuf_iterator<wchar_t>(&wsb),
-                     wio, L' ', L'\0');
+            put_data (data, wp, std::ostreambuf_iterator<wchar_t>(&wsb),
+                      wio, L' ', L'\0');
 
             RW_ASSERT (!wio.fail ()); 
             RW_ASSERT (!rw_strncmp (wcs, data.wcs_));
@@ -318,7 +319,7 @@
             const std::locale loc (data.locale_name_);
 
             data.value_ = nlocales & 1 ? -1 * nlocales : nlocales;
-            data.type_ = MyNumData::PutId(nlocales % MyNumData::put_max);
+            data.type_ = MyNumData::PutId (nlocales % MyNumData::put_max);
 
             // format data into buffers
             const std::num_put<char> &np =
@@ -327,8 +328,8 @@
             nio.imbue (loc);
             nsb.pubsetp (data.ncs_, RW_COUNT_OF (data.ncs_));
 
-            put_data(data, np, std::ostreambuf_iterator<char>(&nsb),
-                     nio, ' ', '\0');
+            put_data (data, np, std::ostreambuf_iterator<char>(&nsb),
+                      nio, ' ', '\0');
 
             rw_fatal (!nio.fail (), __FILE__, __LINE__,
                       "num_put<char>::put(...) failed for locale(%#s)",
@@ -342,8 +343,8 @@
             wio.imbue (loc);
             wsb.pubsetp (data.wcs_, RW_COUNT_OF (data.wcs_));
 
-            put_data(data, wp, std::ostreambuf_iterator<wchar_t>(&wsb),
-                     wio, L' ', L'\0');
+            put_data (data, wp, std::ostreambuf_iterator<wchar_t>(&wsb),
+                      wio, L' ', L'\0');
 
             rw_fatal (!wio.fail (), __FILE__, __LINE__,
                       "num_put<wchar_t>::put(...) failed for locale(%#s)",

Modified: incubator/stdcxx/trunk/tests/src/locale.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/locale.cpp?view=diff&rev=565992&r1=565991&r2=565992
==============================================================================
--- incubator/stdcxx/trunk/tests/src/locale.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/locale.cpp Tue Aug 14 18:11:59 2007
@@ -404,8 +404,8 @@
 
         // put the C locale at the front
         if (prepend_c_loc) {
-            strcpy(locname, deflocname);
-            locname += strlen(deflocname) + 1; 
+            strcpy (locname, deflocname);
+            locname += strlen (deflocname) + 1; 
         }
 
         // if successful, construct a char array with the locales
@@ -417,7 +417,7 @@
 
             // don't allow C locale to be in the list again
             // if we put it at the front of the locale list
-            if (prepend_c_loc && !strcmp(linebuf, deflocname))
+            if (prepend_c_loc && !strcmp (linebuf, deflocname))
                 continue;
 
 #ifdef _RWSTD_OS_SUNOS



Mime
View raw message