]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c_locale.cc (locale::facet::_S_create_c_locale): Throw runtime exception when unsuppo...
authorLoren J. Rittle <ljrittle@acm.org>
Sat, 8 Mar 2003 08:55:54 +0000 (08:55 +0000)
committerLoren J. Rittle <ljrittle@gcc.gnu.org>
Sat, 8 Mar 2003 08:55:54 +0000 (08:55 +0000)
* config/locale/generic/c_locale.cc (locale::facet::_S_create_c_locale):
Throw runtime exception when unsupported language is specified.
* testsuite/testsuite_hooks.h
(run_test_wrapped_generic_locale_exception_catcher): New function.
* testsuite/testsuite_hooks.cc (run_tests_wrapped_locale):
Suppress runtime exception thrown by generic implementation.
(run_tests_wrapped_env): Likewise.
(run_test_wrapped_generic_locale_exception_catcher): New function.
* testsuite/22_locale/collate/compare/char/1.cc: New test wrap.
* testsuite/22_locale/collate/compare/char/2.cc: New test wrap.
* testsuite/22_locale/collate/compare/char/3.cc: New test wrap.
* testsuite/22_locale/collate/hash/char/2.cc: New test wrap.
* testsuite/22_locale/collate/transform/char/2.cc: New test wrap.
* testsuite/22_locale/collate/transform/char/3.cc: New test wrap.
* testsuite/22_locale/collate_byname/1.cc: New test wrap.
* testsuite/22_locale/ctype/is/char/2.cc: New test wrap.
* testsuite/22_locale/facet/2.cc: New test wrap.
* testsuite/22_locale/locale/cons/4.cc: New test wrap.
* testsuite/22_locale/locale/cons/5.cc: New test wrap.
* testsuite/22_locale/locale/cons/7.cc: New test wrap.
* testsuite/22_locale/messages/members/char/1.cc: New test wrap.
* testsuite/22_locale/messages/members/char/2.cc: New test wrap.
* testsuite/22_locale/messages/members/char/3.cc: New test wrap.
* testsuite/22_locale/messages_byname/1.cc: New test wrap.
* testsuite/22_locale/money_get/get/char/1.cc: New test wrap.
* testsuite/22_locale/money_get/get/char/2.cc: New test wrap.
* testsuite/22_locale/money_get/get/char/3.cc: New test wrap.
* testsuite/22_locale/money_get/get/char/4.cc: New test wrap.
* testsuite/22_locale/money_put/put/char/1.cc: New test wrap.
* testsuite/22_locale/money_put/put/char/2.cc: New test wrap.
* testsuite/22_locale/money_put/put/char/3.cc: New test wrap.
* testsuite/22_locale/moneypunct/members/char/2.cc: New test wrap.
* testsuite/22_locale/moneypunct_byname/1.cc: New test wrap.
* testsuite/22_locale/num_get/get/char/1.cc: New test wrap.
* testsuite/22_locale/num_get/get/char/2.cc: New test wrap.
* testsuite/22_locale/num_get/get/char/3.cc: New test wrap.
* testsuite/22_locale/num_get/get/char/5.cc: New test wrap.
* testsuite/22_locale/num_get/get/char/6.cc: New test wrap.
* testsuite/22_locale/num_put/put/char/1.cc: New test wrap.
* testsuite/22_locale/num_put/put/char/2.cc: New test wrap.
* testsuite/22_locale/num_put/put/char/3.cc: New test wrap.
* testsuite/22_locale/num_put/put/char/5.cc: New test wrap.
* testsuite/22_locale/numpunct/members/char/1.cc: New test wrap.
* testsuite/22_locale/numpunct/members/char/2.cc: New test wrap.
* testsuite/22_locale/numpunct_byname/1.cc: New test wrap.
* testsuite/22_locale/numpunct_byname/2.cc: New test wrap.
* testsuite/22_locale/time_get/date_order/char/1.cc: New test wrap.
* testsuite/22_locale/time_get/get_date/char/1.cc: New test wrap.
* testsuite/22_locale/time_get/get_date/char/2.cc: New test wrap.
* testsuite/22_locale/time_get/get_monthname/char/1.cc: New test wrap.
* testsuite/22_locale/time_get/get_monthname/char/2.cc: New test wrap.
* testsuite/22_locale/time_get/get_time/char/1.cc: New test wrap.
* testsuite/22_locale/time_get/get_time/char/2.cc: New test wrap.
* testsuite/22_locale/time_get/get_weekday/char/1.cc: New test wrap.
* testsuite/22_locale/time_get/get_weekday/char/2.cc: New test wrap.
* testsuite/22_locale/time_get/get_year/char/1.cc: New test wrap.
* testsuite/22_locale/time_put/put/char/1.cc: New test wrap.
* testsuite/22_locale/time_put/put/char/2.cc: New test wrap.
* testsuite/22_locale/time_put/put/char/3.cc: New test wrap.
* testsuite/22_locale/time_put/put/char/4.cc: New test wrap.
* testsuite/22_locale/time_put/put/char/5.cc: New test wrap.
* testsuite/22_locale/time_put/put/char/6.cc: New test wrap.
* testsuite/22_locale/time_put/put/char/7.cc: New test wrap.
* testsuite/22_locale/time_put/put/char/8.cc: New test wrap.
* testsuite/27_io/filebuf_virtuals.cc: New test wrap.
* testsuite/27_io/ios_members.cc: New test wrap.
* testsuite/27_io/ostream_inserter_arith.cc (test02): Make void.
New test wrap.
* testsuite/27_io/streambuf_members.cc: New test wrap.
* testsuite/27_io/stringbuf_virtuals.cc: New test wrap.

