[multiple changes]

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.

From-SVN: r65622
This commit is contained in:
Benjamin Kosnik 2003-04-15 06:36:31 +00:00
parent 4ea34005e6
commit 3d838e28dd
144 changed files with 643 additions and 471 deletions

View File

@ -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.

View File

@ -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");
}

View File

@ -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;
}

View File

@ -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*)

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 );

View File

@ -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 );

View File

@ -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

View File

@ -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;
}

View File

@ -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 );

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 );

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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";

View File

@ -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;

View File

@ -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";

View File

@ -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;
}

View File

@ -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");

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 );
}

View File

@ -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;
}

View File

@ -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.

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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());

View File

@ -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());

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 );

View File

@ -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 );

View File

@ -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;
}

Some files were not shown because too many files have changed in this diff Show More