diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9d14062f988decea9d90ae8ba082deaada07d69c..57bac9cc25601a2efa06a9a9648e7b31494d1aaf 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,160 @@ +2003-04-14 Andreas Tobler <toa@pop.agri.ch> + Benjamin Kosnik <bkoz@redhat.com> + + * config/os/generic/ctype_inline.h: Fix. + +2003-04-14 Benjamin Kosnik <bkoz@redhat.com> + + * testsuite/testsuite_hooks.h + (__gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher): + Change to run_named_locale_test. + * testsuite/testsuite_hooks.cc (__gnu_cxx_test): Same. + + * testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc: Use + run_test_named_locale. + * testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc: Same. + * testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc: Same. + * testsuite/22_locale/codecvt/encoding/wchar_t/2.cc: Same. + * testsuite/22_locale/codecvt/encoding/wchar_t/3.cc: Same. + * testsuite/22_locale/codecvt/encoding/wchar_t/4.cc: Same. + * testsuite/22_locale/codecvt/in/wchar_t/2.cc: Same. + * testsuite/22_locale/codecvt/in/wchar_t/3.cc: Same. + * testsuite/22_locale/codecvt/in/wchar_t/4.cc: Same. + * testsuite/22_locale/codecvt/in/wchar_t/7.cc: Same. + * testsuite/22_locale/codecvt/in/wchar_t/8.cc: Same. + * testsuite/22_locale/codecvt/in/wchar_t/9.cc: Same. + * testsuite/22_locale/codecvt/length/wchar_t/2.cc: Same. + * testsuite/22_locale/codecvt/length/wchar_t/3.cc: Same. + * testsuite/22_locale/codecvt/length/wchar_t/4.cc: Same. + * testsuite/22_locale/codecvt/length/wchar_t/7.cc: Same. + * testsuite/22_locale/codecvt/max_length/wchar_t/2.cc: Same. + * testsuite/22_locale/codecvt/max_length/wchar_t/3.cc: Same. + * testsuite/22_locale/codecvt/max_length/wchar_t/4.cc: Same. + * testsuite/22_locale/codecvt/out/wchar_t/2.cc: Same. + * testsuite/22_locale/codecvt/out/wchar_t/3.cc: Same. + * testsuite/22_locale/codecvt/out/wchar_t/4.cc: Same. + * testsuite/22_locale/codecvt/out/wchar_t/7.cc: Same. + * testsuite/22_locale/codecvt/unshift/wchar_t/2.cc: Same. + * testsuite/22_locale/codecvt/unshift/wchar_t/3.cc: Same. + * testsuite/22_locale/codecvt/unshift/wchar_t/4.cc: Same. + * testsuite/22_locale/collate/compare/char/1.cc: Same. + * testsuite/22_locale/collate/compare/char/2.cc: Same. + * testsuite/22_locale/collate/compare/char/3.cc: Same. + * testsuite/22_locale/collate/compare/wchar_t/1.cc: Same. + * testsuite/22_locale/collate/compare/wchar_t/2.cc: Same. + * testsuite/22_locale/collate/compare/wchar_t/3.cc: Same. + * testsuite/22_locale/collate/hash/char/2.cc: Same. + * testsuite/22_locale/collate/hash/wchar_t/2.cc: Same. + * testsuite/22_locale/collate/transform/char/2.cc: Same. + * testsuite/22_locale/collate/transform/char/3.cc: Same. + * testsuite/22_locale/collate/transform/wchar_t/2.cc: Same. + * testsuite/22_locale/collate/transform/wchar_t/3.cc: Same. + * testsuite/22_locale/collate_byname/1.cc: Same. + * testsuite/22_locale/ctype/is/char/2.cc: Same. + * testsuite/22_locale/ctype/is/wchar_t/2.cc: Same. + * testsuite/22_locale/ctype/narrow/wchar_t/3.cc: Same. + * testsuite/22_locale/ctype/widen/wchar_t/2.cc: Same. + * testsuite/22_locale/ctype/widen/wchar_t/3.cc: Same. + * testsuite/22_locale/facet/2.cc: Same. + * testsuite/22_locale/locale/cons/2.cc: Same. + * testsuite/22_locale/locale/cons/4.cc: Same. + * testsuite/22_locale/locale/cons/5.cc: Same. + * testsuite/22_locale/locale/cons/7.cc: Same. + * testsuite/22_locale/locale/cons/7222-c.cc: Same. + * testsuite/22_locale/locale/cons/7222-env.cc: Same. + * testsuite/22_locale/locale/global_locale_objects/2.cc: Same. + * testsuite/22_locale/messages/members/char/1.cc: Same. + * testsuite/22_locale/messages/members/char/2.cc: Same. + * testsuite/22_locale/messages/members/char/3.cc: Same. + * testsuite/22_locale/messages_byname/1.cc: Same. + * testsuite/22_locale/money_get/get/char/1.cc: Same. + * testsuite/22_locale/money_get/get/char/2.cc: Same. + * testsuite/22_locale/money_get/get/char/3.cc: Same. + * testsuite/22_locale/money_get/get/char/4.cc: Same. + * testsuite/22_locale/money_get/get/wchar_t/1.cc: Same. + * testsuite/22_locale/money_get/get/wchar_t/2.cc: Same. + * testsuite/22_locale/money_get/get/wchar_t/3.cc: Same. + * testsuite/22_locale/money_get/get/wchar_t/4.cc: Same. + * testsuite/22_locale/money_put/put/char/1.cc: Same. + * testsuite/22_locale/money_put/put/char/2.cc: Same. + * testsuite/22_locale/money_put/put/char/3.cc: Same. + * testsuite/22_locale/money_put/put/wchar_t/1.cc: Same. + * testsuite/22_locale/money_put/put/wchar_t/2.cc: Same. + * testsuite/22_locale/money_put/put/wchar_t/3.cc: Same. + * testsuite/22_locale/moneypunct/members/char/2.cc: Same. + * testsuite/22_locale/moneypunct/members/wchar_t/2.cc: Same. + * testsuite/22_locale/moneypunct_byname/1.cc: Same. + * testsuite/22_locale/num_get/get/char/1.cc: Same. + * testsuite/22_locale/num_get/get/char/2.cc: Same. + * testsuite/22_locale/num_get/get/char/3.cc: Same. + * testsuite/22_locale/num_get/get/char/5.cc: Same. + * testsuite/22_locale/num_get/get/char/6.cc: Same. + * testsuite/22_locale/num_get/get/wchar_t/1.cc: Same. + * testsuite/22_locale/num_get/get/wchar_t/2.cc: Same. + * testsuite/22_locale/num_get/get/wchar_t/3.cc: Same. + * testsuite/22_locale/num_get/get/wchar_t/5.cc: Same. + * testsuite/22_locale/num_get/get/wchar_t/6.cc: Same. + * testsuite/22_locale/num_put/put/char/1.cc: Same. + * testsuite/22_locale/num_put/put/char/2.cc: Same. + * testsuite/22_locale/num_put/put/char/3.cc: Same. + * testsuite/22_locale/num_put/put/char/5.cc: Same. + * testsuite/22_locale/num_put/put/wchar_t/1.cc: Same. + * testsuite/22_locale/num_put/put/wchar_t/2.cc: Same. + * testsuite/22_locale/num_put/put/wchar_t/3.cc: Same. + * testsuite/22_locale/num_put/put/wchar_t/5.cc: Same. + * testsuite/22_locale/numpunct/members/char/1.cc: Same. + * testsuite/22_locale/numpunct/members/char/2.cc: Same. + * testsuite/22_locale/numpunct/members/wchar_t/1.cc: Same. + * testsuite/22_locale/numpunct/members/wchar_t/2.cc: Same. + * testsuite/22_locale/numpunct_byname/1.cc: Same. + * testsuite/22_locale/numpunct_byname/2.cc: Same. + * testsuite/22_locale/time_get/date_order/char/1.cc: Same. + * testsuite/22_locale/time_get/date_order/wchar_t/1.cc: Same. + * testsuite/22_locale/time_get/get_date/char/1.cc: Same. + * testsuite/22_locale/time_get/get_date/char/2.cc: Same. + * testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Same. + * testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Same. + * testsuite/22_locale/time_get/get_monthname/char/1.cc: Same. + * testsuite/22_locale/time_get/get_monthname/char/2.cc: Same. + * testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Same. + * testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Same. + * testsuite/22_locale/time_get/get_time/char/1.cc: Same. + * testsuite/22_locale/time_get/get_time/char/2.cc: Same. + * testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Same. + * testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Same. + * testsuite/22_locale/time_get/get_weekday/char/1.cc: Same. + * testsuite/22_locale/time_get/get_weekday/char/2.cc: Same. + * testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Same. + * testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Same. + * testsuite/22_locale/time_get/get_year/char/1.cc: Same. + * testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Same. + * testsuite/22_locale/time_put/put/char/1.cc: Same. + * testsuite/22_locale/time_put/put/char/2.cc: Same. + * testsuite/22_locale/time_put/put/char/3.cc: Same. + * testsuite/22_locale/time_put/put/char/4.cc: Same. + * testsuite/22_locale/time_put/put/char/5.cc: Same. + * testsuite/22_locale/time_put/put/char/6.cc: Same. + * testsuite/22_locale/time_put/put/char/7.cc: Same. + * testsuite/22_locale/time_put/put/char/8.cc: Same. + * testsuite/22_locale/time_put/put/wchar_t/1.cc: Same. + * testsuite/22_locale/time_put/put/wchar_t/2.cc: Same. + * testsuite/22_locale/time_put/put/wchar_t/3.cc: Same. + * testsuite/22_locale/time_put/put/wchar_t/4.cc: Same. + * testsuite/22_locale/time_put/put/wchar_t/5.cc: Same. + * testsuite/22_locale/time_put/put/wchar_t/6.cc: Same. + * testsuite/22_locale/time_put/put/wchar_t/7.cc: Same. + * testsuite/22_locale/time_put/put/wchar_t/8.cc: Same. + * testsuite/27_io/basic_filebuf/imbue/char/9322.cc: Same. + * testsuite/27_io/basic_ios/copyfmt/char/2.cc: Same. + * testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc: Same. + * testsuite/27_io/basic_streambuf/imbue/char/9322.cc: Same. + * testsuite/27_io/basic_stringbuf/imbue/char/9322.cc: Same. + +2003-04-14 Andreas Tobler <toa@pop.agri.ch> + + * configure.target (_cpu_incdir_fullpath): Solaris 2.9 uses + solaris includes, not generic. + 2003-04-14 Loren J. Rittle <ljrittle@acm.org> * testsuite/26_numerics/c99_classification_macros_c.cc: Add XFAIL. diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc index 13bc21aa046b82d6327e21bb0dd9fa0921808050..48d406f2558b4b63143816f663274b3712fec757 100644 --- a/libstdc++-v3/config/locale/generic/c_locale.cc +++ b/libstdc++-v3/config/locale/generic/c_locale.cc @@ -1,6 +1,6 @@ // Wrapper for underlying C-language localization -*- C++ -*- -// Copyright (C) 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -216,7 +216,7 @@ namespace std __c_locale) { __cloc = NULL; - if (strcmp (__s, "C")) + if (strcmp(__s, "C")) __throw_runtime_error("attempt to create locale from unhandled name in generic implementation; see http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html"); } diff --git a/libstdc++-v3/config/os/generic/ctype_inline.h b/libstdc++-v3/config/os/generic/ctype_inline.h index c10cb565b76c43247381fa9badf48dc169096ba0..be43c47fd0a8e5e294967b010741524d1a6c56da 100644 --- a/libstdc++-v3/config/os/generic/ctype_inline.h +++ b/libstdc++-v3/config/os/generic/ctype_inline.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000 Free Software Foundation, Inc. +// Copyright (C) 2000, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,69 +39,95 @@ // functionality should be added for the native os in question: see // the config/os/bits/ctype_*.h files. +// Constructing a synthetic "C" table should be seriously considered... + bool ctype<char>:: is(mask __m, char __c) const { - bool __ret; - switch (__m) + if (_M_table) + return _M_table[static_cast<unsigned char>(__c)] & __m; + else { - case space: - __ret = isspace(__c); - break; - case print: - __ret = isprint(__c); - break; - case cntrl: - __ret = iscntrl(__c); - break; - case upper: - __ret = isupper(__c); - break; - case lower: - __ret = islower(__c); - break; - case alpha: - __ret = isalpha(__c); - break; - case digit: - __ret = isdigit(__c); - break; - case punct: - __ret = ispunct(__c); - break; - case xdigit: - __ret = isxdigit(__c); - break; - case alnum: - __ret = isalnum(__c); - break; - case graph: - __ret = isgraph(__c); - break; - default: - __ret = false; - break; + bool __ret = true; + const int __bitmasksize = 11; + int __bitcur = 0; // Lowest bitmask in ctype_base == 0 + for (;__ret && __bitcur < __bitmasksize; ++__bitcur) + { + mask __bit = static_cast<mask>(1 << __bitcur); + if (__m & __bit) + { + bool __testis; + switch (__bit) + { + case space: + __testis = isspace(__c); + break; + case print: + __testis = isprint(__c); + break; + case cntrl: + __testis = iscntrl(__c); + break; + case upper: + __testis = isupper(__c); + break; + case lower: + __testis = islower(__c); + break; + case alpha: + __testis = isalpha(__c); + break; + case digit: + __testis = isdigit(__c); + break; + case punct: + __testis = ispunct(__c); + break; + case xdigit: + __testis = isxdigit(__c); + break; + case alnum: + __testis = isalnum(__c); + break; + case graph: + __testis = isgraph(__c); + break; + default: + __testis = false; + break; + } + __ret &= __testis; + } + } + return __ret; } - return __ret; } const char* ctype<char>:: is(const char* __low, const char* __high, mask* __vec) const { - const int __bitmasksize = 11; // Highest bitmask in ctype_base == 10 - for (;__low < __high; ++__vec, ++__low) + if (_M_table) + while (__low < __high) + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; + else { - mask __m = 0; - int __i = 0; // Lowest bitmask in ctype_base == 0 - for (;__i < __bitmasksize; ++__i) + // Highest bitmask in ctype_base == 10. + const int __bitmasksize = 11; + for (;__low < __high; ++__vec, ++__low) { - mask __bit = static_cast<mask>(1 << __i); - if (this->is(__bit, *__low)) - __m |= __bit; + mask __m = 0; + // Lowest bitmask in ctype_base == 0 + int __i = 0; + for (;__i < __bitmasksize; ++__i) + { + mask __bit = static_cast<mask>(1 << __i); + if (this->is(__bit, *__low)) + __m |= __bit; + } + *__vec = __m; } - *__vec = __m; } return __high; } @@ -110,8 +136,13 @@ ctype<char>:: scan_is(mask __m, const char* __low, const char* __high) const { - while (__low < __high && !this->is(__m, *__low)) - ++__low; + if (_M_table) + while (__low < __high + && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) + ++__low; + else + while (__low < __high && !this->is(__m, *__low)) + ++__low; return __low; } @@ -119,7 +150,12 @@ ctype<char>:: scan_not(mask __m, const char* __low, const char* __high) const { - while (__low < __high && this->is(__m, *__low) != 0) - ++__low; + if (_M_table) + while (__low < __high + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) + ++__low; + else + while (__low < __high && this->is(__m, *__low) != 0) + ++__low; return __low; } diff --git a/libstdc++-v3/configure.target b/libstdc++-v3/configure.target index a186659daf323c636ef3b28a5f5409e23d72baf8..526d300200f02614d96f96b299ad3f6bef1ddc73 100644 --- a/libstdc++-v3/configure.target +++ b/libstdc++-v3/configure.target @@ -166,7 +166,7 @@ case "${target_os}" in solaris2.6*) os_include_dir="os/solaris/solaris2.6" ;; - solaris2.[78]*) + solaris2.[789]*) os_include_dir="os/solaris/solaris2.7" ;; windiss*) diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc index 07b3a2dabd0cfd31e04cbe9af4e41d2a074b3522..d7e72d67f3ab309b84b9ba5d8522334346d85d4c 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc @@ -33,7 +33,7 @@ void test02() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc ("en_US.ISO-8859-1"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc index b44e86f70794f21b749678ea594b63cd2905a0f9..ad45e6214342fac151c18c96d4f3f6377ccc308a 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc @@ -33,7 +33,7 @@ void test03() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc ("en_US.ISO-8859-15"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc index 15a8546c3d7afbc9e4e97ce4227b9613d70a69ce..fe72e341a53b1e472f37219a07724e604709a801 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc @@ -33,7 +33,7 @@ void test04() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc index 9c7f5d040e6beab82e2d3413eed58d7dcb9fb2f1..c3eca4aeaa595195fcc2a0664da7a9d1ce1aca87 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc @@ -33,7 +33,7 @@ void test02() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; bool test = true; - locale loc ("en_US.ISO-8859-1"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc index 98a8961113e01649662f76b3a0b125ba405e267c..8297c260d69f8363db614a11446d5eb4d02d0617 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc @@ -33,7 +33,7 @@ void test03() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; bool test = true; - locale loc ("en_US.ISO-8859-15"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc index f2ada106694ee1f81d49c7f5e7523095b7a02865..2ffc351c8737c055c0bfc285f741079ff4d90a78 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc @@ -33,7 +33,7 @@ void test04() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; bool test = true; - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc index d9e55ef3858b55b47029c4bd8ccfbec5426693b0..a7a622f16a13ec74e935938f64c114455acb3ecd 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc @@ -88,7 +88,7 @@ void test02() wmemset(i_ref, 0xdeadbeef, size + 1); int_type* ito_next; - locale loc ("en_US.ISO-8859-1"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc index 152e7e9fe4f35a65aa8bdd6012f2c29c8c1f1ea7..1279d3be1a30d7f21c887d9359357f53e6a32394 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc @@ -102,7 +102,7 @@ void test03() wmemset(i_ref, 0xdeadbeef, size + 1); int_type* ito_next; - locale loc ("en_US.ISO-8859-15"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc index c916a16b6c9adf3696c38e8136b8c67da1e2ba0b..a4ef7fe01c2c452c04a9fe5766f95e6618248669 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc @@ -110,7 +110,7 @@ void test04() wmemset(i_ref, 0xdeadbeef, esize + 1); int_type* ito_next; - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc index f692e9cee6eeb7edb2754a3b45b6828d9797a275..799414bbbe5802ae61986f59bc6c9f5610bf0561 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc @@ -60,7 +60,7 @@ void test07() wmemset(i_ref, 0xdeadbeef, size + 1); int_type* ito_next; - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc index 28b1fa04f80ee14d497a21a829930f7c54bc3b3e..27a59c6aa53cc8166268c63ddc6e09c5a7b0d598 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc @@ -109,7 +109,7 @@ void test08() wmemset(i_ref, 0xdeadbeef, esize + 1); int_type* ito_next; - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc index 0ddebc771a97111be0b65cea569657f0e3117c8f..f95a43626ef1e1179dda454ea47118aa54642928 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc @@ -111,7 +111,7 @@ void test09() int_type* ito = i_arr; int_type* ito_next; - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc index 0e90fbdc833383e1c6fe3ce7f353cded761c21dc..029e30f8fef26956f3e145306a821bff1e36f137 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc @@ -61,7 +61,7 @@ void test02() "\xff"; int size = strlen(e_lit); - locale loc ("en_US.ISO-8859-1"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc index 8031c3edee0caf7342de852cea74ae55c3aab00e..41555def81e518bd835150d2dc0f7e326fff2d52 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc @@ -61,7 +61,7 @@ void test03() "\xff"; int size = strlen(e_lit); - locale loc ("en_US.ISO-8859-15"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc index 6a802bd2856c8631954638547755307457436cbc..f49e47dad873775af73d4ebf35e01cf1b37fbeb5 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc @@ -100,7 +100,7 @@ void test04() int esize = strlen(e_lit); int isize = wcslen(i_lit); - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc index 8a275e35a37dccf793411009c58d86bd0f33dfcf..485bfe0278c16a6a1bc8bb4d0948da39fc4d96ac 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc @@ -52,7 +52,7 @@ void test07() const ext_type* efrom_next; int size = strlen(e_lit); - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc index 9c76752d6116fd00fdd3e8c9d5869ae63af994e8..efa390b42d84c9e8e98faffb8c516ada73a4cd0f 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc @@ -31,7 +31,7 @@ void test02() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc ("en_US.ISO-8859-1"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc index 2d312bddc311f8562b6925e2e80e59c168b022aa..50877849d2d230f5687a09c48267e5777c2380c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc @@ -31,7 +31,7 @@ void test03() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc ("en_US.ISO-8859-15"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc index cd4d08d5733a287e531239f33e7bdd3e4c2fc810..2e2a62e6e326b422e2f158581ec8092b68cda0d0 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc @@ -31,7 +31,7 @@ void test04() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc index c2e807da594ad78e981701eccc8ce36e7d4a2992..bb172dbe351cf54692c20d6d2f4c8b2978149da8 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc @@ -86,7 +86,7 @@ void test02() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc ("en_US.ISO-8859-1"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc index d92e01c7d2bdc299ce88e74677a8924ba289354f..8d396f87863fdba2551051a6b7e656ee6c91aecb 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc @@ -100,7 +100,7 @@ void test03() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc ("en_US.ISO-8859-15"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc index 626ff70efe44f8cbf998a15ba04faf4e2e871ff4..1a28aa74cd370112d0a27a61cf6b6ec0bdd47266 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc @@ -107,7 +107,7 @@ void test04() memset(e_ref, 0xf0, esize + 1); ext_type* eto_next; - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc index 3ea57c05c038472ed0d3137328b36076dfa4b4a5..7b5c120b7f2840ef36e5c1bb784fb74e89934e30 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc @@ -58,7 +58,7 @@ void test03() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc ("en_US.ISO-8859-1"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc index 77e3b9292dd450592112959231af27222ff56087..5bd81df7a36dcc0c172765eb3d9473ca511759cb 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc @@ -71,7 +71,7 @@ void test02() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc ("en_US.ISO-8859-1"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc index a828090b14dfe285d976e29c2abc6f0c6f402e54..167e12375a8d99cdf0dd82c74debb87d1eb46f4f 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc @@ -85,7 +85,7 @@ void test03() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc ("en_US.ISO-8859-15"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc index 09a91ed559767fca3459afa29dbe0327ae4bac41..631b87399bba89da5cc634b16701f31c60358622 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc @@ -80,7 +80,7 @@ void test04() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc ("en_US.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc index bed2fb40991a82e81249184737827e42c1484fc7..fd4c90dadffea978956b92bfb29e54d75ba9faa3 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); @@ -74,6 +74,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc index ab29ac409e1c24f037bce0733783f3d9d9c922ae..892bac545340a05f52cb6e2a379eb0616444800e 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); @@ -81,6 +81,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc index c8209548bc3a752aee2fa433117ea7c7dbbdf672..e604b202b6f2d24588d0f3d73d6dc3165ed4c9f3 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc @@ -33,7 +33,7 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); // cache the collate facets @@ -85,6 +85,6 @@ void test03() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc index 0ba7b05835e71cab280549004ea3a39c940b8c8b..b74157b84e3426fff2c32c29b2a06c909ecd361a 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc index 24b327f979b7d7f7e11d7ae5393ff5a10b1312b6..67ab49de7576d966ea39c2c000fe3f72e3acba5a 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc index 0f9ee649c323b286c8ccec0db787888ca54b8e10..824f8e1dfa6b76c5f40103adfa108b88dd89b3fb 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc @@ -33,7 +33,7 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); // cache the collate facets diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc index 47fcd579ec72c1c28e3c8b50c96ddec3656987e3..5e8336885b56019992e610b0e7b8717e44716d08 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); @@ -70,6 +70,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc index b11be4a99907f8fd708c4c1fa2d0cf8c6b639e55..79e3267e4350b61ed1c3d7519aeaee414e6c770e 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc @@ -32,9 +32,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc index 24ff7cdac8fb3ab99dca7b53afc4af2b61eaf34a..4a38327d5eb1648914daba6c686c086c71758d18 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc @@ -32,9 +32,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); @@ -67,6 +67,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc index f9d16b54944e05495a45bd12031feffef2193b6b..21b90ff0e15846e6585fbc94abf7a60df1851ea8 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc @@ -32,7 +32,7 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); // cache the collate facets @@ -88,6 +88,6 @@ void test03() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc index f643fd68da626f5c976b56572d6c0eced3720068..274d78c7c5d0093287c47531648691b6dde9df9f 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc @@ -32,9 +32,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc index 108c0a4be30c6dde87e81cef2fe91be8c0395407..0a3f98113f9117b85fc7346cd4d4575b5b9a6a68 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc @@ -32,7 +32,7 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); // cache the collate facets diff --git a/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc b/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc index edfb42c2120daeba0958152d98e8738d08e2b4fe..eec1513af27a710fbe94b1893e26684e8b603ae5 100644 --- a/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc @@ -32,12 +32,12 @@ void test01() string str; locale loc_c = locale::classic(); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + str = loc_de.name(); + locale loc_byname(locale::classic(), new collate_byname<char>("de_DE")); str = loc_byname.name(); - locale loc_de("de_DE"); - str = loc_de.name(); - VERIFY( loc_de != loc_byname ); // cache the collate facets @@ -131,6 +131,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc index d04800a01ca0dbbfa3f6515de409c3a17a4f8abc..605e5f3dfdbbbebc5b710880614a3aeb5aab6a3e 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc @@ -67,7 +67,7 @@ void test02() } // "de_DE" - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); const ctype<char>& ctype_de = use_facet<ctype<char> >(loc_de); for (int i = 0; i < max; ++i) { @@ -99,6 +99,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc index b1b565f3780146af63eaeefb8d3558e5fe8219d1..7ff278c1f87c68599f88190f93c9c59cf6ac2545 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc @@ -67,7 +67,7 @@ void test02() } // "de_DE" - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); const ctype<wchar_t>& ctype_de = use_facet<ctype<wchar_t> >(loc_de); for (int i = 0; i < max; ++i) { diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc index f235d8a36610a228f252176c4f1aeef4ce5f9082..67d9b6ee15316c3d680317300c7b31df43184dfe 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc @@ -38,7 +38,7 @@ void test03() using namespace std; bool test = true; - locale loc ("se_NO.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("se_NO.UTF-8"); const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc); const wchar_t* wstrlit = L"\x80"; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc index e4e49676c5ba4a8092d562a4a555d1daecee63de..e1ab3f76bbe0284097cd9d682ff77bbfaf9cc3bc 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc @@ -38,7 +38,7 @@ void test02() using namespace std; bool test = true; - locale loc ("en_US.ISO-8859-1"); + locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc); char c = 0xff; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc index e872a944b8504dccc00efe793648427515c7bdc2..1d380d49fdbdbeac8fcafa0eff74708cff8d77f4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc @@ -38,7 +38,7 @@ void test03() using namespace std; bool test = true; - locale loc ("se_NO.UTF-8"); + locale loc = __gnu_cxx_test::try_named_locale("se_NO.UTF-8"); const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc); const char* strlit = "\xc2\x80"; diff --git a/libstdc++-v3/testsuite/22_locale/facet/2.cc b/libstdc++-v3/testsuite/22_locale/facet/2.cc index ea63d731a3f1eb0c123eff2294d7c1bb812c16be..379ed8975f0a7524923ce4840ae22a3ceeaa6fec 100644 --- a/libstdc++-v3/testsuite/22_locale/facet/2.cc +++ b/libstdc++-v3/testsuite/22_locale/facet/2.cc @@ -83,12 +83,12 @@ void test02() // 4: Named locale should destroy facets when it goes out of scope. // Not quite sure how to test for this w/o valgrind at the moment. { - locale loc03("es_MX"); + locale loc03 = __gnu_cxx_test::try_named_locale("es_MX"); } } int main () { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc index 1f13c23992ec4e6a60120bbcf97847ba5e8ac90c..1c03e4df29e65e2ec6fc9c13be1366cf42a2ca34 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc @@ -80,7 +80,7 @@ namespace std static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) - { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); } + { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); } static char_type* assign(char_type* __s, size_t __n, char_type __a); @@ -170,7 +170,7 @@ void test01() // 3 // explicit locale(const char* std_name) - locale loc06("fr_FR"); + locale loc06 = __gnu_cxx_test::try_named_locale("fr_FR"); VERIFY (loc06 != loc01); VERIFY (loc06 != loc02); VERIFY (loc06.name() == "fr_FR"); diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc index 4864b0bad7d56dbfc56e178c13757f07527c34fa..f20542a137cc485c2abd9f30f0dd7f39649edd90 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc @@ -33,7 +33,7 @@ void test03() const char* LC_ALL_orig = getenv("LC_ALL"); if (!setenv("LC_ALL", "it_IT", 1)) { - std::locale loc(""); + std::locale loc = __gnu_cxx_test::try_named_locale(""); VERIFY( loc.name() == "it_IT" ); setenv("LC_ALL", LC_ALL_orig ? LC_ALL_orig : "", 1); } @@ -42,6 +42,6 @@ void test03() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc index 5c649d0b5b9dc2c50211d869f0f8837b6ac0df7e..55ace6eaf82c3ee355a1065c02caddab39d0aab3 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc @@ -65,7 +65,7 @@ void test04() // Check that a "POSIX" LC_ALL is equivalent to "C". if (!setenv("LC_ALL", "POSIX", 1)) { - locale loc(""); + locale loc = __gnu_cxx_test::try_named_locale(""); VERIFY( loc.name() == "C" ); } setenv("LC_ALL", "", 1); @@ -73,7 +73,7 @@ void test04() // Check that a "en_PH" LC_ALL is equivalent to "en_PH". if (!setenv("LC_ALL", "en_PH", 1)) { - locale loc(""); + locale loc = __gnu_cxx_test::try_named_locale(""); VERIFY( loc.name() == "en_PH" ); } setenv("LC_ALL", "", 1); @@ -83,7 +83,7 @@ void test04() { if (!setenv("LC_ALL", "en_PH", 1)) { - locale loc(""); + locale loc = __gnu_cxx_test::try_named_locale(""); VERIFY( loc.name() == "en_PH" ); } setenv("LC_ALL", "", 1); @@ -112,7 +112,7 @@ void test04() // Check the default set by LANG. if (!setenv("LANG", "fr_FR", 1)) { - locale loc(""); + locale loc = __gnu_cxx_test::try_named_locale(""); VERIFY( loc.name() == "fr_FR" ); } @@ -126,7 +126,7 @@ void test04() // Setting a category in the "C" default. if (!setenv("LC_COLLATE", "de_DE", 1)) { - locale loc(""); + locale loc = __gnu_cxx_test::try_named_locale(""); #if _GLIBCPP_NUM_CATEGORIES VERIFY( loc.name() == "LC_CTYPE=C;LC_NUMERIC=C;LC_TIME=C;" @@ -142,7 +142,7 @@ void test04() // Changing the LANG default while LC_COLLATE is set. if (!setenv("LANG", "fr_FR", 1)) { - locale loc(""); + locale loc = __gnu_cxx_test::try_named_locale(""); #if _GLIBCPP_NUM_CATEGORIES VERIFY( loc.name() == "LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;" "LC_TIME=fr_FR;LC_COLLATE=de_DE;LC_MONETARY=fr_FR;" @@ -160,7 +160,7 @@ void test04() #if _GLIBCPP_NUM_CATEGORIES if (!setenv("LC_IDENTIFICATION", "it_IT", 1)) { - locale loc(""); + locale loc = __gnu_cxx_test::try_named_locale(""); VERIFY( loc.name() == "LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;" "LC_TIME=fr_FR;LC_COLLATE=de_DE;LC_MONETARY=fr_FR;" "LC_MESSAGES=fr_FR;LC_PAPER=fr_FR;LC_NAME=fr_FR;" @@ -193,6 +193,6 @@ void test04() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test04); + test04(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc index fb709666d483ad9df825381e2db3c377d5890179..ced0f59f6be90eabfe9db57dafdf182189cdbce5 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc @@ -35,9 +35,9 @@ test02() // construct a locale object with the specialized facet. locale loc_c = locale::classic(); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); locale loc_1(locale::classic(), new numpunct_byname<char>("fr_FR")); - locale loc_fr("fr_FR"); // check names VERIFY( loc_c.name() == name_c ); @@ -99,6 +99,6 @@ test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc index 7a93dee1541f4b25d99db00f7986ceee627704be..003462441ee4d410a1ab7975199c0f5b805f7373 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc @@ -31,7 +31,7 @@ void test02() bool test = true; std::locale loc_c1("C"); - std::locale loc_c2 ("C"); + std::locale loc_c2("C"); VERIFY( loc_c1 == loc_c2 ); } diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc index 1309a318386ebded06c8947e286e8af5b60e4164..126db7da1fa71dcc7de664e8e099305f4c1ca798 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc @@ -30,13 +30,13 @@ void test02() { bool test = true; - std::locale loc_1(""); - std::locale loc_2(""); + std::locale loc_1 = __gnu_cxx_test::try_named_locale(""); + std::locale loc_2 = __gnu_cxx_test::try_named_locale(""); VERIFY( loc_1 == loc_2 ); } int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc index bde35e26347072451e8189d89566b5b1d05336e2..7d5aec00771f3ef149391bc64ea56114538e1630 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc @@ -42,13 +42,13 @@ void test02() // named locales work. if (testph && testmx) { - const locale loc_ph(ph.c_str()); - const locale loc_mx(mx.c_str()); + const locale loc_ph = __gnu_cxx_test::try_named_locale(ph.c_str()); + const locale loc_mx = __gnu_cxx_test::try_named_locale(mx.c_str()); // Use setlocale between two calls to locale("") - const locale loc_env_1(""); + const locale loc_env_1 = __gnu_cxx_test::try_named_locale(""); setlocale(LC_ALL, ph.c_str()); - const locale loc_env_2(""); + const locale loc_env_2 = __gnu_cxx_test::try_named_locale(""); VERIFY( loc_env_1 == loc_env_2 ); // Change global locale. diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc index 7167fadef108ab18d576bde60c3076790337160f..2956ec8ab9e2db2669393f87da4fbee4982b936c 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc @@ -35,9 +35,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); @@ -64,6 +64,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc index 61ffba626c1500dd214e150d779e3f7cbb31d095..eed7efaa262857f04864845d747c4326d323beb1 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc @@ -35,9 +35,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); @@ -64,6 +64,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc index 55cf80193d6d983698ea445dfd120353f07bb087..ad975115720e5d874173b0d45984adc9d9e387d1 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc @@ -35,9 +35,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); @@ -64,6 +64,6 @@ void test03() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc b/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc index e9d3217c08f2616528e4bcffe7e79bda677f2ff9..e915c9675cb1571e944e6c5b26473512c685dba9 100644 --- a/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc @@ -35,12 +35,12 @@ void test01() const char* dir = LOCALEDIR; locale loc_c = locale::classic(); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + str = loc_de.name(); + locale loc_byname(locale::classic(), new messages_byname<char>("de_DE")); str = loc_byname.name(); - locale loc_de("de_DE"); - str = loc_de.name(); - VERIFY( loc_de != loc_byname ); // cache the messages facets @@ -73,6 +73,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc index f4e5481def6e8cf7c05dec1973b836fad0428173..b35b448db2fa5fc5db2f2e5eceeef2e73708a87e 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc @@ -36,9 +36,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -146,6 +146,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc index 42e149609a0c7efbc8850c895fb1aaeaa381dec5..a0d4caef7a2ea81ada9a20a7996748f426652ab0 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc @@ -36,9 +36,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -135,6 +135,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc index 749c68c73ab99706bab87143747ec0e0eefc6ce1..80e47c940fd5376fb148759147511e29e0e0e6ef 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc @@ -36,9 +36,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -91,6 +91,6 @@ void test03() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc index b2456658e56ffb2b5fc96e50d889791a8dcbd1b6..b62e2f44764f16004e61215494a2a1c99df55c17 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc @@ -36,9 +36,9 @@ void test04() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -86,6 +86,6 @@ void test04() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test04); + test04(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc index d8d86f2cfafe6495b0fbafaa4fc3ec51e26d1753..8d1d532c9a1470442a30538d524f83b0ba9a84b8 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc @@ -36,9 +36,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc index 9b3c8741e321f897f05fe1975b81c65fc4d0201b..38721ce9991aeab41ba81b40a0cfc0c7913a38d9 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc @@ -36,9 +36,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc index 747b4944494c6e5ecc7e9d04fa42f41d4c45b47c..da33d636035f37d2a102073455bb998c96245f7d 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc @@ -36,9 +36,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc index 030c47a2994e902daf5c9b0406cbc7052f6fa109..91b05cb45e4a6fb6a8a89bc16304c3af94159713 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc @@ -36,9 +36,9 @@ void test04() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc index d34d3fba0e776d5067d347ce36dc65ee53d9ea69..27d79dc4b07e6c2708935caef18d2fd19a8c9679 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc @@ -36,9 +36,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -124,6 +124,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc index d1c240f780972a7c887a51c893c5d66ad0a4a9bd..69cfeb6ca553db1447f3d66d628763f995c00b6b 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc @@ -36,9 +36,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -115,6 +115,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc index 73c84b2c4d50bb9b07955093df416438048f6d40..49531ad0a3875ec9583ea3cc76178db1cf29d8cd 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc @@ -36,9 +36,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -104,6 +104,6 @@ void test03() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc index 400ce026ce7eaf2282a090a37fe2c259bdf26d40..19c04d6800794c9501d291fe556ad19c612fcb8c 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc @@ -36,9 +36,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc index d99a240ff0a91dbb4d55feec3c115e74c1c930bd..ad5834b192135994dab4b819154f7137c8255fda 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc @@ -36,9 +36,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc index 8a7778396bcb78ff9b3b943600fd8bcae9cd5b96..03c747ac8425590c5ce9748fc55b7fd5de692714 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc @@ -36,9 +36,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE@euro"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc index 7d74101c95d181b31a84873eeb04c2a8ac6f8a61..13d680e14fb89c148d7cd677543eef299a19ced3 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc @@ -34,7 +34,7 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); // cache the moneypunct facets typedef moneypunct<char, true> __money_true; @@ -95,6 +95,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc index 2e258f9ce2c5467f4101185f37392d7c7a3a2c86..4394d83257a8c11d0a2061fe188b78b4f24c03ad 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc @@ -34,7 +34,7 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); // cache the moneypunct facets typedef moneypunct<wchar_t, true> __money_true; diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc index 83fc8f62b318c56b89822128c3174e759dc53623..70cbf38058d403537e170a2b7afebdc0d58fcf97 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc @@ -32,12 +32,12 @@ void test01() bool test = true; string str; + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + str = loc_de.name(); + locale loc_byname(locale::classic(), new moneypunct_byname<char>("de_DE")); str = loc_byname.name(); - locale loc_de("de_DE"); - str = loc_de.name(); - locale loc_c = locale::classic(); VERIFY( loc_de != loc_byname ); @@ -93,7 +93,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); - + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc index 3723e23ffd4211567fbb23f6142007e864e54e3a..6f972c578244f9dc64c34e8057332f965018b6b9 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -162,7 +162,7 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc index 108fae13c1b58014e73e248ba45720ed291e9f54..cb446c7e36aea724cf35e0d9015e0596cbd2a3d6 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -132,7 +132,7 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc index b6c0f12ca1aae6f770da3daecc8340cd2c11e129..41867ca91920ec487a09abd0b5b0f9656d3375f0 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc @@ -33,9 +33,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -94,7 +94,7 @@ void test03() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc index 94da704f1d39e45bbf08ca2b06d26bbd27b050af..0590d49b13e2763a1764562694ed5be3ccf2dc5d 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc @@ -36,7 +36,7 @@ void test05() istringstream iss; // A locale that expects grouping - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); iss.imbue(loc_de); const num_get<char>& ng = use_facet<num_get<char> >(iss.getloc()); @@ -84,7 +84,7 @@ void test05() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test05); + test05(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc index b5e0a21615b8b5b8d4881ac250ead4b1b6dc57f6..a6b94172035c1276ef519ccba07b8ad293ce5de6 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc @@ -33,7 +33,7 @@ void test06() double d = 0.0; istringstream iss; - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); iss.imbue(loc_de); const num_get<char>& ng = use_facet<num_get<char> >(iss.getloc()); @@ -49,7 +49,7 @@ void test06() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test06); + test06(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc index a30cf971946fa698cbb8d4fd533279803b7ce844..ef055b3d3e504ec49be6ddbb5bedd6067d4d9c37 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc index dc11885adf2aed0bbef4b9e17c2231d274d11648..bbf2a98872ac34881dcf48ff12c9ba1b5ce0fae1 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc index d3b1118354ba33e1f139a646cced677c551a5334..65fcf84051a6c85904e6c63f686b16335b5eb93c 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc @@ -33,9 +33,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc index 7eaaa89e9f7210fe6cf8ba06cc55bdcf60aa794a..8443816a8d6c364642ad8e0f4ac7dc1c4774f388 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc @@ -36,7 +36,7 @@ void test05() wistringstream iss; // A locale that expects grouping - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); iss.imbue(loc_de); const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(iss.getloc()); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc index 2f4bb1bb0b429b47f13cc26e7d64051364ce9fbe..57490f3f0aa4c69aa2596dda058837f32135d04e 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc @@ -33,7 +33,7 @@ void test06() double d = 0.0; wistringstream iss; - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); iss.imbue(loc_de); const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(iss.getloc()); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc index 87abef44e9a2907ee5eeb3062f6293f2ee5c4551..b34fce2b672fa7f66f6f1ae138ba9f31feaec593 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -169,7 +169,7 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc index a62dfc1f88b6c96d161464549600c56d7f880b4b..407dbff3a659e12dcc2417d55902fc674c4063b5 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -105,7 +105,7 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc index 0bc92b2af0e1a77b3a496931a245f1f1e1e9f305..080a2a476727022c1838ea28de64c75ec3a8eb50 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc @@ -33,9 +33,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -88,7 +88,7 @@ void test03() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc index eb0bd219622187b59fc5188b3d3003504de910bb..055f4c9f316b858dfd5653bba7df0eff7c8c3b56 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc @@ -33,7 +33,7 @@ void test05() bool test = true; // A locale that expects grouping. - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); const string empty; string result; @@ -63,7 +63,7 @@ void test05() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test05); + test05(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc index 9c5bdc5968e2a08596eefeb95ea12b95d9a9026d..28ed5d7e4f39da310c7d2a6464449887db043097 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc index de08c093745aa3b02fe5e5c3cbd40f721adce20d..8416c4c16c925b7f662f6083e0b6e2c7efdcf6f2 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc index ae2d0cfac8cc030563a39ba60f16c8adb82e8d19..26750ac7a619687553c89e679252b61aad31d636 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc @@ -33,9 +33,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc index 18ea8edc6008883e3d936acf9bc6ec7cd06f347c..dd4799b85bd4ed2013b35a65fd9fd4abfbf9a45f 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc @@ -33,7 +33,7 @@ void test05() bool test = true; // A locale that expects grouping. - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); const wstring empty; wstring result; diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc index aba34e29267ffdae04891b5d2d4f80dd89a40ed6..023c64f8d7ce0084894cc3bcdde157b3edb0f9b9 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc @@ -31,9 +31,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); @@ -60,6 +60,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc index ec9512fedbe57e3abccd18db92b52ae0f809e2cc..b6c8b2ddeccb341137a909265c40e06ebede1581 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc @@ -31,9 +31,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); @@ -82,6 +82,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc index ac4e8201dbe168ffb46386c425a8d09763f7b959..e3426fda43ce711f90b54a7a05991ed11fcd625d 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc @@ -31,9 +31,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc index c544b29cce68cf9eed4e1c96507598be2ff7ad6c..9b55ae95e33f5573b0e5097f7427a915d68cf024 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc @@ -31,9 +31,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us("en_US"); - locale loc_fr("fr_FR"); - locale loc_de("de_DE"); + locale loc_us = __gnu_cxx_test::try_named_locale("en_US"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc index a6c71dc644ec60eaa2e437f45d0e03e74ea6dd6c..96a9691ac6d60fef38b312650a0efd10a94a8c69 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc @@ -30,12 +30,12 @@ void test01() bool test = true; string str; + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + str = loc_de.name(); + locale loc_byname(locale::classic(), new numpunct_byname<char>("de_DE")); str = loc_byname.name(); - locale loc_de("de_DE"); - str = loc_de.name(); - locale loc_c = locale::classic(); VERIFY( loc_de != loc_byname ); @@ -71,6 +71,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc index f096a8b9f0cdf560d0a8d66b9a5549815eb5802c..6bebbbf0d4c8af5db0439e82b26ac45017197fee 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc @@ -29,7 +29,7 @@ void test02() bool test = true; - locale loc_it("it_IT"); + locale loc_it = __gnu_cxx_test::try_named_locale("it_IT"); const numpunct<char>& nump_it = use_facet<numpunct<char> >(loc_it); @@ -40,6 +40,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc index 46958a21da39b561d0949ae05ed900436532d2d3..59128a613366fcd0a1cf66d4e7092e407bb91a43 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -64,6 +64,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc index 9baf0216bc261521f83c010ade1f1b6e60fa22f2..b4a2fcf6984922df9c366bcabe107ace4aeaf358 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc index f242c4bee4a32dff41ff81222b0d6c50d420bdc1..a4782795f6e6e4e6841c227b25814d3f869d4dae 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -107,6 +107,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc index 274a231cd6e4c05a7f2677475cbe25a9a7a89634..149b95276d583be5a72b2ddf0c758183a4b6b4f2 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -103,6 +103,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc index 965493d316fe6940b6068558f4fd7278d9d2d020..71a30d11b87efc4270a2c88bb5635e0395817e34 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc index 1e4d57afb44b42e1a54d98b3f7e701928cb4bb13..33312396dacabc49f501361a35aca4dce9ee7936 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc index 2fd9b760005211e466c4a8e08b51019dcc0725f3..6ecbb0a0ddbbaf1e67517803b248e953c6e44bc6 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc @@ -37,9 +37,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -121,6 +121,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc index c98f8d1cb50359171d36adc435c944643c9cfd6e..6535a66c4e93cca5925e8ac7014c62850927df4e 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -85,6 +85,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc index 8ba9d5df074cf6bdb25df1251b8904750b5d51b7..7e82e5197c203a36dfb107bcbcefa60b9020fb36 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc @@ -37,9 +37,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc index 80fe2dfda41d1afcfd9bda275f6f1e16f70ee86b..edab4ba3f3caea0032cf2ae76d9173e203d434be 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc index 80d996c0c47caa7b94820a5b06d10d87c84f0887..89015346acf9c90bc6f0ced3485ad03aa50d5d95 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -122,6 +122,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc index 1d56827071cfba8d279eab9f9e21ff9674c57a9c..ddb817f0913bc33d1f184dc3f4832152cd405b91 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -75,6 +75,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc index 5d64670f3bd4d286a687ecca7d62816d5b790ac8..a1fe3b3d2e7cdf0ff609145692b1ee1abf650603 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc index 5b7293848cc9e483a93f7787fe45315b2b429842..0151fc64d3369bfe93005c8264eafd93b2c67675 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc index ca89d1e4a2b72d9d326027c5d548d1860c6c7377..c530170d05a658fe3387c9a058b4e72440169d90 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -129,6 +129,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc index 6e9d99936ef34e23a17b7c5f5c43b802bcbec721..68a7d89ed1a3d758ec27b0e2c62048028c8c529f 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -85,6 +85,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc index a865c2eff1d38a17be0054c746bb23d367a36514..0c7d5b40f0426c0726290b421d69bc0126807332 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc index 299f2ef05253a326835cd1cbe7dfbe645291287b..af2e3ecc6ec68598b7411eb040d364faa367492b 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc index aabfd6d0f252c2e51e7d540de92ac5a563d416fd..0f408fc1f1201b5c0cd266d45d72abafa118a348 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -118,6 +118,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc index c117311c73194c8c83dbda0c2e98003468970ac4..e5c726a13b3407aff94d365a3a85fd384b6e11bb 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc index f54a8c9182909db9a4a15f7345bb25b111c80b44..d3acb9b824a0c543b13cf18b37925c7c74251b10 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc @@ -40,9 +40,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -85,6 +85,6 @@ void test01() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc index 665036b1c6ee0608783910800e3f9558596644e2..4656efc16e4dcb56ec44699b2f8e86c4d3f670de 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc @@ -40,9 +40,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -80,6 +80,6 @@ void test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc index 3399669df85d9fcf9a8beaed20e195f321c543ea..3b768db4b121e220aae514a7d3d02ee8898cf438 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc @@ -40,9 +40,9 @@ void test03() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -80,6 +80,6 @@ void test03() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc index afb45eecacc62b6b87ec0cd5bbdc2bffe5d4fd47..d07fad6dc2d2502976369b738b80c6dc17a07c45 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc @@ -40,9 +40,9 @@ void test04() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -79,6 +79,6 @@ void test04() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test04); + test04(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc index b7b0055c29d2eb9709fc4fc8c993e31cbb12eafb..e1355b8ea471a7bc257cd976fe339c640beaee21 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc @@ -41,9 +41,9 @@ void test05() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -75,6 +75,6 @@ void test05() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test05); + test05(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc index 9287571901c4072a78b070a5deb5084ee2a061f7..5634d9f3bde5372540343c404e82c8c5b51da251 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc @@ -41,9 +41,9 @@ void test06() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -73,6 +73,6 @@ void test06() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test06); + test06(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc index 00cefcfe7b9c95778c4fa0f4b10de3b8e76525f9..91a5e9bf84879583e989159246a27dcf0485ae18 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc @@ -42,9 +42,9 @@ void test07() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -74,6 +74,6 @@ void test07() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test07); + test07(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc index 10afde5c5005832fcd841b29f08599649bf8a008..7409ff9cbb4d4047d7fba93a2a9c134363e84959 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc @@ -41,9 +41,9 @@ void test08() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); @@ -72,6 +72,6 @@ void test08() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test08); + test08(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc index 914b187d46b96abc625888190c11cbaf86916f33..874b62800c220944b43d4ce08c05fc9ce612687e 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc @@ -40,9 +40,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc index bddb23f52d868d4d9e63ef861504c8572f11adb7..b41e6a7feb5cd0d5225e7fd01bfe3195755d12bc 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc @@ -40,9 +40,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc index 566a3a57ca4ae00f32630d17ffb182d6cd057bb7..d3cf9dd9971c7bb070f479b1bc45724a3b0ff40c 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc @@ -40,9 +40,9 @@ void test03() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc index 88d3b04239fa5e76a80a8bec855e53cc22495bfa..db04bcc07654f3fbc27179dcdaa2725656967eba 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc @@ -40,9 +40,9 @@ void test04() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc index ac53243b3392d8fc2f70198dfc66d600bf9ea68f..9268127b1a5e53b96bd0b0890e5be905faf338b2 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc @@ -41,9 +41,9 @@ void test05() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc index 0f5855510a98e9fb3f935e2f49f5e529a1afc66c..90f7614f9d94d5489157b387259bc9bf377b5e86 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc @@ -41,9 +41,9 @@ void test06() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc index 44a86ac80c89d2820757375327ae4422dc2372ed..c63147870dfad24482cd384bbbd6eda1babaed95 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc @@ -41,9 +41,9 @@ void test07() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc index 900dc1328e62fde8338bff08f69f82c7e6018de7..a7edf18c477eec967e9e3c2dc8091266cda952d0 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc @@ -41,9 +41,9 @@ void test08() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk("en_HK"); - locale loc_fr("fr_FR@euro"); - locale loc_de("de_DE"); + locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc index e584f461bb703491a3027ed0def24daa386df096..5a43a2a4a2f1be2bb5d6fed5cfbed227bf4c3aab 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc @@ -34,10 +34,10 @@ void test07() std::filebuf ob; VERIFY( ob.getloc() == loc ); - locale::global(locale("en_US")); + locale::global(__gnu_cxx_test::try_named_locale("en_US")); VERIFY( ob.getloc() == loc ); - locale loc_de ("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); locale ret = ob.pubimbue(loc_de); VERIFY( ob.getloc() == loc_de ); VERIFY( ret == loc ); @@ -48,6 +48,6 @@ void test07() main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test07); + test07(); return 0; } diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc index 03d45154e35bb79be312cf00153ff4b1bf567bcb..6daa4e02c5e43c69c40a50369c20c0df7c065bd7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc @@ -43,7 +43,7 @@ void test03() typedef std::ios_base::fmtflags fmtflags; typedef std::ios_base::iostate iostate; locale loc_c = locale::classic(); - locale loc_de("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); std::ios ios_01(NULL); std::ios ios_02(NULL); ios_01.imbue(loc_c); @@ -68,6 +68,6 @@ void test03() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc index ed4979fa3a85499084c606676ddb30b563591768..92180927f6fd936a4da32f961dc802215cc428ed 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc @@ -43,7 +43,7 @@ test02() os2.setf(ios::fixed); // Check it can be done in a locale with grouping on. - locale loc2("de_DE"); + locale loc2 = __gnu_cxx_test::try_named_locale("de_DE"); os2.imbue(loc2); os2 << fixed << setprecision(3) << val2 << endl; os2 << endl; @@ -53,6 +53,6 @@ test02() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc index 3b8da10b5ada172441a0f496d540501c4fb6b478..fee82668f9d02e381a17055716644fe1b6034272 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc @@ -53,10 +53,10 @@ void test08() testbuf ob; VERIFY( ob.getloc() == loc ); - locale::global(locale("en_US")); + locale::global(__gnu_cxx_test::try_named_locale("en_US")); VERIFY( ob.getloc() == loc ); - locale loc_de ("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); locale ret = ob.pubimbue(loc_de); VERIFY( ob.getloc() == loc_de ); VERIFY( ret == loc ); @@ -67,6 +67,6 @@ void test08() int main() { - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test08); + test08(); return 0; } diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc index 3da38fb8ff4391d9b98d4c1c869469654e320b7f..7006dda094ad10952ca89f14be7b1db19187b65a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc @@ -33,10 +33,10 @@ void test03() std::stringbuf ob; VERIFY( ob.getloc() == loc ); - locale::global(locale("en_US")); + locale::global(__gnu_cxx_test::try_named_locale("en_US")); VERIFY( ob.getloc() == loc ); - locale loc_de ("de_DE"); + locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); locale ret = ob.pubimbue(loc_de); VERIFY( ob.getloc() == loc_de ); VERIFY( ret == loc ); @@ -48,6 +48,6 @@ void test03() int main() { using namespace std; - __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/testsuite_hooks.cc b/libstdc++-v3/testsuite/testsuite_hooks.cc index d51a3d34435fadd94a34b66e2edd86dbe5ab861e..988ef03620ee1ed6bc20cb0ef5b03a1e5706a223 100644 --- a/libstdc++-v3/testsuite/testsuite_hooks.cc +++ b/libstdc++-v3/testsuite/testsuite_hooks.cc @@ -148,20 +148,8 @@ namespace __gnu_cxx_test bool test = true; // Set the global locale. - try - { - locale loc_name(name); - locale orig = locale::global(loc_name); - } - catch (std::runtime_error& ex) - { - if (std::strstr (ex.what(), "unhandled name in generic implementation")) - return; - else if (std::strstr (ex.what(), "unknown name")) - return; - else - throw; - } + locale loc_name = try_named_locale(name); + locale orig = locale::global(loc_name); const char* res = setlocale(LC_ALL, name); if (res != NULL) @@ -185,20 +173,9 @@ namespace __gnu_cxx_test #ifdef _GLIBCPP_HAVE_SETENV // Set the global locale. - try - { - locale loc_name(name); - locale orig = locale::global(loc_name); - } - catch (std::runtime_error& ex) - { - if (std::strstr (ex.what(), "unhandled name in generic implementation")) - return; - else if (std::strstr (ex.what(), "unknown name")) - return; - else - throw; - } + locale loc_name = try_named_locale(name); + locale orig = locale::global(loc_name); + // Set environment variable env to value in name. const char* oldENV = getenv(env); if (!setenv(env, name, 1)) @@ -212,19 +189,21 @@ namespace __gnu_cxx_test #endif } - void - run_test_wrapped_generic_locale_exception_catcher(const test_func f) + std::locale + try_named_locale(const char* name) { try { - f(); + return std::locale(name); } catch (std::runtime_error& ex) { - if (std::strstr (ex.what(), "unhandled name in generic implementation")) - return; - else if (std::strstr (ex.what(), "unknown name")) - return; + // Thrown by generic implemenation. + if (std::strstr(ex.what(), "unhandled name in generic implementation")) + exit(0); + // Thrown by gnu implemenation. + else if (std::strstr(ex.what(), "unknown name")) + exit(0); else throw; } diff --git a/libstdc++-v3/testsuite/testsuite_hooks.h b/libstdc++-v3/testsuite/testsuite_hooks.h index da397e3bdfd1ac078b2ba1ee8a1ec200409edea5..0c3aae6cec9ff66dcf4d7d33e205b820e0050829 100644 --- a/libstdc++-v3/testsuite/testsuite_hooks.h +++ b/libstdc++-v3/testsuite/testsuite_hooks.h @@ -68,6 +68,7 @@ # define VERIFY(fn) test &= (fn) #endif #include <list> +#include <locale> namespace __gnu_cxx_test { @@ -105,9 +106,9 @@ namespace __gnu_cxx_test void run_tests_wrapped_env(const char*, const char*, const func_callback&); - // Run select unit test inside exception catcher for non-C named locale - void - run_test_wrapped_generic_locale_exception_catcher(const test_func); + // Try to create a locale with the given name. If it fails, bail. + std::locale + try_named_locale(const char* name); // Test data types. struct pod_char