From-SVN: r63975

65 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config/locale/generic/c_locale.cc
libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc
libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc
libstdc++-v3/testsuite/22_locale/collate_byname/1.cc
libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
libstdc++-v3/testsuite/22_locale/facet/2.cc
libstdc++-v3/testsuite/22_locale/locale/cons/4.cc
libstdc++-v3/testsuite/22_locale/locale/cons/5.cc
libstdc++-v3/testsuite/22_locale/locale/cons/7.cc
libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc
libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc
libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc
libstdc++-v3/testsuite/22_locale/messages_byname/1.cc
libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc
libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc
libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc
libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc
libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc
libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc
libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc
libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc
libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc
libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc
libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc
libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc
libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc
libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc
libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc
libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc
libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc
libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc
libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc
libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc
libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc
libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc
libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc
libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc
libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc
libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc
libstdc++-v3/testsuite/27_io/ios_members.cc
libstdc++-v3/testsuite/27_io/ostream_inserter_arith.cc
libstdc++-v3/testsuite/27_io/streambuf_members.cc
libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc
libstdc++-v3/testsuite/testsuite_hooks.cc
libstdc++-v3/testsuite/testsuite_hooks.h

index 1ada07bc7810d6e6468edc5a87fa853b0e1513f2..47d2f49e775b745f3707e14b2c719954b559e05e 100644 (file)
@@ -1,3 +1,76 @@
+2003-03-08  Loren J. Rittle  <ljrittle@acm.org>
+
+       * config/locale/generic/c_locale.cc (locale::facet::_S_create_c_locale):
+       Throw runtime exception when unsupported language is specified.
+       * testsuite/testsuite_hooks.h
+       (run_test_wrapped_generic_locale_exception_catcher): New function.
+       * testsuite/testsuite_hooks.cc (run_tests_wrapped_locale):
+       Suppress runtime exception thrown by generic implementation.
+       (run_tests_wrapped_env): Likewise.
+       (run_test_wrapped_generic_locale_exception_catcher): New function.
+       * testsuite/22_locale/collate/compare/char/1.cc: New test wrap.
+       * testsuite/22_locale/collate/compare/char/2.cc: New test wrap.
+       * testsuite/22_locale/collate/compare/char/3.cc: New test wrap.
+       * testsuite/22_locale/collate/hash/char/2.cc: New test wrap.
+       * testsuite/22_locale/collate/transform/char/2.cc: New test wrap.
+       * testsuite/22_locale/collate/transform/char/3.cc: New test wrap.
+       * testsuite/22_locale/collate_byname/1.cc: New test wrap.
+       * testsuite/22_locale/ctype/is/char/2.cc: New test wrap.
+       * testsuite/22_locale/facet/2.cc: New test wrap.
+       * testsuite/22_locale/locale/cons/4.cc: New test wrap.
+       * testsuite/22_locale/locale/cons/5.cc: New test wrap.
+       * testsuite/22_locale/locale/cons/7.cc: New test wrap.
+       * testsuite/22_locale/messages/members/char/1.cc: New test wrap.
+       * testsuite/22_locale/messages/members/char/2.cc: New test wrap.
+       * testsuite/22_locale/messages/members/char/3.cc: New test wrap.
+       * testsuite/22_locale/messages_byname/1.cc: New test wrap.
+       * testsuite/22_locale/money_get/get/char/1.cc: New test wrap.
+       * testsuite/22_locale/money_get/get/char/2.cc: New test wrap.
+       * testsuite/22_locale/money_get/get/char/3.cc: New test wrap.
+       * testsuite/22_locale/money_get/get/char/4.cc: New test wrap.
+       * testsuite/22_locale/money_put/put/char/1.cc: New test wrap.
+       * testsuite/22_locale/money_put/put/char/2.cc: New test wrap.
+       * testsuite/22_locale/money_put/put/char/3.cc: New test wrap.
+       * testsuite/22_locale/moneypunct/members/char/2.cc: New test wrap.
+       * testsuite/22_locale/moneypunct_byname/1.cc: New test wrap.
+       * testsuite/22_locale/num_get/get/char/1.cc: New test wrap.
+       * testsuite/22_locale/num_get/get/char/2.cc: New test wrap.
+       * testsuite/22_locale/num_get/get/char/3.cc: New test wrap.
+       * testsuite/22_locale/num_get/get/char/5.cc: New test wrap.
+       * testsuite/22_locale/num_get/get/char/6.cc: New test wrap.
+       * testsuite/22_locale/num_put/put/char/1.cc: New test wrap.
+       * testsuite/22_locale/num_put/put/char/2.cc: New test wrap.
+       * testsuite/22_locale/num_put/put/char/3.cc: New test wrap.
+       * testsuite/22_locale/num_put/put/char/5.cc: New test wrap.
+       * testsuite/22_locale/numpunct/members/char/1.cc: New test wrap.
+       * testsuite/22_locale/numpunct/members/char/2.cc: New test wrap.
+       * testsuite/22_locale/numpunct_byname/1.cc: New test wrap.
+       * testsuite/22_locale/numpunct_byname/2.cc: New test wrap.
+       * testsuite/22_locale/time_get/date_order/char/1.cc: New test wrap.
+       * testsuite/22_locale/time_get/get_date/char/1.cc: New test wrap.
+       * testsuite/22_locale/time_get/get_date/char/2.cc: New test wrap.
+       * testsuite/22_locale/time_get/get_monthname/char/1.cc: New test wrap.
+       * testsuite/22_locale/time_get/get_monthname/char/2.cc: New test wrap.
+       * testsuite/22_locale/time_get/get_time/char/1.cc: New test wrap.
+       * testsuite/22_locale/time_get/get_time/char/2.cc: New test wrap.
+       * testsuite/22_locale/time_get/get_weekday/char/1.cc: New test wrap.
+       * testsuite/22_locale/time_get/get_weekday/char/2.cc: New test wrap.
+       * testsuite/22_locale/time_get/get_year/char/1.cc: New test wrap.
+       * testsuite/22_locale/time_put/put/char/1.cc: New test wrap.
+       * testsuite/22_locale/time_put/put/char/2.cc: New test wrap.
+       * testsuite/22_locale/time_put/put/char/3.cc: New test wrap.
+       * testsuite/22_locale/time_put/put/char/4.cc: New test wrap.
+       * testsuite/22_locale/time_put/put/char/5.cc: New test wrap.
+       * testsuite/22_locale/time_put/put/char/6.cc: New test wrap.
+       * testsuite/22_locale/time_put/put/char/7.cc: New test wrap.
+       * testsuite/22_locale/time_put/put/char/8.cc: New test wrap.
+       * testsuite/27_io/filebuf_virtuals.cc: New test wrap.
+       * testsuite/27_io/ios_members.cc: New test wrap.
+       * testsuite/27_io/ostream_inserter_arith.cc (test02): Make void.
+       New test wrap.
+       * testsuite/27_io/streambuf_members.cc: New test wrap.
+       * testsuite/27_io/stringbuf_virtuals.cc: New test wrap.
+
 2003-03-08  Paolo Carlini <pcarlini@unitus.it>
             Petur Runolfsson  <peturr02@ru.is>
 
