stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r645659 - in /stdcxx/trunk/tests/localization: 22.locale.ctype.cpp 22.locale.ctype.is.cpp 22.locale.ctype.narrow.cpp 22.locale.ctype.scan.cpp 22.locale.ctype.tolower.cpp 22.locale.ctype.toupper.cpp
Date Mon, 07 Apr 2008 19:40:19 GMT
Author: vitek
Date: Mon Apr  7 12:40:18 2008
New Revision: 645659

URL: http://svn.apache.org/viewvc?rev=645659&view=rev
Log:

2008-04-07  Travis Vitek  <vitek@roguewave.com>

	* tests/localization/22.locale.ctype.cpp: Cache result of call to
	rw_locale_query() reduce time needed to run test.
	* tests/localization/22.locale.ctype.is.cpp: Ditto.
	* tests/localization/22.locale.ctype.narrow.cpp: Ditto.
	* tests/localization/22.locale.ctype.scan.cpp: Ditto.
	* tests/localization/22.locale.ctype.toupper.cpp: Ditto.
	* tests/localization/22.locale.ctype.tolower.cpp: Ditto.


Modified:
    stdcxx/trunk/tests/localization/22.locale.ctype.cpp
    stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp
    stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp
    stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp
    stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp
    stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp

Modified: stdcxx/trunk/tests/localization/22.locale.ctype.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.cpp?rev=645659&r1=645658&r2=645659&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.ctype.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.ctype.cpp Mon Apr  7 12:40:18 2008
@@ -83,8 +83,11 @@
                  "{zh-CN-*-{GB*,UTF-8,CP125?}},"                           \
                  "{ru-RU-*-{KOI*,UTF-8,CP125?}}}"
 
+const char* locale_list = 0;
+
 #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)                        \
-   for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES);         \
+   if (!locale_list) locale_list = rw_locale_query (LC_CTYPE, LOCALES);    \
+   for (const char* locname = locale_list;                                 \
         locname && *locname; locname += std::strlen (locname) + 1) {       \
        _TRY {                                                              \
            const std::locale loc (locname);                                \

Modified: stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp?rev=645659&r1=645658&r2=645659&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp Mon Apr  7 12:40:18 2008
@@ -83,8 +83,11 @@
                  "{zh-CN-*-{GB*,UTF-8,CP125?}},"                           \
                  "{ru-RU-*-{KOI*,UTF-8,CP125?}}}"
 
+const char* locale_list = 0;
+
 #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)                        \
-   for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES);         \
+   if (!locale_list) locale_list = rw_locale_query (LC_CTYPE, LOCALES);    \
+   for (const char* locname = locale_list;                                 \
         locname && *locname; locname += std::strlen (locname) + 1) {       \
        _TRY {                                                              \
            const std::locale loc (locname);                                \

Modified: stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp?rev=645659&r1=645658&r2=645659&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp Mon Apr  7 12:40:18 2008
@@ -83,8 +83,11 @@
                  "{zh-CN-*-{GB*,UTF-8,CP125?}},"                           \
                  "{ru-RU-*-{KOI*,UTF-8,CP125?}}}"
 
+const char* locale_list = 0;
+
 #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)                        \
-   for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES);         \
+   if (!locale_list) locale_list = rw_locale_query (LC_CTYPE, LOCALES);    \
+   for (const char* locname = locale_list;                                 \
         locname && *locname; locname += std::strlen (locname) + 1) {       \
        _TRY {                                                              \
            const std::locale loc (locname);                                \

Modified: stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp?rev=645659&r1=645658&r2=645659&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp Mon Apr  7 12:40:18 2008
@@ -83,8 +83,11 @@
                  "{zh-CN-*-{GB*,UTF-8,CP125?}},"                           \
                  "{ru-RU-*-{KOI*,UTF-8,CP125?}}}"
 
+const char* locale_list = 0;
+
 #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)                        \
-   for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES);         \
+   if (!locale_list) locale_list = rw_locale_query (LC_CTYPE, LOCALES);    \
+   for (const char* locname = locale_list;                                 \
         locname && *locname; locname += std::strlen (locname) + 1) {       \
        _TRY {                                                              \
            const std::locale loc (locname);                                \

Modified: stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp?rev=645659&r1=645658&r2=645659&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp Mon Apr  7 12:40:18 2008
@@ -83,8 +83,11 @@
                  "{zh-CN-*-{GB*,UTF-8,CP125?}},"                           \
                  "{ru-RU-*-{KOI*,UTF-8,CP125?}}}"
 
+const char* locale_list = 0;
+
 #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)                        \
-   for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES);         \
+   const char* locale_list = rw_locale_query (LC_CTYPE, LOCALES);          \
+   for (const char* locname = locale_list;                                 \
         locname && *locname; locname += std::strlen (locname) + 1) {       \
        _TRY {                                                              \
            const std::locale loc (locname);                                \

Modified: stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp?rev=645659&r1=645658&r2=645659&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp Mon Apr  7 12:40:18 2008
@@ -83,8 +83,11 @@
                  "{zh-CN-*-{GB*,UTF-8,CP125?}},"                           \
                  "{ru-RU-*-{KOI*,UTF-8,CP125?}}}"
 
+const char* locale_list = 0;
+
 #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)                        \
-   for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES);         \
+   if (!locale_list) locale_list = rw_locale_query (LC_CTYPE, LOCALES);    \
+   for (const char* locname = locale_list;                                 \
         locname && *locname; locname += std::strlen (locname) + 1) {       \
        _TRY {                                                              \
            const std::locale loc (locname);                                \



Mime
View raw message