Author: sebor Date: Wed Apr 2 15:35:43 2008 New Revision: 644092 URL: http://svn.apache.org/viewvc?rev=644092&view=rev Log: 2008-04-02 Martin Sebor <[EMAIL PROTECTED]>
* tests/localization/22.locale.money.put.mt.cpp (rw_opt_nthreads, rw_opt_nloops, rw_opt_shared_locale): Removed the rw_ prefix from the names of glabl variables to avoid using rwtest convention. * tests/localization/22.locale.time.put.mt.cpp: Same. * tests/localization/22.locale.num.put.mt.cpp: Same. * tests/localization/22.locale.money.get.mt.cpp: Same. * tests/localization/22.locale.numpunct.mt.cpp: Same. (run_test): Added the number of locales to informational output. Modified: stdcxx/trunk/tests/localization/22.locale.money.get.mt.cpp stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp stdcxx/trunk/tests/localization/22.locale.time.put.mt.cpp Modified: stdcxx/trunk/tests/localization/22.locale.money.get.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.money.get.mt.cpp?rev=644092&r1=644091&r2=644092&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.money.get.mt.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.money.get.mt.cpp Wed Apr 2 15:35:43 2008 @@ -42,16 +42,16 @@ #define MAX_THREADS 32 #define MAX_LOOPS 100000 +// the number of times each thread should iterate (unless specified +// otherwise on the command line) +int opt_nloops = 100000; + // default number of threads (will be adjusted to the number // of processors/cores later) -int rw_opt_nthreads = 1; +int opt_nthreads = 1; #if !defined (_RWSTD_OS_HP_UX) || defined (_ILP32) -// the number of times each thread should iterate (unless specified -// otherwise on the command line) -int rw_opt_nloops = 100000; - // number of locales to use int opt_nlocales = MAX_THREADS; @@ -59,14 +59,13 @@ // work around a small cache size on HP-UX in LP64 mode // in LP64 mode (see STDCXX-812) -int opt_nloops = 100000; int opt_nlocales = 9; #endif // HP-UX 32/64 bit mode // should all threads share the same set of locale objects instead // of creating their own? -int rw_opt_shared_locale; +int opt_shared_locale; /**************************************************************************/ @@ -183,7 +182,7 @@ // construct a named locale, get a reference to the money_get // facet from it and use it to format a random money value const std::locale loc = - rw_opt_shared_locale ? data.locale_ + opt_shared_locale ? data.locale_ : std::locale (data.locale_name_); if (test_char) { @@ -371,7 +370,7 @@ #endif // _RWSTD_NO_WCHAR_T - if (rw_opt_shared_locale) + if (opt_shared_locale) data.locale_ = loc; nlocales += 1; @@ -393,7 +392,7 @@ rw_info (0, 0, 0, "testing std::money_get<charT> with %d thread%{?}s%{;}, " "%zu iteration%{?}s%{;} each, in %zu locales { %{ [EMAIL PROTECTED] }", - rw_opt_nthreads, 1 != rw_opt_nthreads, + opt_nthreads, 1 != opt_nthreads, opt_nloops, 1 != opt_nloops, nlocales, int (nlocales), "%#s", locales); @@ -404,11 +403,11 @@ // create and start a pool of threads and wait for them to finish int result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #ifndef _RWSTD_NO_WCHAR_T @@ -419,11 +418,11 @@ // start a pool of threads to exercise wstring thread safety result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); // exercise both the char and the wchar_t specializations // at the same time @@ -437,11 +436,11 @@ // start a pool of threads to exercise wstring thread safety result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #endif // _RWSTD_NO_WCHAR_T @@ -456,9 +455,9 @@ // set nthreads to the greater of the number of processors // and 2 (for uniprocessor systems) by default - rw_opt_nthreads = rw_get_cpus (); - if (rw_opt_nthreads < 2) - rw_opt_nthreads = 2; + opt_nthreads = rw_get_cpus (); + if (opt_nthreads < 2) + opt_nthreads = 2; #endif // _RWSTD_REENTRANT @@ -472,8 +471,8 @@ "|-shared-locale# ", &opt_nloops, int (MAX_THREADS), - &rw_opt_nthreads, + &opt_nthreads, &opt_nlocales, &rw_opt_setlocales, - &rw_opt_shared_locale); + &opt_shared_locale); } Modified: stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp?rev=644092&r1=644091&r2=644092&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp Wed Apr 2 15:35:43 2008 @@ -44,11 +44,11 @@ // default number of threads (will be adjusted to the number // of processors/cores later) -int rw_opt_nthreads = 1; +int opt_nthreads = 1; // the number of times each thread should iterate (unless specified // otherwise on the command line) -int rw_opt_nloops = 100000; +int opt_nloops = 100000; #if !defined (_RWSTD_OS_HP_UX) || defined (_ILP32) @@ -65,7 +65,7 @@ // should all threads share the same set of locale objects instead // of creating their own? -int rw_opt_shared_locale; +int opt_shared_locale; /**************************************************************************/ @@ -182,7 +182,7 @@ wio.rdbuf (&wsb); #endif // _RWSTD_NO_WCHAR_T - for (int i = 0; i != rw_opt_nloops; ++i) { + for (int i = 0; i != opt_nloops; ++i) { // save the name of the locale const MyMoneyData& data = my_money_data [i % nlocales]; @@ -190,7 +190,7 @@ // construct a named locale, get a reference to the money_put // facet from it and use it to format a random money value const std::locale loc = - rw_opt_shared_locale ? data.locale_ + opt_shared_locale ? data.locale_ : std::locale (data.locale_name_); if (test_char) { @@ -376,7 +376,7 @@ #endif // _RWSTD_NO_WCHAR_T - if (rw_opt_shared_locale) + if (opt_shared_locale) data.locale_ = loc; nlocales += 1; @@ -398,8 +398,8 @@ rw_info (0, 0, 0, "testing std::money_put<charT> with %d thread%{?}s%{;}, " "%zu iteration%{?}s%{;} each, in %zu locales { %{ [EMAIL PROTECTED] }", - rw_opt_nthreads, 1 != rw_opt_nthreads, - rw_opt_nloops, 1 != rw_opt_nloops, + opt_nthreads, 1 != opt_nthreads, + opt_nloops, 1 != opt_nloops, nlocales, int (nlocales), "%#s", locales); rw_info (0, 0, 0, "exercising std::money_put<char>"); @@ -409,11 +409,11 @@ // create and start a pool of threads and wait for them to finish int result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #ifndef _RWSTD_NO_WCHAR_T @@ -424,11 +424,11 @@ // start a pool of threads to exercise wstring thread safety result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); // exercise both the char and the wchar_t specializations // at the same time @@ -442,11 +442,11 @@ // start a pool of threads to exercise wstring thread safety result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #endif // _RWSTD_NO_WCHAR_T @@ -461,9 +461,9 @@ // set nthreads to the greater of the number of processors // and 2 (for uniprocessor systems) by default - rw_opt_nthreads = rw_get_cpus (); - if (rw_opt_nthreads < 2) - rw_opt_nthreads = 2; + opt_nthreads = rw_get_cpus (); + if (opt_nthreads < 2) + opt_nthreads = 2; #endif // _RWSTD_REENTRANT @@ -475,10 +475,10 @@ "|-nlocales#0 " // arg must be non-negative "|-locales= " // must be provided "|-shared-locale# ", - &rw_opt_nloops, + &opt_nloops, int (MAX_THREADS), - &rw_opt_nthreads, + &opt_nthreads, &opt_nlocales, &rw_opt_setlocales, - &rw_opt_shared_locale); + &opt_shared_locale); } Modified: stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp?rev=644092&r1=644091&r2=644092&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp Wed Apr 2 15:35:43 2008 @@ -42,10 +42,10 @@ // default number of threads (will be adjusted to the number // of processors/cores later) -int rw_opt_nthreads = 1; +int opt_nthreads = 1; // the number of times each thread should iterate -int rw_opt_nloops = MAX_LOOPS; +int opt_nloops = MAX_LOOPS; #if !defined (_RWSTD_OS_HP_UX) || defined (_ILP32) @@ -62,7 +62,7 @@ // should all threads share the same set of locale objects instead // of creating their own? -int rw_opt_shared_locale; +int opt_shared_locale; /**************************************************************************/ @@ -236,7 +236,7 @@ wio.rdbuf (&wsb); #endif // _RWSTD_NO_WCHAR_T - for (int i = 0; i != rw_opt_nloops; ++i) { + for (int i = 0; i != opt_nloops; ++i) { // fill in the value and results for this locale const MyNumData& data = my_num_data [i % nlocales]; @@ -244,7 +244,7 @@ // construct a named locale and imbue it in the ios object // so that the locale is used not only by the num_put facet const std::locale loc = - rw_opt_shared_locale ? data.locale_ + opt_shared_locale ? data.locale_ : std::locale (data.locale_name_); if (test_char) { @@ -362,7 +362,7 @@ #endif // _RWSTD_NO_WCHAR_T - if (rw_opt_shared_locale) + if (opt_shared_locale) data.locale_ = loc; nlocales += 1; @@ -383,8 +383,8 @@ rw_info (0, 0, 0, "testing std::num_put<charT> with %d thread%{?}s%{;}, " "%zu iteration%{?}s%{;} each, in %zu locales { %{ [EMAIL PROTECTED] }", - rw_opt_nthreads, 1 != rw_opt_nthreads, - rw_opt_nloops, 1 != rw_opt_nloops, + opt_nthreads, 1 != opt_nthreads, + opt_nloops, 1 != opt_nloops, nlocales, int (nlocales), "%#s", locales); rw_info (0, 0, 0, "exercising std::num_put<char>"); @@ -394,11 +394,11 @@ // create and start a pool of threads and wait for them to finish int result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #ifndef _RWSTD_NO_WCHAR_T @@ -409,11 +409,11 @@ // start a pool of threads to exercise wstring thread safety result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); // exercise both the char and the wchar_t specializations // at the same time @@ -426,11 +426,11 @@ // start a pool of threads to exercise wstring thread safety result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #endif // _RWSTD_NO_WCHAR_T @@ -445,9 +445,9 @@ // set nthreads to the greater of the number of processors // and 2 (for uniprocessor systems) by default - rw_opt_nthreads = rw_get_cpus (); - if (rw_opt_nthreads < 2) - rw_opt_nthreads = 2; + opt_nthreads = rw_get_cpus (); + if (opt_nthreads < 2) + opt_nthreads = 2; #endif // _RWSTD_REENTRANT @@ -459,10 +459,10 @@ "|-nlocales#0 " // arg must be non-negative "|-locales= " // must be provided "|-shared-locale# ", - &rw_opt_nloops, + &opt_nloops, int (MAX_THREADS), - &rw_opt_nthreads, + &opt_nthreads, &opt_nlocales, &rw_opt_setlocales, - &rw_opt_shared_locale); + &opt_shared_locale); } Modified: stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp?rev=644092&r1=644091&r2=644092&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp Wed Apr 2 15:35:43 2008 @@ -43,7 +43,7 @@ // default number of threads (will be adjusted to the number // of processors/cores later) -int rw_opt_nthreads = 1; +int opt_nthreads = 1; // the number of times each thread should iterate (unless specified // otherwise on the command line) @@ -64,7 +64,7 @@ // should all threads share the same set of locale objects instead // of creating their own? -int rw_opt_shared_locale; +int opt_shared_locale; /**************************************************************************/ @@ -119,7 +119,7 @@ // construct a named locale const std::locale loc = - rw_opt_shared_locale ? data.locale_ + opt_shared_locale ? data.locale_ : std::locale (data.locale_name_); if (test_char) { @@ -228,7 +228,7 @@ #endif - if (rw_opt_shared_locale) + if (opt_shared_locale) data.locale_ = loc; nlocales += 1; @@ -248,10 +248,10 @@ rw_info (0, 0, 0, "testing std::numpunct<charT> with %d thread%{?}s%{;}, " - "%zu iteration%{?}s%{;} each, in locales { %{ [EMAIL PROTECTED] }", - rw_opt_nthreads, 1 != rw_opt_nthreads, + "%zu iteration%{?}s%{;} each, in %zu locales { %{ [EMAIL PROTECTED] }", + opt_nthreads, 1 != opt_nthreads, rw_opt_nloops, 1 != rw_opt_nloops, - int (nlocales), "%#s", locales); + nlocales, int (nlocales), "%#s", locales); rw_info (0, 0, 0, "exercising std::numpunct<char>"); @@ -260,11 +260,11 @@ // create and start a pool of threads and wait for them to finish int result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #ifndef _RWSTD_NO_WCHAR_T @@ -276,11 +276,11 @@ // start a pool of threads to exercise the thread safety // of the wchar_t specialization result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); // exercise both the char and the wchar_t specializations // at the same time @@ -293,11 +293,11 @@ // start a pool of threads to exercise wstring thread safety result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #endif // _RWSTD_NO_WCHAR_T @@ -312,9 +312,9 @@ // set nthreads to the greater of the number of processors // and 2 (for uniprocessor systems) by default - rw_opt_nthreads = rw_get_cpus (); - if (rw_opt_nthreads < 2) - rw_opt_nthreads = 2; + opt_nthreads = rw_get_cpus (); + if (opt_nthreads < 2) + opt_nthreads = 2; #endif // _RWSTD_REENTRANT @@ -328,8 +328,8 @@ "|-shared-locale# ", &rw_opt_nloops, int (MAX_THREADS), - &rw_opt_nthreads, + &opt_nthreads, &opt_nlocales, &rw_opt_setlocales, - &rw_opt_shared_locale); + &opt_shared_locale); } Modified: stdcxx/trunk/tests/localization/22.locale.time.put.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.time.put.mt.cpp?rev=644092&r1=644091&r2=644092&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.time.put.mt.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.time.put.mt.cpp Wed Apr 2 15:35:43 2008 @@ -45,10 +45,10 @@ // default number of threads (will be adjusted to the number // of processors/cores later) -int rw_opt_nthreads = 1; +int opt_nthreads = 1; // the number of times each thread should iterate -int rw_opt_nloops = MAX_LOOPS; +int opt_nloops = MAX_LOOPS; #if !defined (_RWSTD_OS_HP_UX) || defined (_ILP32) @@ -65,7 +65,7 @@ // should all threads share the same set of locale objects instead // of creating their own? -int rw_opt_shared_locale; +int opt_shared_locale; /**************************************************************************/ @@ -155,7 +155,7 @@ wio.rdbuf (&wsb); #endif // _RWSTD_NO_WCHAR_T - for (int i = 0; i != rw_opt_nloops; ++i) { + for (int i = 0; i != opt_nloops; ++i) { // save the name of the locale const MyTimeData& data = my_time_data [i % nlocales]; @@ -164,7 +164,7 @@ // facet from it and use it to format a random time value // using a random conversion specifier const std::locale loc = - rw_opt_shared_locale ? data.locale_ + opt_shared_locale ? data.locale_ : std::locale (data.locale_name_); if (test_char) { @@ -298,7 +298,7 @@ #endif // _RWSTD_NO_WCHAR_T - if (rw_opt_shared_locale) + if (opt_shared_locale) data.locale_ = loc; nlocales += 1; @@ -320,8 +320,8 @@ rw_info (0, 0, 0, "testing std::time_put<charT> with %d thread%{?}s%{;}, " "%zu iteration%{?}s%{;} each, in %zu locales { %{ [EMAIL PROTECTED] }", - rw_opt_nthreads, 1 != rw_opt_nthreads, - rw_opt_nloops, 1 != rw_opt_nloops, + opt_nthreads, 1 != opt_nthreads, + opt_nloops, 1 != opt_nloops, nlocales, int (nlocales), "%#s", locales); rw_info (0, 0, 0, "exercising std::time_put<char>"); @@ -331,11 +331,11 @@ // create and start a pool of threads and wait for them to finish int result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #ifndef _RWSTD_NO_WCHAR_T @@ -346,11 +346,11 @@ // start a pool of threads to exercise wstring thread safety result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); // exercise both the char and the wchar_t specializations // at the same time @@ -363,11 +363,11 @@ // start a pool of threads to exercise wstring thread safety result = - rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); + rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); rw_error (result == 0, 0, __LINE__, "rw_thread_pool(0, %d, 0, %{#f}, 0) failed", - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #endif // _RWSTD_NO_WCHAR_T @@ -382,9 +382,9 @@ // set nthreads to the greater of the number of processors // and 2 (for uniprocessor systems) by default - rw_opt_nthreads = rw_get_cpus (); - if (rw_opt_nthreads < 2) - rw_opt_nthreads = 2; + opt_nthreads = rw_get_cpus (); + if (opt_nthreads < 2) + opt_nthreads = 2; #endif // _RWSTD_REENTRANT @@ -396,10 +396,10 @@ "|-nlocales#0 " // arg must be non-negative "|-locales= " // must be provided "|-shared-locale# ", - &rw_opt_nloops, + &opt_nloops, int (MAX_THREADS), - &rw_opt_nthreads, + &opt_nthreads, &opt_nlocales, &rw_opt_setlocales, - &rw_opt_shared_locale); + &opt_shared_locale); }