index 23f79121ccacef8acbb9d4781dcb1f75e6b5d4e5..13bc21aa046b82d6327e21bb0dd9fa0921808050 100644 (file)
@@ -212,9 +212,13 @@ namespace std
     }
 
   void
-  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char*, 
+  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s
                                    __c_locale)
-  { __cloc = NULL; }
+  {
+    __cloc = NULL;
+    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");
+  }
 
   void
   locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
index 74871082be3fc10c90e4c805f19e9e4a907ad74b..bed2fb40991a82e81249184737827e42c1484fc7 100644 (file)
@@ -74,6 +74,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 52052f9aed0e66ed62bc7efe25b3fec8da23f9d4..ab29ac409e1c24f037bce0733783f3d9d9c922ae 100644 (file)
@@ -81,6 +81,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 0cce392824a924a1892f3d2a6bad3c6c4555c582..c8209548bc3a752aee2fa433117ea7c7dbbdf672 100644 (file)
@@ -85,6 +85,6 @@ void test03()
 
 int main()
 {
-  test03();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
   return 0;
 }
index 75eb202da2871daba08e7e842939905579ac28f9..47fcd579ec72c1c28e3c8b50c96ddec3656987e3 100644 (file)
@@ -70,6 +70,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index dc2b395bd660566a9fa11917a9a52b19eced640c..24ff7cdac8fb3ab99dca7b53afc4af2b61eaf34a 100644 (file)
@@ -67,6 +67,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index a6255afb6c36725500a502ad441f12d66005b0f9..f9d16b54944e05495a45bd12031feffef2193b6b 100644 (file)
@@ -88,6 +88,6 @@ void test03()
 
 int main()
 {
-  test03();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
   return 0;
 }
index 629866287907cea8f6e3a9380eee4920d144aba4..edfb42c2120daeba0958152d98e8738d08e2b4fe 100644 (file)
@@ -131,6 +131,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 6e54ab8912706a73700e1362ab378641a446b0ce..d04800a01ca0dbbfa3f6515de409c3a17a4f8abc 100644 (file)
@@ -99,6 +99,6 @@ void test02()
 
 int main() 
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index abda43ec3515d269e26ea88a1e9b686434c20bf7..ea63d731a3f1eb0c123eff2294d7c1bb812c16be 100644 (file)
@@ -89,6 +89,6 @@ void test02()
 
 int main ()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 26d3aaf31d100ece776b301be8184f39af0d4d7c..4864b0bad7d56dbfc56e178c13757f07527c34fa 100644 (file)
@@ -42,6 +42,6 @@ void test03()
 
 int main()
 {
-  test03();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
   return 0;
 }
index b9e1391977ddf148f34ac08318a573f5a1dc9a3b..5c649d0b5b9dc2c50211d869f0f8837b6ac0df7e 100644 (file)
@@ -193,6 +193,6 @@ void test04()
 
 int main()
 {
-  test04();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test04);
   return 0;
 }
index 75598e2a6c370f90afe9bacaf91f36561a89a2a5..fb709666d483ad9df825381e2db3c377d5890179 100644 (file)
@@ -99,6 +99,6 @@ test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 05116d934d5e913d6372b8f6901838be8c6b3364..7167fadef108ab18d576bde60c3076790337160f 100644 (file)
@@ -64,6 +64,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 3234ef6f4ce7ad0bf354aee85b35c98ba572d812..61ffba626c1500dd214e150d779e3f7cbb31d095 100644 (file)
@@ -64,6 +64,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index d8346b291568464270e734d243d38b1d6758fa8f..55cf80193d6d983698ea445dfd120353f07bb087 100644 (file)
@@ -64,6 +64,6 @@ void test03()
 
 int main()
 {
-  test03();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
   return 0;
 }
index 1c6fc5b99b239135060bfad3f3a4e3ae83e5eb34..e9d3217c08f2616528e4bcffe7e79bda677f2ff9 100644 (file)
@@ -73,6 +73,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 7bbfc88a95219a5c08e8c2bc89666ec85f99d30f..f4e5481def6e8cf7c05dec1973b836fad0428173 100644 (file)
@@ -146,6 +146,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 0ca281fe5fb37dfdaf1947fd57ef67b7af8e802a..42e149609a0c7efbc8850c895fb1aaeaa381dec5 100644 (file)
@@ -135,6 +135,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index eb8ef9c1c578f976604cb1a0b89a4b8eae20c5fa..749c68c73ab99706bab87143747ec0e0eefc6ce1 100644 (file)
@@ -91,6 +91,6 @@ void test03()
 
 int main()
 {
-  test03();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
   return 0;
 }
index 3a6aa18039c76d342abe610893a5f5daf1e319e5..b2456658e56ffb2b5fc96e50d889791a8dcbd1b6 100644 (file)
@@ -86,6 +86,6 @@ void test04()
 
 int main()
 {
-  test04();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test04);
   return 0;
 }
index cbc7889512986446eda1df6368cf73cfea042ff2..d34d3fba0e776d5067d347ce36dc65ee53d9ea69 100644 (file)
@@ -124,6 +124,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 72428445d221b347c9e9d352379e7356380f5dfb..d1c240f780972a7c887a51c893c5d66ad0a4a9bd 100644 (file)
@@ -115,6 +115,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 58e3ff4709930aebfa62c661b622522f01bb93db..73c84b2c4d50bb9b07955093df416438048f6d40 100644 (file)
@@ -104,6 +104,6 @@ void test03()
 
 int main()
 {
-  test03();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
   return 0;
 }
index 5434ea81575abdf20f819161e4b7e2da21b634a2..7d74101c95d181b31a84873eeb04c2a8ac6f8a61 100644 (file)
@@ -95,6 +95,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 01c761b5669ad7aac64d40be5268de0541f051be..83fc8f62b318c56b89822128c3174e759dc53623 100644 (file)
@@ -93,7 +93,7 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
 
   return 0;
 }
index 7cc897c36f574df1ecc4c9afd193021378579084..3723e23ffd4211567fbb23f6142007e864e54e3a 100644 (file)
@@ -162,7 +162,7 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
 
index 4604d11ca9136ec521e5c8ab28f1891cf8bcede1..108fae13c1b58014e73e248ba45720ed291e9f54 100644 (file)
@@ -132,7 +132,7 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
 
index 253e73561eb157ec1ff62bbc659bb7933c771a53..b6c0f12ca1aae6f770da3daecc8340cd2c11e129 100644 (file)
@@ -94,7 +94,7 @@ void test03()
 
 int main()
 {
-  test03();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
   return 0;
 }
 
index 21f7bef00124737f678069bced7e6724af9df03c..94da704f1d39e45bbf08ca2b06d26bbd27b050af 100644 (file)
@@ -84,7 +84,7 @@ void test05()
 
 int main()
 {
-  test05();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test05);
   return 0;
 }
 
index 49f3a46e5c8386be47d75d53e379d2e298471fba..b5e0a21615b8b5b8d4881ac250ead4b1b6dc57f6 100644 (file)
@@ -49,7 +49,7 @@ void test06()
 
 int main()
 {
-  test06();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test06);
   return 0;
 }
 
index d73ceb733f4e666d8597092afd99312466d6f46a..87abef44e9a2907ee5eeb3062f6293f2ee5c4551 100644 (file)
@@ -169,7 +169,7 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
 
index dab92047cf9adab7ca9a51d80251e2902cd254db..a62dfc1f88b6c96d161464549600c56d7f880b4b 100644 (file)
@@ -105,7 +105,7 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
 
index 201403a0e5490f0dad5e2286e222d8b95d746d17..0bc92b2af0e1a77b3a496931a245f1f1e1e9f305 100644 (file)
@@ -88,7 +88,7 @@ void test03()
 
 int main()
 {
-  test03();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
   return 0;
 }
 
index 0af3d3cf611e318193a66cff918fa09ce527c842..eb0bd219622187b59fc5188b3d3003504de910bb 100644 (file)
@@ -63,7 +63,7 @@ void test05()
 
 int main()
 {
-  test05();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test05);
   return 0;
 }
 
index 9babb9946cba262eab30c9e32dd309b948200fb1..aba34e29267ffdae04891b5d2d4f80dd89a40ed6 100644 (file)
@@ -60,6 +60,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index bb4eff5f70a8f41d2586bcee6f4014982b582afd..ec9512fedbe57e3abccd18db92b52ae0f809e2cc 100644 (file)
@@ -82,6 +82,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 4c99ddaad70e13682987fd813d55153c087eb03f..a6c71dc644ec60eaa2e437f45d0e03e74ea6dd6c 100644 (file)
@@ -71,6 +71,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 133607dd5b931562ab66eadef2763bc7edf20066..f096a8b9f0cdf560d0a8d66b9a5549815eb5802c 100644 (file)
@@ -40,6 +40,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 5b3a3236eeff79f8d5897c1ac8af05f2017009a1..46958a21da39b561d0949ae05ed900436532d2d3 100644 (file)
@@ -64,6 +64,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 659086ab26f8e8dbb009f159b212e368cf876e53..f242c4bee4a32dff41ff81222b0d6c50d420bdc1 100644 (file)
@@ -107,6 +107,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 434695c703ac5314bc5a556d0835d503a041e7be..274a231cd6e4c05a7f2677475cbe25a9a7a89634 100644 (file)
@@ -103,6 +103,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 8984069e59a0adc03335af7bddf1a38e82c117a7..2fd9b760005211e466c4a8e08b51019dcc0725f3 100644 (file)
@@ -121,6 +121,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 66ad029c1a51e37c3e93fcbeaf6e671da10aca87..c98f8d1cb50359171d36adc435c944643c9cfd6e 100644 (file)
@@ -85,6 +85,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index ef9c2bbbeb9e9a9f4f2d833212f3d207d7a70453..80d996c0c47caa7b94820a5b06d10d87c84f0887 100644 (file)
@@ -122,6 +122,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 9adb288ed74d39b4ba7df9c7f3ac2e649354ceeb..1d56827071cfba8d279eab9f9e21ff9674c57a9c 100644 (file)
@@ -75,6 +75,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 4fad9019abf0bfcf7d5d90bbd32c0ade97b48832..ca89d1e4a2b72d9d326027c5d548d1860c6c7377 100644 (file)
@@ -129,6 +129,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index 5f6e1490d42c12af17e71bfa27a376bd06573d2c..6e9d99936ef34e23a17b7c5f5c43b802bcbec721 100644 (file)
@@ -85,6 +85,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 62f393b3c1f333e1f08f5ba906ba844449a245ea..aabfd6d0f252c2e51e7d540de92ac5a563d416fd 100644 (file)
@@ -118,6 +118,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index e384319299ac1d4ed2a3373929f74eabee87a5e9..f54a8c9182909db9a4a15f7345bb25b111c80b44 100644 (file)
@@ -85,6 +85,6 @@ void test01()
 
 int main()
 {
-  test01();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
   return 0;
 }
index e3a88b55ece2ab9043b721eddbf76f5461b87ed9..665036b1c6ee0608783910800e3f9558596644e2 100644 (file)
@@ -80,6 +80,6 @@ void test02()
 
 int main()
 {
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   return 0;
 }
index 8354897e6c96087ea1bc52d3de568d43425c53ce..3399669df85d9fcf9a8beaed20e195f321c543ea 100644 (file)
@@ -80,6 +80,6 @@ void test03()
 
 int main()
 {
-  test03();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
   return 0;
 }
index ef59dc2679ddda30cdc8912f449aa713cd08949e..afb45eecacc62b6b87ec0cd5bbdc2bffe5d4fd47 100644 (file)
@@ -79,6 +79,6 @@ void test04()
 
 int main()
 {
-  test04();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test04);
   return 0;
 }
index dde913f58bffe60a46d75b2f6486c7ec1a0c8321..b7b0055c29d2eb9709fc4fc8c993e31cbb12eafb 100644 (file)
@@ -75,6 +75,6 @@ void test05()
 
 int main()
 {
-  test05();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test05);
   return 0;
 }
index 1cec95f0bab7f42511c3d19f49e542a51ec1b691..9287571901c4072a78b070a5deb5084ee2a061f7 100644 (file)
@@ -73,6 +73,6 @@ void test06()
 
 int main()
 {
-  test06();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test06);
   return 0;
 }
index 931c6e060a8012b53d55d7a3c3640568e940a4c4..00cefcfe7b9c95778c4fa0f4b10de3b8e76525f9 100644 (file)
@@ -74,6 +74,6 @@ void test07()
 
 int main()
 {
-  test07();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test07);
   return 0;
 }
index 4d801f38b7230b5acf2b3cf104f6b115cd1c1396..10afde5c5005832fcd841b29f08599649bf8a008 100644 (file)
@@ -72,6 +72,6 @@ void test08()
 
 int main()
 {
-  test08();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test08);
   return 0;
 }
index fd459636049672aecb8a063857c8a0d45b27f6b1..c60433cebf05386be1e4ff915381fb53153c0e35 100644 (file)
@@ -769,7 +769,7 @@ main()
   test05();
   test06();
 
-  test07();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test07);
   test08();
   test09();
   test10();
index 4c3598016789f4e10b67a1ee69e539fd6e1d7b42..3b7dc24c454b65f4ca0a8632df6d26bc6c4caf14 100644 (file)
@@ -168,6 +168,6 @@ int main()
 {
   test01();
   test02();
-  test03();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
   return 0;
 }
index e4e618d68d86b84bc49966f4f3adb76d11092367..6f9719f306da627d02ff65c6134e46323e1576f1 100644 (file)
@@ -253,7 +253,7 @@ test01()
   return 0;
 }
 
-int
+void
 test02()
 {
   bool test = true;
@@ -297,7 +297,7 @@ test02()
   os2 << endl;
   os2 << fixed << setprecision(1) << val2 << endl;
 
-  return 0;
+  return;
 }
 
 template<typename T>
@@ -395,7 +395,7 @@ int
 main()
 {
   test01();
-  test02();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
   test03();
   test04();
   test05();
index d7ae5693d33488d4ff676601beae4b88fbe0381e..263a95f06fb74be9e039c4653b9178de74334772 100644 (file)
@@ -526,7 +526,7 @@ int main()
   test05();
 
   test07();
-  test08();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test08);
 
   test09();
   test10();
index a2a8368abfc6798f1d62defdeead6375807a87f9..c172f32b9f5375424f383a6891fac2e860071c74 100644 (file)
@@ -160,7 +160,7 @@ int main()
   test02(in2, false);
   test02(in3, false);
 
-  test08();
+  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test08);
   test09();
   return 0;
 }
index 3527779bc764d4bef7ea8634b17ffd25278bac29..0bc67ad23b45750b9a45b3f085880e0af4bfa800 100644 (file)
@@ -148,9 +148,19 @@ namespace __gnu_cxx_test
     bool test = true;
     
     // Set the global locale. 
-    locale loc_name(name);
-    locale orig = locale::global(loc_name);
-    
+    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
+         throw;
+      }
+
     const char* res = setlocale(LC_ALL, name);
     if (res != NULL)
       {
@@ -173,9 +183,18 @@ namespace __gnu_cxx_test
     
 #ifdef _GLIBCPP_HAVE_SETENV 
     // Set the global locale. 
-    locale loc_name(name);
-    locale orig = locale::global(loc_name);
-
+    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
+         throw;
+      }
     // Set environment variable env to value in name. 
     const char* oldENV = getenv(env);
     if (!setenv(env, name, 1))
@@ -191,6 +210,22 @@ namespace __gnu_cxx_test
 #endif
   }
 
+  void 
+  run_test_wrapped_generic_locale_exception_catcher(const test_func f)
+  {
+    try
+      {
+       f();
+      }
+    catch (std::runtime_error& ex)
+      {
+       if (std::strstr (ex.what(), "unhandled name in generic implementation"))
+         return;
+       else
+         throw;
+      }
+  }
+
   counter::size_type  counter::count = 0;
   unsigned int copy_constructor::count_ = 0;
   unsigned int copy_constructor::throw_on_ = 0;
index d13e86c75186e8693abc24d757202c83184e11fa..28ff245c482d3413e1436abfa97a397527403a6a 100644 (file)
@@ -105,6 +105,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);
 
   // Test data types.
   struct pod_char