diff options
author | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-22 21:39:00 +0000 |
---|---|---|
committer | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-22 21:39:00 +0000 |
commit | 2e9c0dc38e2692b04281844366dbb367ae1294e1 (patch) | |
tree | e56f44693864144d87710daeab9743d4e76b6037 /libstdc++-v3/testsuite | |
parent | 780b7d9b87ddf306aa31c750d5eb9d96a9cb69ea (diff) |
This commit was manufactured by cvs2svn to create tagobjc-improvements-candidate-20030922
'objc-improvements-candidate-20030922'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/objc-improvements-candidate-20030922@71666 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite')
557 files changed, 3056 insertions, 4532 deletions
diff --git a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc b/libstdc++-v3/testsuite/17_intro/header_ciso646.cc index 8513b0864ef..35b1ceef32d 100644 --- a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc +++ b/libstdc++-v3/testsuite/17_intro/header_ciso646.cc @@ -1,6 +1,6 @@ // 1999-05-20 bkoz -// Copyright (C) 1999 Free Software Foundation, Inc. +// Copyright (C) 1999, 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 @@ -86,10 +86,6 @@ bool test01() #endif -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } @@ -110,10 +106,6 @@ bool test02() VERIFY( (arg1 && arg2) == (arg1 and arg2) ); VERIFY( (arg1 && int1) == (arg1 and int1) ); -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits.cc b/libstdc++-v3/testsuite/18_support/numeric_limits.cc index 1643625cb3e..63d9412c368 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits.cc @@ -2,7 +2,7 @@ // 1999-08-23 bkoz -// Copyright (C) 1999, 2001, 2002 Free Software Foundation +// Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation // // 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 @@ -233,11 +233,6 @@ bool test01() VERIFY( !obj.traps ); VERIFY( !obj.tinyness_before ); VERIFY( obj.round_style == std::round_toward_zero ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } @@ -281,11 +276,6 @@ bool test03() VERIFY( std::numeric_limits<signed long long>::digits10 == 18 ); VERIFY( std::numeric_limits<unsigned long long>::digits10 == 19 ); } - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } @@ -302,11 +292,6 @@ bool test04() VERIFY( !std::numeric_limits<unsigned long>::is_iec559 ); VERIFY( !std::numeric_limits<long long>::is_iec559 ); VERIFY( !std::numeric_limits<unsigned long long>::is_iec559 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc index a7fc70e7a04..496a6e54309 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc @@ -150,10 +150,6 @@ bool test01(void) str05.append(str05.begin(), str05.begin() + str05.find('r')); VERIFY( str05 == "point bolivar, texaspoint boliva" ); VERIFY( str05 != str01 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc index d69d9b6bdfa..f6002f9af5d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc @@ -150,10 +150,6 @@ bool test01(void) str05.append(str05.begin(), str05.begin() + str05.find(L'r')); VERIFY( str05 == L"point bolivar, texaspoint boliva" ); VERIFY( str05 != str01 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/compare/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/compare/char/1.cc index 02b6b79037b..096f4f3957d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/compare/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/compare/char/1.cc @@ -59,11 +59,7 @@ test_value(int result, want_value expected) default: pass = false; //should not get here } - -#ifdef DEBUG_ASSERT - assert(pass); -#endif - + VERIFY(pass); return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/compare/wchar_t/1.cc index 25f8abdab97..5d6151900b2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/compare/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/compare/wchar_t/1.cc @@ -60,10 +60,7 @@ test_value(int result, want_value expected) pass = false; //should not get here } -#ifdef DEBUG_ASSERT - assert(pass); -#endif - + VERIFY(pass); return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc index 3c92910f312..8f673c89dbf 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc @@ -155,7 +155,7 @@ void test01(void) int main() { - __gnu_cxx_test::set_memory_limits(); + __gnu_test::set_memory_limits(); test01(); return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc index eeb3516d236..b1a5b6dd40a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc @@ -155,7 +155,7 @@ void test01(void) int main() { - __gnu_cxx_test::set_memory_limits(); + __gnu_test::set_memory_limits(); test01(); return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc index 069aa278680..f594df72847 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc @@ -80,10 +80,6 @@ bool test01(void) catch(...) { VERIFY( false ); } - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc index fbfa0136b67..d2b5831ad6b 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc @@ -102,9 +102,6 @@ bool test01(void) VERIFY( str03[0] == 'x' ); // need to also test for const begin/const end -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc index 426d0e39638..1c7ee5bbdf7 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc @@ -76,10 +76,6 @@ bool test02(void) std::string str13 = str12; *p2 = 'e'; VERIFY( str12 != str13 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc index 00394cf36c8..3c39bc555cc 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc @@ -80,10 +80,6 @@ bool test01(void) catch(...) { VERIFY( false ); } - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc index 37aec1c93ce..e2455e635e7 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc @@ -102,9 +102,7 @@ bool test01(void) VERIFY( str03[0] == L'x' ); // need to also test for const begin/const end -#ifdef DEBUG_ASSERT - assert(test); -#endif + VERIFY(test); return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc index b7710382ca8..0ef50cc8fb7 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc @@ -76,10 +76,6 @@ bool test02(void) std::wstring str13 = str12; *p2 = L'e'; VERIFY( str12 != str13 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc index 561053cf666..0f2236cbe1a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc @@ -84,10 +84,6 @@ bool test01(void) VERIFY( csz01 == csz02 ); csz01 = str01.find('/'); VERIFY( csz01 == npos ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc index abc35e27f1e..9c3e2f079a8 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc @@ -83,10 +83,6 @@ bool test02(void) csz01 = str01.find_first_of('z'); csz02 = str01.size() - 1; VERIFY( csz01 == csz02 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc index 02647cf6310..15d0ee2ef52 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc @@ -83,10 +83,6 @@ bool test03(void) VERIFY( csz01 == 0 ); csz01 = str04.find_first_not_of('S'); VERIFY( csz01 == npos ); - -#ifdef DEBUG_ASSERT - VERIFY(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc index ecf3182d66f..6ed224b3b31 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc @@ -84,10 +84,6 @@ bool test01(void) VERIFY( csz01 == csz02 ); csz01 = str01.find(L'/'); VERIFY( csz01 == npos ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc index 8ae592d4eb3..4635dac1267 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc @@ -83,10 +83,6 @@ bool test02(void) csz01 = str01.find_first_of(L'z'); csz02 = str01.size() - 1; VERIFY( csz01 == csz02 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc index 5d119ece9c2..c874229d853 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc @@ -83,10 +83,6 @@ bool test03(void) VERIFY( csz01 == 0 ); csz01 = str04.find_first_not_of(L'S'); VERIFY( csz01 == npos ); - -#ifdef DEBUG_ASSERT - VERIFY(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc index a6052e2170b..919c8717b0a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc @@ -180,16 +180,12 @@ int test01(void) csz01 = str03.size(); str03.insert(str03.end(), str01.begin(), str01.end()); VERIFY( str03 == "baker beach, san franciscorodeo beach, marin" ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } int main() { - __gnu_cxx_test::set_memory_limits(); + __gnu_test::set_memory_limits(); test01(); return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc index 80b0cee58b7..d39bbe2d091 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc @@ -73,10 +73,6 @@ int test02(void) str01.insert(0, str01.c_str()); VERIFY( str01 == "Everything was beautiful, and nothing hurt" "Everything was beautiful, and nothing hurt"); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc index 96f71b0839e..f439df907d9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc @@ -180,16 +180,12 @@ int test01(void) csz01 = str03.size(); str03.insert(str03.end(), str01.begin(), str01.end()); VERIFY( str03 == L"baker beach, san franciscorodeo beach, marin" ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } int main() { - __gnu_cxx_test::set_memory_limits(); + __gnu_test::set_memory_limits(); test01(); return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc index 04cc454e14b..8b1468b3338 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc @@ -73,10 +73,6 @@ int test02(void) str01.insert(0, str01.c_str()); VERIFY( str01 == L"Everything was beautiful, and nothing hurt" L"Everything was beautiful, and nothing hurt"); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc index 4b862322653..ba92251c6ad 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc @@ -157,10 +157,6 @@ bool test01(void) std::string hello_world; std::cout << hello_world; - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc index 55eecc19a28..b53ca2764d2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc @@ -54,10 +54,6 @@ void test04(int size) VERIFY( oss.good() ); std::string str_tmp = oss.str(); VERIFY( str_tmp.size() == expected_size ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc index 8e24f5b55b7..416a1df4421 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc @@ -75,10 +75,6 @@ void test05(int size) } VERIFY( count == 2 * size ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc index 5d426259752..195ef9dc2ff 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc @@ -52,10 +52,6 @@ void test06(void) size_type i06 = str02.capacity(); VERIFY( i05 == i03 ); VERIFY( i06 <= i04 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc index 7e6116ec148..07e3ce63cac 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc @@ -44,10 +44,6 @@ void test07(void) VERIFY( i < 3 ); VERIFY( static_cast<bool>(iss.rdstate() & std::ios_base::failbit) ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc index 5297958c453..46718003d77 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc @@ -157,10 +157,6 @@ bool test01(void) std::wstring hello_world; std::wcout << hello_world; - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc index f47d8da43aa..fd844438184 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc @@ -54,10 +54,6 @@ void test04(int size) VERIFY( oss.good() ); std::wstring str_tmp = oss.str(); VERIFY( str_tmp.size() == expected_size ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc index e9a701e8c52..6d5c69cc1a3 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc @@ -75,10 +75,6 @@ void test05(int size) } VERIFY( count == 2 * size ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc index aedcdb26391..1fa1fb07ca3 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc @@ -52,10 +52,6 @@ void test06(void) size_type i06 = str02.capacity(); VERIFY( i05 == i03 ); VERIFY( i06 <= i04 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc index 4028924674b..0a3775c0bc6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc @@ -44,10 +44,6 @@ void test07(void) VERIFY( i < 3 ); VERIFY( static_cast<bool>(iss.rdstate() & std::ios_base::failbit) ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc index da8b30638ff..dec24cff731 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc @@ -41,12 +41,6 @@ int test01(void) // printf("2:%s\n", str1.c_str()); //str1 is gone const char* p2 = str1.c_str(); return 0; - -#ifdef DEBUG_ASSERT - assert(test); -#endif - - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc index c41ac68ffe2..bc3351d02fb 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc @@ -285,11 +285,6 @@ template<class charT, class traits, class Allocator> str_4 = 'o' + str_4; str_4 = 'c' + str_4; VERIFY( str_4 == str_3 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc index cd8f18bf663..1dec0cb6895 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc @@ -41,12 +41,6 @@ int test01(void) // wprintf("2:%s\n", str1.c_str()); //str1 is gone const wchar_t* p2 = str1.c_str(); return 0; - -#ifdef DEBUG_ASSERT - assert(test); -#endif - - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc index 11e63f70e93..d92450d23ba 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc @@ -285,11 +285,6 @@ template<class charT, class traits, class Allocator> str_4 = L'o' + str_4; str_4 = L'c' + str_4; VERIFY( str_4 == str_3 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc index 7145d4c7840..d4c632b7a42 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc @@ -73,10 +73,6 @@ bool test01(void) std::find(x.rbegin(), x.rend(), 'l').base(), ar, ar + sizeof(ar) / sizeof(ar[0])); VERIFY( x == "jeHelloo" ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc index fd0967a86fe..19ee154025f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc @@ -73,10 +73,6 @@ bool test01(void) std::find(x.rbegin(), x.rend(), L'l').base(), ar, ar + sizeof(ar) / sizeof(ar[0])); VERIFY( x == L"jeHelloo" ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc index 5b9a4181b91..ddc791b6c4a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc @@ -83,10 +83,6 @@ bool test01(void) VERIFY( csz01 == csz02 ); csz01 = str01.rfind('/'); VERIFY( csz01 == npos ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc index 30e40a98658..d186199a138 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc @@ -41,10 +41,6 @@ bool test02() VERIFY( pos == 1 ); pos = z.find_last_of('X'); VERIFY( pos == std::string::npos ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc index aeb132b6a58..3517d4da169 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc @@ -56,10 +56,6 @@ bool test03() VERIFY( pos == 0 ); pos = z.find_last_not_of("Xa"); VERIFY( pos == 1 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc index 9681bf4c8e4..bfb1f914c21 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc @@ -83,10 +83,6 @@ bool test01(void) VERIFY( csz01 == csz02 ); csz01 = str01.rfind(L'/'); VERIFY( csz01 == npos ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc index 587b19b4a79..2f813b9b28b 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc @@ -41,10 +41,6 @@ bool test02() VERIFY( pos == 1 ); pos = z.find_last_of(L'X'); VERIFY( pos == std::wstring::npos ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc index 1bfd1eb757b..a94da0d3e85 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc @@ -56,10 +56,6 @@ bool test03() VERIFY( pos == 0 ); pos = z.find_last_not_of(L"Xa"); VERIFY( pos == 1 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc index be2a379c581..486892a62e0 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc @@ -66,10 +66,6 @@ bool test01(void) catch(...) { VERIFY( false ); } - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc index 843ebb6861a..1a4e4f63936 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc @@ -66,10 +66,6 @@ bool test01(void) catch(...) { VERIFY( false ); } - -#ifdef DEBUG_ASSERT - assert(test); -#endif return test; } diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc index d7e72d67f3a..1a933f8fd3b 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc @@ -33,7 +33,7 @@ void test02() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc index ad45e621434..9e98f53f88b 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc @@ -33,7 +33,7 @@ void test03() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc index fe72e341a53..0929676270f 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc @@ -33,7 +33,7 @@ void test04() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc index c3eca4aeaa5..c103b2e41c5 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc @@ -33,7 +33,7 @@ void test02() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; bool test = true; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc index 8297c260d69..9cc921c7bce 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc @@ -33,7 +33,7 @@ void test03() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; bool test = true; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc index 2ffc351c873..68972e7ab32 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc @@ -33,7 +33,7 @@ void test04() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; bool test = true; - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc index a7a622f16a1..51739b6ae3b 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc @@ -88,7 +88,7 @@ void test02() wmemset(i_ref, 0xdeadbeef, size + 1); int_type* ito_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc index 1279d3be1a3..118462d618b 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc @@ -102,7 +102,7 @@ void test03() wmemset(i_ref, 0xdeadbeef, size + 1); int_type* ito_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc index a4ef7fe01c2..c08ee55efea 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc @@ -110,7 +110,7 @@ void test04() wmemset(i_ref, 0xdeadbeef, esize + 1); int_type* ito_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc index 799414bbbe5..7d14ab4cfb5 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc @@ -60,7 +60,7 @@ void test07() wmemset(i_ref, 0xdeadbeef, size + 1); int_type* ito_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc index 27a59c6aa53..296f2eb3171 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc @@ -109,7 +109,7 @@ void test08() wmemset(i_ref, 0xdeadbeef, esize + 1); int_type* ito_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc index f95a43626ef..7ba367b1327 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc @@ -111,7 +111,7 @@ void test09() int_type* ito = i_arr; int_type* ito_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc index 029e30f8fef..6f92b6ce093 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc @@ -61,7 +61,7 @@ void test02() "\xff"; int size = strlen(e_lit); - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc index 41555def81e..8aec29d580b 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc @@ -61,7 +61,7 @@ void test03() "\xff"; int size = strlen(e_lit); - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc index f49e47dad87..0b7b87c2643 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc @@ -100,7 +100,7 @@ void test04() int esize = strlen(e_lit); int isize = wcslen(i_lit); - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc index 485bfe0278c..7d8ff4a1d80 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc @@ -52,7 +52,7 @@ void test07() const ext_type* efrom_next; int size = strlen(e_lit); - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc index efa390b42d8..c99c823fbe2 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc @@ -31,7 +31,7 @@ void test02() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc index 50877849d2d..27f67a4f117 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc @@ -31,7 +31,7 @@ void test03() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc index 2e2a62e6e32..8ab6828ddb5 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc @@ -31,7 +31,7 @@ void test04() bool test = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc index bb172dbe351..ff413d5ac8a 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc @@ -86,7 +86,7 @@ void test02() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc index 8d396f87863..b1fa9fa4f22 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc @@ -100,7 +100,7 @@ void test03() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc index 1a28aa74cd3..4fd193e3055 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc @@ -107,7 +107,7 @@ void test04() memset(e_ref, 0xf0, esize + 1); ext_type* eto_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc index 7b5c120b7f2..3c069c8bb84 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc @@ -58,7 +58,7 @@ void test03() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc index 5bd81df7a36..a6d107cacb6 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc @@ -71,7 +71,7 @@ void test02() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc index 167e12375a8..7ca700764c3 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc @@ -85,7 +85,7 @@ void test03() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc index 631b87399bb..234a4b63f46 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc @@ -80,7 +80,7 @@ void test04() memset(e_ref, 0xf0, size + 1); ext_type* eto_next; - locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8"); + locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); const w_codecvt* cvt = &use_facet<w_codecvt>(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc index fd4c90dadff..42469aea514 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_us = __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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc index 892bac54534..b6f944949a3 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us = __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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc index e604b202b6f..6712832294c 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc @@ -33,7 +33,7 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); // cache the collate facets diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc index 4f1d5e3f6a9..19e4210ff2c 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc index 8d7871815db..292b8c738e4 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc index b74157b84e3..c1825e2bbf2 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_us = __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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc index 56a4083f6ee..8d813abde3d 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc @@ -37,9 +37,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - 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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc index 824f8e1dfa6..c4b87bad068 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc @@ -33,7 +33,7 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); // cache the collate facets diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc index 1a36ca2d744..50c697d0f14 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc index 0a5f060e621..8dc885ac533 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc index 5e8336885b5..6ef1bedbb08 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us = __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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc index 4f1d5e3f6a9..19e4210ff2c 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc index 8d7871815db..292b8c738e4 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc index 44c0eb77eb3..2347e0469b2 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc @@ -36,9 +36,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - 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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc index 1a36ca2d744..50c697d0f14 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc index 0a5f060e621..8dc885ac533 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc index 4a38327d5eb..679a4b0c8fd 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc @@ -32,9 +32,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us = __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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc index 21b90ff0e15..c82d97cfa85 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc @@ -32,7 +32,7 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); // cache the collate facets diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc index 9f9d1aade91..ca0da1c2f2a 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test02); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc index 2ef10fd5765..1231025372b 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test02); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc index b0a68cf2c6e..4943ba0b7d5 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc @@ -36,9 +36,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - 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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc index 0a3f98113f9..583d747145a 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc @@ -32,7 +32,7 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); // cache the collate facets diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc index fb4923958c8..fe7ed8dbfac 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test02); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc index 11327b39582..fdbf3035a78 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test02); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc b/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc index eec1513af27..f650be796a0 100644 --- a/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc @@ -32,7 +32,7 @@ void test01() string str; locale loc_c = locale::classic(); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); str = loc_de.name(); locale loc_byname(locale::classic(), new collate_byname<char>("de_DE")); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc index 605e5f3dfdb..89be53dd3f0 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc @@ -67,7 +67,7 @@ void test02() } // "de_DE" - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); const ctype<char>& ctype_de = use_facet<ctype<char> >(loc_de); for (int i = 0; i < max; ++i) { diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc index 3f042d9ec42..294934099c1 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_locale.cc index 61086ad6da8..e54f823b8f9 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc index 7ff278c1f87..c9eb1e0b2a4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc @@ -67,7 +67,7 @@ void test02() } // "de_DE" - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); const ctype<wchar_t>& ctype_de = use_facet<ctype<wchar_t> >(loc_de); for (int i = 0; i < max; ++i) { diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc index 4f1d5e3f6a9..19e4210ff2c 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc index 8d7871815db..292b8c738e4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc index 4f1d5e3f6a9..19e4210ff2c 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc index 8d7871815db..292b8c738e4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc index 67d9b6ee153..ac3b436f590 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc @@ -38,7 +38,7 @@ void test03() using namespace std; bool test = true; - locale loc = __gnu_cxx_test::try_named_locale("se_NO.UTF-8"); + locale loc = __gnu_test::try_named_locale("se_NO.UTF-8"); const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc); const wchar_t* wstrlit = L"\x80"; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc index 4f1d5e3f6a9..19e4210ff2c 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc index 8d7871815db..292b8c738e4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc index e1ab3f76bbe..6f9dec45d3c 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc @@ -38,7 +38,7 @@ void test02() using namespace std; bool test = true; - locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1"); + locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc); char c = 0xff; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc index 1d380d49fdb..d9b32b0a6cb 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc @@ -38,7 +38,7 @@ void test03() using namespace std; bool test = true; - locale loc = __gnu_cxx_test::try_named_locale("se_NO.UTF-8"); + locale loc = __gnu_test::try_named_locale("se_NO.UTF-8"); const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc); const char* strlit = "\xc2\x80"; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/facet/2.cc b/libstdc++-v3/testsuite/22_locale/facet/2.cc index 379ed8975f0..844eb7b3d24 100644 --- a/libstdc++-v3/testsuite/22_locale/facet/2.cc +++ b/libstdc++-v3/testsuite/22_locale/facet/2.cc @@ -83,7 +83,7 @@ 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 = __gnu_cxx_test::try_named_locale("es_MX"); + locale loc03 = __gnu_test::try_named_locale("es_MX"); } } diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc index 15ea686141e..e49756f18fd 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc @@ -170,7 +170,7 @@ void test01() // 3 // explicit locale(const char* std_name) - locale loc06 = __gnu_cxx_test::try_named_locale("fr_FR"); + locale loc06 = __gnu_test::try_named_locale("fr_FR"); VERIFY (loc06 != loc01); VERIFY (loc06 != loc02); VERIFY (loc06.name() == "fr_FR"); diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc index f6fc08adaf3..e450441816e 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc @@ -33,7 +33,7 @@ void test03() const char* LC_ALL_orig = getenv("LC_ALL"); if (!setenv("LC_ALL", "it_IT", 1)) { - std::locale loc = __gnu_cxx_test::try_named_locale(""); + std::locale loc = __gnu_test::try_named_locale(""); VERIFY( loc.name() == "it_IT" ); setenv("LC_ALL", LC_ALL_orig ? LC_ALL_orig : "", 1); } diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc index c24f6a42a79..5492a0ce723 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc @@ -65,7 +65,7 @@ void test04() // Check that a "POSIX" LC_ALL is equivalent to "C". if (!setenv("LC_ALL", "POSIX", 1)) { - locale loc = __gnu_cxx_test::try_named_locale(""); + locale loc = __gnu_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 = __gnu_cxx_test::try_named_locale(""); + locale loc = __gnu_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 = __gnu_cxx_test::try_named_locale(""); + locale loc = __gnu_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 = __gnu_cxx_test::try_named_locale(""); + locale loc = __gnu_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 = __gnu_cxx_test::try_named_locale(""); + locale loc = __gnu_test::try_named_locale(""); #if _GLIBCXX_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 = __gnu_cxx_test::try_named_locale(""); + locale loc = __gnu_test::try_named_locale(""); #if _GLIBCXX_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 _GLIBCXX_NUM_CATEGORIES if (!setenv("LC_IDENTIFICATION", "it_IT", 1)) { - locale loc = __gnu_cxx_test::try_named_locale(""); + locale loc = __gnu_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;" diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc index ced0f59f6be..ffcd3ab943a 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc @@ -35,7 +35,7 @@ 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_fr = __gnu_test::try_named_locale("fr_FR"); locale loc_1(locale::classic(), new numpunct_byname<char>("fr_FR")); diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc index 126db7da1fa..8bd9c4ace2a 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc @@ -30,8 +30,8 @@ void test02() { bool test = true; - std::locale loc_1 = __gnu_cxx_test::try_named_locale(""); - std::locale loc_2 = __gnu_cxx_test::try_named_locale(""); + std::locale loc_1 = __gnu_test::try_named_locale(""); + std::locale loc_2 = __gnu_test::try_named_locale(""); VERIFY( loc_1 == loc_2 ); } diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc index 7d5aec00771..81b06ee0ecd 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc @@ -42,13 +42,13 @@ void test02() // named locales work. if (testph && testmx) { - const locale loc_ph = __gnu_cxx_test::try_named_locale(ph.c_str()); - const locale loc_mx = __gnu_cxx_test::try_named_locale(mx.c_str()); + const locale loc_ph = __gnu_test::try_named_locale(ph.c_str()); + const locale loc_mx = __gnu_test::try_named_locale(mx.c_str()); // Use setlocale between two calls to locale("") - const locale loc_env_1 = __gnu_cxx_test::try_named_locale(""); + const locale loc_env_1 = __gnu_test::try_named_locale(""); setlocale(LC_ALL, ph.c_str()); - const locale loc_env_2 = __gnu_cxx_test::try_named_locale(""); + const locale loc_env_2 = __gnu_test::try_named_locale(""); VERIFY( loc_env_1 == loc_env_2 ); // Change global locale. diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc index 2956ec8ab9e..5b360b15a21 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc @@ -30,14 +30,14 @@ void test01() typedef std::messages<char>::string_type string_type; bool test = true; - // This is exported through RUNTESTFLAGS in testsuite/Makefile.am. + // This is defined through CXXFLAGS in scripts/testsuite_flags[.in]. const char* dir = LOCALEDIR; // basic construction locale loc_c = locale::classic(); - 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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc index eed7efaa262..389d3721a1b 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc @@ -30,14 +30,14 @@ void test02() typedef std::messages<char>::string_type string_type; bool test = true; - // This is exported through RUNTESTFLAGS in testsuite/Makefile.am. + // This is defined through CXXFLAGS in scripts/testsuite_flags[.in]. const char* dir = LOCALEDIR; // basic construction locale loc_c = locale::classic(); - 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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc index ad975115720..d4abacc99ed 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc @@ -30,14 +30,14 @@ void test03() typedef std::messages<char>::string_type string_type; bool test = true; - // This is exported through RUNTESTFLAGS in testsuite/Makefile.am. + // This is defined through CXXFLAGS in scripts/testsuite_flags[.in]. const char* dir = LOCALEDIR; // basic construction locale loc_c = locale::classic(); - 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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_env.cc index 3f042d9ec42..294934099c1 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_locale.cc index 61086ad6da8..e54f823b8f9 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc b/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc index e915c9675cb..cc8860bef9d 100644 --- a/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc @@ -31,11 +31,11 @@ void test01() bool test = true; string str; - // This is exported through RUNTESTFLAGS in testsuite/Makefile.am. + // This is defined through CXXFLAGS in scripts/testsuite_flags[.in]. const char* dir = LOCALEDIR; locale loc_c = locale::classic(); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); str = loc_de.name(); locale loc_byname(locale::classic(), new messages_byname<char>("de_DE")); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc index b35b448db2f..ed0d19e46ec 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc @@ -36,9 +36,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/23_containers/vector_bool.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc index 3deec4985d2..c4f00f7add9 100644 --- a/libstdc++-v3/testsuite/23_containers/vector_bool.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc @@ -1,6 +1,4 @@ -// 2002-03-05 Stephen M. Webb <stephen.webb@bregmasoft.com> - -// Copyright (C) 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2003 Free Software Foundation // // 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 @@ -18,45 +16,38 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// 23.2.5 class vector<bool> +// 22.2.6.1.1 money_get members -#include <vector> +#include <locale> +#include <sstream> #include <testsuite_hooks.h> void test01() { - std::vector<bool>::iterator i; - if (false) - ++i; -} + using namespace std; + typedef istreambuf_iterator<char> iterator_type; -// libstdc++/6886 -void test02() -{ bool test = true; - typedef std::vector<bool> bvec; - int i, num = 0; - bvec v; - - v.resize(66); - for (i = 0 ; i < 66 ; ++i) - v[i] = 0; + locale loc_us = __gnu_test::try_named_locale("en_US"); - v[1] = 1; - v[33] = 1; - v[49] = 1; - v[65] = 1; + iterator_type end; + istringstream iss; + iss.imbue(loc_us); - for (bvec::iterator j = v.begin() ; j != v.end() ; j++) - if (bool(*j)) ++num; + const money_get<char>& mon_get = use_facet<money_get<char> >(iss.getloc()); - VERIFY( num == 4 ); + iss.str("$.00 "); + iterator_type is_it(iss); + string extracted_amount; + ios_base::iostate err = ios_base::goodbit; + mon_get.get(is_it, end, false, iss, err, extracted_amount); + VERIFY( extracted_amount == "0" ); + VERIFY( err == ios_base::goodbit ); } int main() { test01(); - test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc index a0d4caef7a2..ddb2c3f5d6f 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc @@ -36,9 +36,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc index 80e47c940fd..91ca66fb64c 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc @@ -36,9 +36,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc index b62e2f44764..d3c8359b528 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc @@ -36,9 +36,9 @@ void test04() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_env.cc index b9872d9c7b0..97db30aba24 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_env.cc @@ -56,7 +56,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_locale.cc index 996af345b58..ec63ba9b24b 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_locale.cc @@ -56,7 +56,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc index 8d1d532c9a1..a3965f79a6a 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc @@ -36,9 +36,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/23_containers/vector_resize.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc index 3cc6c57ed42..5c0036162fc 100644 --- a/libstdc++-v3/testsuite/23_containers/vector_resize.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc @@ -1,7 +1,4 @@ -// 1999-05-07 -// bkoz - -// Copyright (C) 1999, 2002 Free Software Foundation, Inc. +// Copyright (C) 2003 Free Software Foundation // // 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 @@ -19,35 +16,34 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// 23.2.4.2 vector capacity - -// XXX This test will not work for irix6 because of bug(s) in libc malloc -// XXX for very large allocations. However -lmalloc seems to work. -// See http://gcc.gnu.org/ml/libstdc++/2002-12/msg00131.html -// { dg-options "-lmalloc" { target mips*-*-irix6* } } +// 22.2.6.1.1 money_get members -#include <vector> -#include <stdexcept> +#include <locale> +#include <sstream> #include <testsuite_hooks.h> void test01() { + using namespace std; + typedef istreambuf_iterator<wchar_t> iterator_type; + bool test = true; - std::vector<int> v; - try - { - v.resize(v.max_size()); - v[v.max_size() - 1] = 2002; - } - catch (const std::bad_alloc& error) - { - test = true; - } - catch (...) - { - test = false; - } - VERIFY( test ); + + locale loc_us = __gnu_test::try_named_locale("en_US"); + + iterator_type end; + wistringstream iss; + iss.imbue(loc_us); + + const money_get<wchar_t>& mon_get = use_facet<money_get<wchar_t> >(iss.getloc()); + + iss.str(L"$.00 "); + iterator_type is_it(iss); + wstring extracted_amount; + ios_base::iostate err = ios_base::goodbit; + mon_get.get(is_it, end, false, iss, err, extracted_amount); + VERIFY( extracted_amount == L"0" ); + VERIFY( err == ios_base::goodbit ); } int main() diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc index 38721ce9991..a3959df3218 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc @@ -36,9 +36,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc index da33d636035..2883e7a4d43 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc @@ -36,9 +36,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc index 91b05cb45e4..94c27aa7cf9 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc @@ -36,9 +36,9 @@ void test04() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc index b9872d9c7b0..97db30aba24 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc @@ -56,7 +56,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc index 996af345b58..ec63ba9b24b 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc @@ -56,7 +56,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc index 27d79dc4b07..12192f5bcab 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc @@ -36,9 +36,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc index 69cfeb6ca55..044ea1174bc 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc @@ -36,9 +36,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc index 49531ad0a38..ead1aff1b72 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc @@ -36,9 +36,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_env.cc index c04f700e5cd..2f7385fb155 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_env.cc @@ -48,7 +48,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_locale.cc index 88f84572a91..105db813293 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_locale.cc @@ -48,7 +48,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc index 19c04d68007..942589bb540 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc @@ -36,9 +36,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc index ad5834b1921..2f32240bd3f 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc @@ -36,9 +36,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc index 03c747ac842..de5f5db79d6 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc @@ -36,9 +36,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE@euro"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc index c04f700e5cd..2f7385fb155 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc @@ -48,7 +48,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc index 88f84572a91..105db813293 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc @@ -48,7 +48,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc index 13d680e14fb..833995ba35a 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc @@ -34,7 +34,7 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); // cache the moneypunct facets typedef moneypunct<char, true> __money_true; diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_env.cc index 4f1d5e3f6a9..19e4210ff2c 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc index 8d7871815db..292b8c738e4 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc index 4394d83257a..d3bbc39da18 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc @@ -34,7 +34,7 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); // cache the moneypunct facets typedef moneypunct<wchar_t, true> __money_true; diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc index 4f1d5e3f6a9..19e4210ff2c 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc index 8d7871815db..292b8c738e4 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc index 70cbf38058d..ea0857a5736 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc @@ -32,7 +32,7 @@ void test01() bool test = true; string str; - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); str = loc_de.name(); locale loc_byname(locale::classic(), new moneypunct_byname<char>("de_DE")); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc index 6d4de201f24..190f9921aef 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc index cb446c7e36a..8d0ce69e254 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc index 41867ca9192..43e16c2d2c4 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc @@ -33,9 +33,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc index 0590d49b13e..e170931d060 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc @@ -36,7 +36,7 @@ void test05() istringstream iss; // A locale that expects grouping - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); iss.imbue(loc_de); const num_get<char>& ng = use_facet<num_get<char> >(iss.getloc()); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc index a6b94172035..52722d1acb8 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc @@ -33,7 +33,7 @@ void test06() double d = 0.0; istringstream iss; - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); iss.imbue(loc_de); const num_get<char>& ng = use_facet<num_get<char> >(iss.getloc()); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_env.cc index c04f700e5cd..2f7385fb155 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_env.cc @@ -48,7 +48,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_locale.cc index 88f84572a91..105db813293 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_locale.cc @@ -48,7 +48,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc index 784f83cb6fd..952651d883c 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc index bbf2a98872a..6f52860f3bf 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc index 65fcf84051a..3a775682a2b 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc @@ -33,9 +33,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc index 8443816a8d6..09f12be587b 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc @@ -36,7 +36,7 @@ void test05() wistringstream iss; // A locale that expects grouping - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); iss.imbue(loc_de); const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(iss.getloc()); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc index 57490f3f0aa..e2aeb184b23 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc @@ -33,7 +33,7 @@ void test06() double d = 0.0; wistringstream iss; - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); iss.imbue(loc_de); const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(iss.getloc()); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc index c04f700e5cd..2f7385fb155 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc @@ -48,7 +48,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc index 88f84572a91..105db813293 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc @@ -48,7 +48,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc index bffab3fefe6..cc1759129c6 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc index 407dbff3a65..5f783320c5f 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc index 080a2a47672..cae87474f29 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc @@ -33,9 +33,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc index 055f4c9f316..ce590ea57e8 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc @@ -33,7 +33,7 @@ void test05() bool test = true; // A locale that expects grouping. - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); const string empty; string result; diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_env.cc index 2baa3a44950..0bcd332b1de 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_env.cc @@ -44,7 +44,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_locale.cc index 63e7a470160..ab9a6a65927 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_locale.cc @@ -44,7 +44,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc index a8a5da15e0f..379a1379d51 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc index 8416c4c16c9..30faf63f649 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc index 26750ac7a61..5115355969f 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc @@ -33,9 +33,9 @@ void test03() // basic construction locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc index dd4799b85bd..ea9e39f231b 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc @@ -33,7 +33,7 @@ void test05() bool test = true; // A locale that expects grouping. - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); const wstring empty; wstring result; diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc index 2baa3a44950..0bcd332b1de 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc @@ -44,7 +44,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc index 63e7a470160..ab9a6a65927 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc @@ -44,7 +44,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc index 023c64f8d7c..b57ecb21fac 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc @@ -31,9 +31,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_us = __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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc index b6c8b2ddecc..0ff21db6dce 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc @@ -31,9 +31,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us = __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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc new file mode 100644 index 00000000000..002b0c47e37 --- /dev/null +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc @@ -0,0 +1,78 @@ +// 2003-07-06 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <locale> +#include <sstream> +#include <ostream> +#include <testsuite_hooks.h> + +class numpunct_checked : public std::numpunct<char> +{ + typedef std::numpunct<char> base; + +public: + explicit + numpunct_checked(std::size_t refs = 0): base(refs) { } + + string_type + base_truename() const + { return base::do_truename(); } + +protected: + virtual string_type + do_truename() const + { return base::do_truename() + "st"; } +}; + +// Thwart locale caching strategies that incorrectly overwrite base +// class data. +void test01() +{ + using namespace std; + + bool test = true; + const string basestr("true"); + const string derivedstr("truest"); + + const locale loc(locale::classic(), new numpunct_checked); + stringbuf sbuf; + ostream os(&sbuf); + os.setf(ios_base::boolalpha); + + // Pre-cache sanity check. + const numpunct<char>& np = use_facet<numpunct<char> >(loc); + VERIFY( np.truename() == derivedstr ); + + // Cache. + os.imbue(loc); + os << true; + VERIFY( sbuf.str() == derivedstr ); + + // Post-cache sanity check, make sure that base class is still fine. + VERIFY( np.truename() == derivedstr ); + const numpunct_checked& npd = static_cast<const numpunct_checked&>(np); + VERIFY( npd.base_truename() == basestr ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc new file mode 100644 index 00000000000..729e82a64bd --- /dev/null +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc @@ -0,0 +1,90 @@ +// 2003-07-06 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <locale> +#include <sstream> +#include <ostream> +#include <testsuite_hooks.h> + +class numpunct_checked : public std::numpunct<char> +{ + typedef std::numpunct<char> base; + +public: + explicit + numpunct_checked(std::size_t refs = 0): base(refs) { } + + string_type + base_truename() const + { return base::do_truename(); } + +protected: + virtual string_type + do_truename() const + { return base::do_truename() + "st"; } +}; + +// Changing caches deletes old cache, adds new one. +void test01() +{ + using namespace std; + + bool test = true; + const string empty; + const string basestr("true"); + const string derivedstr("truest"); + + const locale loc(locale::classic(), new numpunct_checked); + stringbuf sbuf; + ostream os(&sbuf); + os.setf(ios_base::boolalpha); + + // Pre-cache sanity check. + const numpunct<char>& np = use_facet<numpunct<char> >(loc); + VERIFY( np.truename() == derivedstr ); + + // Cache. + os.imbue(loc); + os << true; + VERIFY( sbuf.str() == derivedstr ); + + // Re-cache. + sbuf.str(empty); + os.imbue(locale::classic()); + os << true; + VERIFY( sbuf.str() == basestr ); + + // Cache new locale again. + sbuf.str(empty); + os.imbue(loc); + os << true; + VERIFY( sbuf.str() == derivedstr ); + + // Post-cache sanity check, make sure that base class is still fine. + VERIFY( np.truename() == derivedstr ); + const numpunct_checked& npd = static_cast<const numpunct_checked&>(np); + VERIFY( npd.base_truename() == basestr ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_env.cc index 4f1d5e3f6a9..19e4210ff2c 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_locale.cc index 8d7871815db..292b8c738e4 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc index e3426fda43c..ef1c9f0af7d 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc @@ -31,9 +31,9 @@ void test01() // basic construction locale loc_c = locale::classic(); - locale loc_us = __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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc index 9b55ae95e33..fce8fa2c6d7 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc @@ -31,9 +31,9 @@ void test02() // basic construction locale loc_c = locale::classic(); - locale loc_us = __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"); + locale loc_us = __gnu_test::try_named_locale("en_US"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_c != loc_de ); VERIFY( loc_us != loc_fr ); VERIFY( loc_us != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc new file mode 100644 index 00000000000..0b41e963f50 --- /dev/null +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc @@ -0,0 +1,78 @@ +// 2003-07-06 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <locale> +#include <sstream> +#include <ostream> +#include <testsuite_hooks.h> + +class numpunct_checked : public std::numpunct<wchar_t> +{ + typedef std::numpunct<wchar_t> base; + +public: + explicit + numpunct_checked(std::size_t refs = 0): base(refs) { } + + string_type + base_truename() const + { return base::do_truename(); } + +protected: + virtual string_type + do_truename() const + { return base::do_truename() + L"st"; } +}; + +// Thwart locale caching strategies that incorrectly overwrite base +// class data. +void test01() +{ + using namespace std; + + bool test = true; + const wstring basestr(L"true"); + const wstring derivedstr(L"truest"); + + const locale loc(locale::classic(), new numpunct_checked); + wstringbuf sbuf; + wostream os(&sbuf); + os.setf(ios_base::boolalpha); + + // Pre-cache sanity check. + const numpunct<wchar_t>& np = use_facet<numpunct<wchar_t> >(loc); + VERIFY( np.truename() == derivedstr ); + + // Cache. + os.imbue(loc); + os << true; + VERIFY( sbuf.str() == derivedstr ); + + // Post-cache sanity check, make sure that base class is still fine. + VERIFY( np.truename() == derivedstr ); + const numpunct_checked& npd = static_cast<const numpunct_checked&>(np); + VERIFY( npd.base_truename() == basestr ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc new file mode 100644 index 00000000000..9a3c4872e5c --- /dev/null +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc @@ -0,0 +1,90 @@ +// 2003-07-06 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <locale> +#include <sstream> +#include <ostream> +#include <testsuite_hooks.h> + +class numpunct_checked : public std::numpunct<wchar_t> +{ + typedef std::numpunct<wchar_t> base; + +public: + explicit + numpunct_checked(std::size_t refs = 0): base(refs) { } + + string_type + base_truename() const + { return base::do_truename(); } + +protected: + virtual string_type + do_truename() const + { return base::do_truename() + L"st"; } +}; + +// Changing caches deletes old cache, adds new one. +void test01() +{ + using namespace std; + + bool test = true; + const wstring empty; + const wstring basestr(L"true"); + const wstring derivedstr(L"truest"); + + const locale loc(locale::classic(), new numpunct_checked); + wstringbuf sbuf; + wostream os(&sbuf); + os.setf(ios_base::boolalpha); + + // Pre-cache sanity check. + const numpunct<wchar_t>& np = use_facet<numpunct<wchar_t> >(loc); + VERIFY( np.truename() == derivedstr ); + + // Cache. + os.imbue(loc); + os << true; + VERIFY( sbuf.str() == derivedstr ); + + // Re-cache. + sbuf.str(empty); + os.imbue(locale::classic()); + os << true; + VERIFY( sbuf.str() == basestr ); + + // Cache new locale again. + sbuf.str(empty); + os.imbue(loc); + os << true; + VERIFY( sbuf.str() == derivedstr ); + + // Post-cache sanity check, make sure that base class is still fine. + VERIFY( np.truename() == derivedstr ); + const numpunct_checked& npd = static_cast<const numpunct_checked&>(np); + VERIFY( npd.base_truename() == basestr ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc index 4f1d5e3f6a9..19e4210ff2c 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc index 8d7871815db..292b8c738e4 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc index 96a9691ac6d..a3fcaf268f4 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc @@ -30,7 +30,7 @@ void test01() bool test = true; string str; - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); str = loc_de.name(); locale loc_byname(locale::classic(), new numpunct_byname<char>("de_DE")); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc index 6bebbbf0d4c..4e6c9d68e62 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc @@ -29,7 +29,7 @@ void test02() bool test = true; - locale loc_it = __gnu_cxx_test::try_named_locale("it_IT"); + locale loc_it = __gnu_test::try_named_locale("it_IT"); const numpunct<char>& nump_it = use_facet<numpunct<char> >(loc_it); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc index 59128a61336..f4f0b88502c 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc index b4a2fcf6984..c9c19dfc29a 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc index b3d040edc7a..c6356dfa6c4 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_env("de_DE", "LANG", two); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc index 17d4d5dcb82..3be97fb4ee7 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc @@ -28,7 +28,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); run_tests_wrapped_locale("ja_JP.eucjp", two); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc index a4782795f6e..7c54955a76e 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc index 149b95276d5..63d2602272a 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_env.cc index 3f042d9ec42..294934099c1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc index 61086ad6da8..e54f823b8f9 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc index 71a30d11b87..aedf8817d8c 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc index 33312396dac..aff0d1e74e7 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc index 3f042d9ec42..294934099c1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc index 61086ad6da8..e54f823b8f9 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc index 6ecbb0a0ddb..17f52a56385 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc @@ -37,9 +37,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc index 6535a66c4e9..f9d79a43440 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc index 3f042d9ec42..294934099c1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc index 61086ad6da8..e54f823b8f9 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc index 7e82e5197c2..0b86d74f996 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc @@ -37,9 +37,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc index edab4ba3f3c..63689eefca3 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc index 3f042d9ec42..294934099c1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc index 61086ad6da8..e54f823b8f9 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc index 89015346acf..1517fe2e138 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc index ddb817f0913..9b307d7535c 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_env.cc index 3f042d9ec42..294934099c1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc index 61086ad6da8..e54f823b8f9 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc index a1fe3b3d2e7..00ee21e680a 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc @@ -33,9 +33,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc index 0151fc64d33..a412cf01011 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc @@ -33,9 +33,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc index 3f042d9ec42..294934099c1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc index 61086ad6da8..e54f823b8f9 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc index c530170d05a..ecbe8ecc2d8 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc index 68a7d89ed1a..e423be62572 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc index 3f042d9ec42..294934099c1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc index 61086ad6da8..e54f823b8f9 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc index 0c7d5b40f04..dca85d24fd2 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc index af2e3ecc6ec..1ca267440e7 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc @@ -34,9 +34,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc index 3f042d9ec42..294934099c1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc index 61086ad6da8..e54f823b8f9 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc @@ -36,7 +36,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc index 0f408fc1f12..d0aea858ae7 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_env.cc index 206130ac140..bcc3e36e2d6 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test03); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc index b805c3c43cf..3cfb7053f17 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test03); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc index e5c726a13b3..f8158957272 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc @@ -34,9 +34,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc index 206130ac140..bcc3e36e2d6 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test03); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc index b805c3c43cf..3cfb7053f17 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc @@ -32,7 +32,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test03); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc index d3acb9b824a..b547034f7a0 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc @@ -40,9 +40,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc index 4656efc16e4..eb844f16209 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc @@ -40,9 +40,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc index 3b768db4b12..522a899ef38 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc @@ -40,9 +40,9 @@ void test03() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc index d07fad6dc2d..8c9b1e0f492 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc @@ -40,9 +40,9 @@ void test04() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc index e1355b8ea47..9376987050e 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc @@ -41,9 +41,9 @@ void test05() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc index 5634d9f3bde..e0ea595f08d 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc @@ -41,9 +41,9 @@ void test06() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc index 91a5e9bf848..1f37a24a16f 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc @@ -42,9 +42,9 @@ void test07() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc index 7409ff9cbb4..b047ed96547 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc @@ -41,9 +41,9 @@ void test08() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_env.cc index bcf68e986ba..c887914ee63 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_env.cc @@ -64,7 +64,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_locale.cc index 465af45016e..097e11a55bb 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_locale.cc @@ -64,7 +64,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc index 874b62800c2..c6f36b732f0 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc @@ -40,9 +40,9 @@ void test01() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc index b41e6a7feb5..67ce4a344d1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc @@ -40,9 +40,9 @@ void test02() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc index d3cf9dd9971..c0ecf6acef3 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc @@ -40,9 +40,9 @@ void test03() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc index db04bcc0765..6206ff57734 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc @@ -40,9 +40,9 @@ void test04() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc index 9268127b1a5..b017d420549 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc @@ -41,9 +41,9 @@ void test05() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc index 90f7614f9d9..8bb5b237d66 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc @@ -41,9 +41,9 @@ void test06() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc index c63147870df..354285e35ca 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc @@ -41,9 +41,9 @@ void test07() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc index a7edf18c477..6367a8edd27 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc @@ -41,9 +41,9 @@ void test08() // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __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"); + locale loc_hk = __gnu_test::try_named_locale("en_HK"); + locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc index bcf68e986ba..c887914ee63 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc @@ -64,7 +64,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc index 465af45016e..097e11a55bb 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc @@ -64,7 +64,7 @@ int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); diff --git a/libstdc++-v3/testsuite/23_containers/bitset_ctor.cc b/libstdc++-v3/testsuite/23_containers/bitset_ctor.cc deleted file mode 100644 index 8dae3add5ea..00000000000 --- a/libstdc++-v3/testsuite/23_containers/bitset_ctor.cc +++ /dev/null @@ -1,126 +0,0 @@ -// 1999-06-08 bkoz - -// Copyright (C) 1999, 2000, 2002 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.3.5.1 bitset constructors - -#include <string> -#include <bitset> -#include <stdexcept> -#include <testsuite_hooks.h> - -bool test01(void) -{ - bool test = true; - - // bitset() - const size_t n1 = 5; - std::bitset<n1> bit01; - for (int i = 0; i < n1; ++i) - VERIFY( !bit01.test(i) ); - - // bitset(unsigned long) - const size_t n2 = 32; - unsigned long ul1 = 2; - std::bitset<n2> bit02(ul1); - VERIFY( !bit02.test(0) ); - VERIFY( bit02.test(1) ); - VERIFY( !bit02.test(2) ); - - // template<_CharT, _Traits, _Alloc> - // explicit bitset(const basic_string<_C,_T,_A>&, size_type pos, size_type n) - std::string str01("stuff smith sessions"); - const size_t n3 = 128; - try { - std::bitset<n3> bit03(str01, 5); - } - catch(std::invalid_argument& fail) { - VERIFY( true ); - } - catch(...) { - VERIFY( false ); - } - - std::string str02("010101000011"); - int sz = str02.size(); - try { - std::bitset<n3> bit03(str02, 0); - std::string str03; - for (int i = 0; i < sz; ++i) - str03 += (bit03.test(i) ? '1' : '0'); - std::reverse(str03.begin(), str03.end()); - VERIFY( str03 == str02 ); - } - catch(std::invalid_argument& fail) { - VERIFY( false ); - } - catch(...) { - VERIFY( false ); - } - - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; -} - -// boundary condition: a zero-sized set -// libstdc++/6282 -bool test02(void) -{ - using std::char_traits; using std::allocator; - bool test = true; - - std::bitset<0> z1; - VERIFY( z1.any() == false ); - - std::bitset<0> z2(12345); - VERIFY( z2.any() == false ); - - std::bitset<0> z3(std::string("10101010101")); - VERIFY( z3.any() == false ); - - try { - z1.set(0); - VERIFY( false ); - } - catch(std::out_of_range& fail) { - VERIFY( true ); - } - catch(...) { - VERIFY( false ); - } - - VERIFY( z1.to_ulong() == 0 ); - VERIFY( ( z1.to_string<char,char_traits<char>,allocator<char> >().empty() ) ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; -} - -int main() -{ - test01(); - test02(); - - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/bitset_members.cc b/libstdc++-v3/testsuite/23_containers/bitset_members.cc deleted file mode 100644 index 82e3a487ea3..00000000000 --- a/libstdc++-v3/testsuite/23_containers/bitset_members.cc +++ /dev/null @@ -1,79 +0,0 @@ -// 2001-06-03 pme - -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.3.5.2 bitset members - -#include <bitset> -#include <stdexcept> -#include <sstream> -#include <testsuite_hooks.h> - -void -test01(void) -{ - bool test = true; - const size_t n1 = 5; - - // the other 22 member functions should be in here too... - try { - std::bitset<n1> five_bits; - bool unused = five_bits.test(n1); // should throw - VERIFY( false ); - } - catch(std::out_of_range& fail) { - VERIFY( true ); - } - catch(...) { - VERIFY( false ); - } - VERIFY( test ); -} - -// libstdc++/6124 -void test02() -{ - std::bitset<1> bs; - bs.count(); -} - -void test03() -{ - bool test = true; - std::bitset<5> b; - std::stringstream ss ("101"); - - ss.exceptions(std::ios_base::eofbit); - - try - { - ss >> b; - } - catch (std::exception&) {} - - VERIFY( b.to_ulong() == 5 ); -} - -int main() -{ - test01(); - test02(); - test03(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/bitset_shift.cc b/libstdc++-v3/testsuite/23_containers/bitset_shift.cc deleted file mode 100644 index 01fdd2fbc4b..00000000000 --- a/libstdc++-v3/testsuite/23_containers/bitset_shift.cc +++ /dev/null @@ -1,130 +0,0 @@ -// 2000-01-15 Anders Widell <awl@hem.passagen.se> - -// Copyright (C) 2000 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -#include <string> -#include <set> -#include <bitset> - -#include <testsuite_hooks.h> - -static char original_bits[1024]; -static char left_shifted[1024]; -static char right_shifted[1024]; - -char -random_bit() { - static long x = 1; - return ((x = (3432L*x + 6789L) % 9973L) & 1) + '0'; -} - -void -initialise(size_t size) { - for (size_t i=0; i<size; i++) - original_bits[i] = random_bit(); - - original_bits[size] = '\0'; - left_shifted[size] = '\0'; - right_shifted[size] = '\0'; -} - -void -shift_arrays(size_t shift_step, size_t size) { - for (size_t i=shift_step; i<size; i++) { - right_shifted[i] = original_bits[i-shift_step]; - left_shifted[size-i-1] = original_bits[size+shift_step-i-1]; - } - for (size_t i=0; i<shift_step && i<size; i++) { - right_shifted[i] = '0'; - left_shifted[size-i-1] = '0'; - } -} - -template <size_t size> - bool - do_test() { - bool test = true; - - std::bitset<size> shifted; - std::bitset<size> correct; - - initialise(size); - - //std::bitset<size> original = std::string(original_bits); - std::bitset<size> original = std::bitset<size> (std::string(original_bits)); - - for (size_t shift_step=0; shift_step==0 || shift_step<size; shift_step++) { - shift_arrays(shift_step, size); - - shifted = original; - shifted <<= shift_step; - //correct = std::string(left_shifted); - correct = std::bitset<size> (std::string(left_shifted)); - VERIFY( shifted == correct ); - - shifted = original; - shifted >>= shift_step; - //correct = std::string(right_shifted); - correct = std::bitset<size> (std::string(right_shifted)); - VERIFY( shifted == correct ); - } - - return test; - } - -bool -test01() { - bool test = true; - - VERIFY( do_test<32>() ); - VERIFY( do_test<48>() ); - VERIFY( do_test<64>() ); - - VERIFY( do_test<511>() ); - VERIFY( do_test<513>() ); - VERIFY( do_test<997>() ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; -} - -bool -test02() -{ - bool test = true; - - std::bitset<66> b; - b <<= 400; - VERIFY( b.count() == 0 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; -} - -int -main() { - test01(); - test02(); - - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/deque_ctor.cc b/libstdc++-v3/testsuite/23_containers/deque_ctor.cc deleted file mode 100644 index 50a813368bb..00000000000 --- a/libstdc++-v3/testsuite/23_containers/deque_ctor.cc +++ /dev/null @@ -1,539 +0,0 @@ -// 2001-12-27 pme -// -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.2.1.1 deque constructors, copy, and assignment - -#include <deque> -#include <iterator> -#include <sstream> -#include <testsuite_allocator.h> -#include <testsuite_hooks.h> - -using __gnu_cxx_test::copy_tracker; -using __gnu_cxx_test::allocation_tracker; -using __gnu_cxx_test::tracker_alloc; -using __gnu_cxx_test::copy_constructor; -using __gnu_cxx_test::assignment_operator; -using __gnu_cxx_test::counter; -using __gnu_cxx_test::destructor; - -typedef std::deque<counter> gdeque; - -bool test = true; - -// see http://gcc.gnu.org/ml/libstdc++/2001-11/msg00139.html -void -test01() -{ - assert_count (0); - { - gdeque d(10); - assert_count (10); - } - assert_count (0); -} - - -// 23.2.1 required types -// -// A missing required type will cause a compile failure. -// -void -requiredTypesCheck() -{ - typedef int T; - typedef std::deque<T> X; - - typedef X::reference reference; - typedef X::const_reference const_reference; - typedef X::iterator iterator; - typedef X::const_iterator const_iterator; - typedef X::size_type size_type; - typedef X::difference_type difference_type; - typedef X::value_type value_type; - typedef X::allocator_type allocator_type; - typedef X::pointer pointer; - typedef X::const_pointer const_pointer; - typedef X::reverse_iterator reverse_iterator; - typedef X::const_reverse_iterator const_reverse_iterator; -} - - -// @fn defaultConstructorCheck -// Explicitly checks the default deque constructor and destructor for both -// trivial and non-trivial types. In addition, the size() and empty() -// member functions are explicitly checked here since it should be their -// first use. Checking those functions means checking the begin() and -// end() and their const brethren functions as well. -// -// @verbatim -// 23.2.1.1 default ctor/dtor -// effects: -// 23.2.1.1 constructs an empty deque using the specified allocator -// postconditions: -// 23.1 table 65 u.size() == 0 -// throws: -// complexity: -// 23.1 table 65 constant -// -// 23.2.1.2 bool empty() const -// semantics: -// 23.1 table 65 a.size() == 0 -// 23.1 (7) a.begin() == a.end() -// throws: -// complexity: -// 23.1 table 65 constant -// -// 23.2.1.2 size_type size() const -// semantics: -// 23.1 table 65 a.end() - a.begin() -// throws: -// complexity: -// 23.1 table 65(A) should be constant -// -// 23.2.1 iterator begin() -// const_iterator begin() const -// iterator end() -// const_iterator end() const -// throws: -// 23.1 (10) pt. 4 does not throw -// complexity: -// 23.1 table 65 constant -// @endverbatim -void -defaultConstructorCheckPOD() -{ - // setup - typedef int T; - typedef std::deque<T> X; - - // run test - X u; - - // assert postconditions - VERIFY(u.empty()); - VERIFY(0 == u.size()); - VERIFY(u.begin() == u.end()); - VERIFY(0 == std::distance(u.begin(), u.end())); - - // teardown -} - - -void -defaultConstructorCheck() -{ - // setup - typedef copy_tracker T; - typedef std::deque<T> X; - - copy_tracker::reset(); - - // run test - const X u; - - // assert postconditions - VERIFY(u.empty()); - VERIFY(0 == u.size()); - VERIFY(u.begin() == u.end()); - VERIFY(0 == std::distance(u.begin(), u.end())); - - // teardown -} - - -// @fn copyConstructorCheck() -// Explicitly checks the deque copy constructor. Continues verificaton of -// ancillary member functions documented under defaultConstructorCheck(). -// -// This check also tests the push_back() member function. -// -// @verbatim -// 23.2.1 copy constructor -// effects: -// postconditions: -// 22.1.1 table 65 a == X(a) -// u == a -// throws: -// complexity: -// 22.1.1 table 65 linear -// @endverbatim -void -copyConstructorCheck() -{ - // setup - typedef copy_tracker T; - typedef std::deque<T> X; - - const int copyBaseSize = 17; // arbitrary - - X a; - for (int i = 0; i < copyBaseSize; ++i) - a.push_back(i); - copy_tracker::reset(); - - // assert preconditions - VERIFY(!a.empty()); - VERIFY(copyBaseSize == a.size()); - VERIFY(a.begin() != a.end()); - VERIFY(copyBaseSize == std::distance(a.begin(), a.end())); - - // run test - X u = a; - - // assert postconditions - VERIFY(u == a); - VERIFY(copyBaseSize == copy_constructor::count()); - - // teardown -} - - -// @fn fillConstructorCheck() -// This test explicitly verifies the basic fill constructor. Like the default -// constructor, later tests depend on the fill constructor working correctly. -// That means this explicit test should preceed the later tests so the error -// message given on assertion failure can be more helpful n tracking the -// problem. -// -// 23.2.1.1 fill constructor -// complexity: -// 23.2.1.1 linear in N -void -fillConstructorCheck() -{ - // setup - typedef copy_tracker T; - typedef std::deque<T> X; - - const X::size_type n(23); - const X::value_type t(111); - - copy_tracker::reset(); - - // run test - X a(n, t); - - // assert postconditions - VERIFY(n == a.size()); - VERIFY(n == copy_constructor::count()); - - // teardown -} - - -// @fn fillConstructorCheck2() -// Explicit check for fill constructors masqueraded as range constructors as -// elucidated in clause 23.1.1 paragraph 9 of the standard. -// -// 23.1.1 (9) fill constructor looking like a range constructor -void -fillConstructorCheck2() -{ - typedef copy_tracker T; - typedef std::deque<T> X; - - const int f = 23; - const int l = 111; - - copy_tracker::reset(); - - X a(f, l); - - VERIFY(f == a.size()); - VERIFY(f == copy_constructor::count()); -} - - -// @fn rangeConstructorCheckForwardIterator() -// This test copies from one deque to another to force the copy -// constructor for T to be used because the compiler will kindly -// elide copies if the default constructor can be used with -// type conversions. Trust me. -// -// 23.2.1.1 range constructor, forward iterators -void -rangeConstructorCheckForwardIterator() -{ - // setup - typedef copy_tracker T; - typedef std::deque<T> X; - - const X::size_type n(726); - const X::value_type t(307); - X source(n, t); - X::iterator i = source.begin(); - X::iterator j = source.end(); - X::size_type rangeSize = std::distance(i, j); - - copy_tracker::reset(); - - // test - X a(i, j); - - // assert postconditions - VERIFY(rangeSize == a.size()); - VERIFY(copy_constructor::count() <= rangeSize); -} - - -// @fn rangeConstructorCheckInputIterator() -// An explicit check for range construction on an input iterator -// range, which the standard expounds upon as having a different -// complexity than forward iterators. -// -// 23.2.1.1 range constructor, input iterators -void -rangeConstructorCheckInputIterator() -{ - typedef copy_tracker T; - typedef std::deque<T> X; - - std::istringstream ibuf("1234567890123456789"); - const X::size_type rangeSize = ibuf.str().size(); - std::istream_iterator<char> i(ibuf); - std::istream_iterator<char> j; - - copy_tracker::reset(); - - X a(i, j); - - VERIFY(rangeSize == a.size()); - VERIFY(copy_constructor::count() <= (2 * rangeSize)); -} - - -// 23.2.1 copy assignment -void -copyAssignmentCheck() -{ - typedef copy_tracker T; - typedef std::deque<T> X; - - const X::size_type n(18); - const X::value_type t(1023); - X a(n, t); - X r; - - copy_tracker::reset(); - - r = a; - - VERIFY(r == a); - VERIFY(n == copy_constructor::count()); -} - - -// 23.2.1.1 fill assignment -// -// The complexity check must check dtors+copyAssign and -// copyCtor+copyAssign because that's the way the SGI implementation -// works. Dunno if it's true standard compliant (which specifies fill -// assignment in terms of erase and insert only), but it should work -// as (most) users expect and is more efficient. -void -fillAssignmentCheck() -{ - typedef copy_tracker T; - typedef std::deque<T> X; - - const X::size_type starting_size(10); - const X::value_type starting_value(66); - const X::size_type n(23); - const X::value_type t(111); - - X a(starting_size, starting_value); - copy_tracker::reset(); - - // preconditions - VERIFY(starting_size == a.size()); - - // test - a.assign(n, t); - - // postconditions - VERIFY(n == a.size()); - VERIFY(n == (copy_constructor::count() + assignment_operator::count())); - VERIFY(starting_size == (destructor::count() + assignment_operator::count())); -} - - -// @verbatim -// 23.2.1 range assignment -// 23.2.1.1 deque constructors, copy, and assignment -// effects: -// Constructs a deque equal to the range [first, last), using the -// specified allocator. -// -// template<typename InputIterator> -// assign(InputIterator first, InputIterator last); -// -// is equivalent to -// -// erase(begin(), end()); -// insert(begin(), first, last); -// -// postconditions: -// throws: -// complexity: -// forward iterators: N calls to the copy constructor, 0 reallocations -// input iterators: 2N calls to the copy constructor, log(N) reallocations -// @endverbatim -void -rangeAssignmentCheck() -{ - typedef copy_tracker T; - typedef std::deque<T> X; - - const X::size_type source_size(726); - const X::value_type source_value(307); - const X::size_type starting_size(10); - const X::value_type starting_value(66); - - X source(source_size, source_value); - X::iterator i = source.begin(); - X::iterator j = source.end(); - X::size_type rangeSize = std::distance(i, j); - - X a(starting_size, starting_value); - VERIFY(starting_size == a.size()); - - copy_tracker::reset(); - - a.assign(i, j); - - VERIFY(source == a); - VERIFY(rangeSize == (copy_constructor::count() + assignment_operator::count())); - VERIFY(starting_size == (destructor::count() + assignment_operator::count())); -} - - -// 23.1 (10) range assignment -// 23.2.1.3 with exception -void -rangeAssignmentCheckWithException() -{ - // setup - typedef copy_tracker T; - typedef std::deque<T> X; - - // test - // What does "no effects" mean? -} - - -// 23.1.1 (9) fill assignment looking like a range assignment -void -fillAssignmentCheck2() -{ - // setup - typedef copy_tracker T; - typedef std::deque<T> X; - - // test - // What does "no effects" mean? -} - -// Verify that the default deque constructor offers the basic exception -// guarantee. -void -test_default_ctor_exception_safety() -{ - // setup - typedef copy_tracker T; - typedef std::deque<T, tracker_alloc<T> > X; - - T::reset(); - copy_constructor::throw_on(3); - allocation_tracker::resetCounts(); - - // test - try - { - X a(7); - VERIFY(("no exception thrown", false)); - } - catch (...) - { - } - - // assert postconditions - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); - - // teardown -} - -// Verify that the copy constructor offers the basic exception guarantee. -void -test_copy_ctor_exception_safety() -{ - // setup - typedef copy_tracker T; - typedef std::deque<T, tracker_alloc<T> > X; - - allocation_tracker::resetCounts(); - { - X a(7); - T::reset(); - copy_constructor::throw_on(3); - - - // test - try - { - X u(a); - VERIFY(("no exception thrown", false)); - } - catch (...) - { - } - } - - // assert postconditions - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); - - // teardown -} - - -int main() -{ - // basic functionality and standard conformance checks - requiredTypesCheck(); - defaultConstructorCheckPOD(); - defaultConstructorCheck(); - test_default_ctor_exception_safety(); - copyConstructorCheck(); - test_copy_ctor_exception_safety(); - fillConstructorCheck(); - fillConstructorCheck2(); - rangeConstructorCheckInputIterator(); - rangeConstructorCheckForwardIterator(); - copyAssignmentCheck(); - fillAssignmentCheck(); - fillAssignmentCheck2(); - rangeAssignmentCheck(); - rangeAssignmentCheckWithException(); - - // specific bug fix checks - test01(); - - return !test; -} diff --git a/libstdc++-v3/testsuite/23_containers/deque_operators.cc b/libstdc++-v3/testsuite/23_containers/deque_operators.cc deleted file mode 100644 index 5463b47f1cb..00000000000 --- a/libstdc++-v3/testsuite/23_containers/deque_operators.cc +++ /dev/null @@ -1,85 +0,0 @@ -// 2002-05-18 Paolo Carlini <pcarlini@unitus.it> - -// Copyright (C) 2002 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.2.1 deque operators - -#include <deque> -#include <testsuite_hooks.h> - -// libstdc++/6503 -void test01() -{ - bool test = true; - - std::deque<int> d(2); - typedef std::deque<int>::iterator iter; - typedef std::deque<int>::const_iterator constiter; - - iter beg = d.begin(); - iter end = d.end(); - constiter constbeg = d.begin(); - constiter constend = d.end(); - - VERIFY( beg == constbeg ); - VERIFY( constend == end ); - - VERIFY( beg != constend ); - VERIFY( constbeg != end ); - - VERIFY( beg < constend ); - VERIFY( constbeg < end ); - - VERIFY( end > constbeg ); - VERIFY( constend > beg ); - - VERIFY( end >= constend ); - VERIFY( constbeg >= beg ); - - VERIFY( beg <= constbeg ); - VERIFY( constend <= end ); -} - -// libstdc++/7186 -void test02() -{ - bool test = true; - - std::deque<int> d(2); - typedef std::deque<int>::iterator iter; - typedef std::deque<int>::const_iterator constiter; - - iter beg = d.begin(); - iter end = d.end(); - constiter constbeg = d.begin(); - constiter constend = d.end(); - - VERIFY( beg - constbeg == 0 ); - VERIFY( constend - end == 0 ); - - VERIFY( end - constbeg > 0 ); - VERIFY( constend - beg > 0 ); -} - -int main() -{ - test01(); - test02(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/list_capacity.cc b/libstdc++-v3/testsuite/23_containers/list_capacity.cc deleted file mode 100644 index 133fecd5423..00000000000 --- a/libstdc++-v3/testsuite/23_containers/list_capacity.cc +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2001 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without Pred the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.2.2.2 list capacity [lib.list.capacity] - -#include <list> -#include <testsuite_hooks.h> - -bool test = true; - -// This test verifies the following. -// -// 23.2.2 bool empty() const -// 23.2.2 size_type size() const -// 23.2.2 iterator begin() -// 23.2.2 iterator end() -// 23.2.2.3 void push_back(const T&) -// 23.2.2 size_type max_size() const -// 23.2.2.2 void resize(size_type s, T c = T()) -// -void -test01() -{ - std::list<int> list0101; - VERIFY(list0101.empty()); - VERIFY(list0101.size() == 0); - - list0101.push_back(1); - VERIFY(!list0101.empty()); - VERIFY(list0101.size() == 1); - - list0101.resize(3, 2); - VERIFY(!list0101.empty()); - VERIFY(list0101.size() == 3); - - std::list<int>::iterator i = list0101.begin(); - VERIFY(*i == 1); ++i; - VERIFY(*i == 2); ++i; - VERIFY(*i == 2); ++i; - VERIFY(i == list0101.end()); - - list0101.resize(0); - VERIFY(list0101.empty()); - VERIFY(list0101.size() == 0); -} - -int -main(int argc, char* argv[]) -{ - test01(); - - return !test; -} - -// vi:set sw=2 ts=2: diff --git a/libstdc++-v3/testsuite/23_containers/list_ctor.cc b/libstdc++-v3/testsuite/23_containers/list_ctor.cc deleted file mode 100644 index e358e7a9fe4..00000000000 --- a/libstdc++-v3/testsuite/23_containers/list_ctor.cc +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright (C) 2001 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.2.2.1 list constructors, copy, and assignment - -#include <list> -#include <testsuite_hooks.h> - -bool test = true; - -// A nontrivial type. -template<typename T> - struct A { }; - -// Another nontrivial type -struct B { }; - -// A nontrivial type convertible from an int -struct C { - C(int i) : i_(i) { } - bool operator==(const C& rhs) { return i_ == rhs.i_; } - int i_; -}; - -// Default constructor, basic properties -// -// This test verifies the following. -// 23.2.2.1 explicit list(const a& = Allocator()) -// 23.1 (7) iterator behaviour of empty containers -// 23.2.2 iterator begin() -// 23.2.2 iterator end() -// 23.2.2 size_type size() const -// 23.2.2 existence of required typedefs -// -void -test01() -{ - std::list< A<B> > list0101; - VERIFY(list0101.begin() == list0101.end()); - VERIFY(list0101.size() == 0); - - // check type definitions -- will fail compile if missing - typedef std::list< A<B> >::reference reference; - typedef std::list< A<B> >::const_reference const_reference; - typedef std::list< A<B> >::iterator iterator; - typedef std::list< A<B> >::const_iterator const_iterator; - typedef std::list< A<B> >::size_type size_type; - typedef std::list< A<B> >::difference_type difference_type; - typedef std::list< A<B> >::value_type value_type; - typedef std::list< A<B> >::allocator_type allocator_type; - typedef std::list< A<B> >::pointer pointer; - typedef std::list< A<B> >::const_pointer const_pointer; - typedef std::list< A<B> >::reverse_iterator reverse_iterator; - typedef std::list< A<B> >::const_reverse_iterator const_reverse_iterator; - - // allocator checks? -} - -// Fill constructor -// -// This test verifies the following. -// 23.2.2.1 explicit list(size_type n, const T& v = T(), const a& = Allocator()) -// 23.2.2 const_iterator begin() const -// 23.2.2 const_iterator end() const -// 23.2.2 size_type size() const -// -void -test02() -{ - const int LIST_SIZE = 5; - const int INIT_VALUE = 7; - int count; - std::list<int>::const_iterator i; - - // nontrivial value_type - std::list< A<B> > list0201(LIST_SIZE); - - // default value - std::list<int> list0202(LIST_SIZE); - for (i = list0202.begin(), count = 0; - i != list0202.end(); - ++i, ++count) - VERIFY(*i == 0); - VERIFY(count == LIST_SIZE); - VERIFY(list0202.size() == LIST_SIZE); - - // explicit value - std::list<int> list0203(LIST_SIZE, INIT_VALUE); - for (i = list0203.begin(), count = 0; - i != list0203.end(); - ++i, ++count) - VERIFY(*i == INIT_VALUE); - VERIFY(count == LIST_SIZE); - VERIFY(list0203.size() == LIST_SIZE); -} - -// Fill constructor disguised as a range constructor -void -test02D() -{ - const int LIST_SIZE = 5; - const int INIT_VALUE = 7; - int count = 0; - std::list<C> list0204(LIST_SIZE, INIT_VALUE); - std::list<C>::iterator i = list0204.begin(); - for (; i != list0204.end(); ++i, ++count) - VERIFY(*i == INIT_VALUE); - VERIFY(count == LIST_SIZE); - VERIFY(list0204.size() == LIST_SIZE); -} - -// Range constructor -// -// This test verifies the following. -// 23.2.2.1 template list(InputIterator f, InputIterator l, const Allocator& a = Allocator()) -// 23.2.2 const_iterator begin() const -// 23.2.2 const_iterator end() const -// 23.2.2 size_type size() const -// -void -test03() -{ - const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; - const int N = sizeof(A) / sizeof(int); - int count; - std::list<int>::const_iterator i; - - // construct from a dissimilar range - std::list<int> list0301(A, A + N); - for (i = list0301.begin(), count = 0; - i != list0301.end(); - ++i, ++count) - VERIFY(*i == A[count]); - VERIFY(count == N); - VERIFY(list0301.size() == N); - - // construct from a similar range - std::list<int> list0302(list0301.begin(), list0301.end()); - for (i = list0302.begin(), count = 0; - i != list0302.end(); - ++i, ++count) - VERIFY(*i == A[count]); - VERIFY(count == N); - VERIFY(list0302.size() == N); -} - -// Copy constructor -// -// This test verifies the following. -// 23.2.2.1 list(const list& x) -// 23.2.2 reverse_iterator rbegin() -// 23.2.2 reverse_iterator rend() -// 23.2.2 size_type size() const -// -void -test04() -{ - const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; - const int N = sizeof(A) / sizeof(int); - int count; - std::list<int>::reverse_iterator i; - std::list<int> list0401(A, A + N); - - std::list<int> list0402(list0401); - for (i = list0401.rbegin(), count = N - 1; - i != list0401.rend(); - ++i, --count) - VERIFY(*i == A[count]); - VERIFY(count == -1); - VERIFY(list0401.size() == N); -} - -// Range assign -// -// This test verifies the following. -// 23.2.2.1 void assign(InputIterator f, InputIterator l) -// 23.2.2 const_iterator begin() const -// 23.2.2 const_iterator end() const -// 23.2.2 size_type size() const -// -void -test05() -{ - const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; - const int B[] = {101, 102, 103, 104, 105}; - const int N = sizeof(A) / sizeof(int); - const int M = sizeof(B) / sizeof(int); - int count; - std::list<int>::const_iterator i; - - std::list<int> list0501; - - // make it bigger - list0501.assign(A, A + N); - for (i = list0501.begin(), count = 0; - i != list0501.end(); - ++i, ++count) - VERIFY(*i == A[count]); - VERIFY(count == N); - VERIFY(list0501.size() == N); - - // make it smaller - list0501.assign(B, B + M); - for (i = list0501.begin(), count = 0; - i != list0501.end(); - ++i, ++count) - VERIFY(*i == B[count]); - VERIFY(count == M); - VERIFY(list0501.size() == M); -} - -// Fill assign -// -// This test verifies the following. -// 23.2.2.1 void assign(size_type n, const T& v) -// 23.2.2 const_iterator begin() const -// 23.2.2 const_iterator end() const -// 23.2.2 size_type size() const -// -void -test06() -{ - const int BIG_LIST_SIZE = 11; - const int BIG_INIT_VALUE = 7; - const int SMALL_LIST_SIZE = 5; - const int SMALL_INIT_VALUE = 17; - int count; - std::list<int>::const_iterator i; - - std::list<int> list0601; - VERIFY(list0601.size() == 0); - - // make it bigger - list0601.assign(BIG_LIST_SIZE, BIG_INIT_VALUE); - for (i = list0601.begin(), count = 0; - i != list0601.end(); - ++i, ++count) - VERIFY(*i == BIG_INIT_VALUE); - VERIFY(count == BIG_LIST_SIZE); - VERIFY(list0601.size() == BIG_LIST_SIZE); - - // make it shrink - list0601.assign(SMALL_LIST_SIZE, SMALL_INIT_VALUE); - for (i = list0601.begin(), count = 0; - i != list0601.end(); - ++i, ++count) - VERIFY(*i == SMALL_INIT_VALUE); - VERIFY(count == SMALL_LIST_SIZE); - VERIFY(list0601.size() == SMALL_LIST_SIZE); -} - -// Fill Assignment disguised as a Range Assignment -void -test06D() -{ - const int LIST_SIZE = 5; - const int INIT_VALUE = 7; - int count = 0; - std::list<C> list0604; - VERIFY(list0604.size() == 0); - - list0604.assign(LIST_SIZE, INIT_VALUE); - std::list<C>::iterator i = list0604.begin(); - for (; i != list0604.end(); ++i, ++count) - VERIFY(*i == INIT_VALUE); - VERIFY(count == LIST_SIZE); - VERIFY(list0604.size() == LIST_SIZE); -} - -// Assignment operator -// -// This test verifies the following. -// 23.2.2 operator=(const list& x) -// 23.2.2 iterator begin() -// 23.2.2 iterator end() -// 23.2.2 size_type size() const -// 23.2.2 bool operator==(const list& x, const list& y) -// -void -test07() -{ - const int A[] = {701, 702, 703, 704, 705}; - const int N = sizeof(A) / sizeof(int); - int count; - std::list<int>::iterator i; - - std::list<int> list0701(A, A + N); - VERIFY(list0701.size() == N); - - std::list<int> list0702; - VERIFY(list0702.size() == 0); - - list0702 = list0701; - VERIFY(list0702.size() == N); - for (i = list0702.begin(), count = 0; - i != list0702.end(); - ++i, ++count) - VERIFY(*i == A[count]); - VERIFY(count == N); - VERIFY(list0702 == list0701); -} - -int main() -{ - test01(); - test02(); - test02D(); - test03(); - test04(); - test05(); - test06(); - test06D(); - test07(); - - return !test; -} -// vi:set sw=2 ts=2: diff --git a/libstdc++-v3/testsuite/23_containers/list_modifiers.cc b/libstdc++-v3/testsuite/23_containers/list_modifiers.cc deleted file mode 100644 index 8cdc9f0e254..00000000000 --- a/libstdc++-v3/testsuite/23_containers/list_modifiers.cc +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (C) 2001, 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without Pred the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.2.2.3 list modifiers [lib.list.modifiers] - -#include <list> -#include <testsuite_hooks.h> - -typedef __gnu_cxx_test::copy_tracker T; - -bool test = true; - - -// This test verifies the following. -// -// 23.2.2.3 void push_front(const T& x) -// 23.2.2.3 void push_back(const T& x) -// 23.2.2.3 (1) iterator and reference non-invalidation -// 23.2.2.3 (1) exception effects -// 23.2.2.3 (2) complexity requirements -// -// 23.2.2.3 void pop_front() -// 23.2.2.3 void pop_back() -// 23.2.2.3 (3) iterator and reference non-invalidation -// 23.2.2.3 (5) complexity requirements -// -// 23.2.2 const_iterator begin() const -// 23.2.2 iterator end() -// 23.2.2 const_reverse_iterator rbegin() const -// 23.2.2 _reference front() -// 23.2.2 const_reference front() const -// 23.2.2 reference back() -// 23.2.2 const_reference back() const -// -void -test01() -{ - std::list<T> list0101; - std::list<T>::const_iterator i; - std::list<T>::const_reverse_iterator j; - std::list<T>::iterator k; - T::reset(); - - list0101.push_back(T(1)); // list should be [1] - VERIFY(list0101.size() == 1); - VERIFY(T::copyCount() == 1); - - k = list0101.end(); - --k; - VERIFY(k->id() == 1); - VERIFY(k->id() == list0101.front().id()); - VERIFY(k->id() == list0101.back().id()); - - list0101.push_front(T(2)); // list should be [2 1] - VERIFY(list0101.size() == 2); - VERIFY(T::copyCount() == 2); - VERIFY(k->id() == 1); - - list0101.push_back(T(3)); // list should be [2 1 3] - VERIFY(list0101.size() == 3); - VERIFY(T::copyCount() == 3); - VERIFY(k->id() == 1); - - try - { - list0101.push_back(T(4, true)); - VERIFY(("no exception thrown", false)); - } - catch (...) - { - VERIFY(list0101.size() == 3); - VERIFY(T::copyCount() == 4); - } - - i = list0101.begin(); - VERIFY(i->id() == 2); - VERIFY(i->id() == list0101.front().id()); - - j = list0101.rbegin(); - VERIFY(j->id() == 3); - VERIFY(j->id() == list0101.back().id()); - - ++i; - VERIFY(i->id() == 1); - - ++j; - VERIFY(j->id() == 1); - - T::reset(); - - list0101.pop_back(); // list should be [2 1] - VERIFY(list0101.size() == 2); - VERIFY(T::dtorCount() == 1); - VERIFY(i->id() == 1); - VERIFY(k->id() == 1); - - list0101.pop_front(); // list should be [1] - VERIFY(list0101.size() == 1); - VERIFY(T::dtorCount() == 2); - VERIFY(i->id() == 1); - VERIFY(k->id() == 1); -} - -// general single insert/erase + swap -void -test02() -{ - std::list<T> list0201; - T::reset(); - - list0201.insert(list0201.begin(), T(1)); // list should be [1] - VERIFY(list0201.size() == 1); - VERIFY(T::copyCount() == 1); - - list0201.insert(list0201.end(), T(2)); // list should be [1 2] - VERIFY(list0201.size() == 2); - VERIFY(T::copyCount() == 2); - - std::list<T>::iterator i = list0201.begin(); - std::list<T>::const_iterator j = i; - VERIFY(i->id() == 1); ++i; - VERIFY(i->id() == 2); - - list0201.insert(i, T(3)); // list should be [1 3 2] - VERIFY(list0201.size() == 3); - VERIFY(T::copyCount() == 3); - - std::list<T>::const_iterator k = i; - VERIFY(i->id() == 2); --i; - VERIFY(i->id() == 3); --i; - VERIFY(i->id() == 1); - VERIFY(j->id() == 1); - - ++i; // will point to '3' - T::reset(); - list0201.erase(i); // should be [1 2] - VERIFY(list0201.size() == 2); - VERIFY(T::dtorCount() == 1); - VERIFY(k->id() == 2); - VERIFY(j->id() == 1); - - std::list<T> list0202; - T::reset(); - VERIFY(list0202.size() == 0); - VERIFY(T::copyCount() == 0); - VERIFY(T::dtorCount() == 0); - - // member swap - list0202.swap(list0201); - VERIFY(list0201.size() == 0); - VERIFY(list0202.size() == 2); - VERIFY(T::copyCount() == 0); - VERIFY(T::dtorCount() == 0); - - // specialized swap - swap(list0201, list0202); - VERIFY(list0201.size() == 2); - VERIFY(list0202.size() == 0); - VERIFY(T::copyCount() == 0); - VERIFY(T::dtorCount() == 0); -} - -// range and fill insert/erase + clear -// missing: o fill insert disguised as a range insert in all its variants -// o exception effects -void -test03() -{ - std::list<T> list0301; - T::reset(); - - // fill insert at beginning of list / empty list - list0301.insert(list0301.begin(), 3, T(11)); // should be [11 11 11] - VERIFY(list0301.size() == 3); - VERIFY(T::copyCount() == 3); - - // save iterators to verify post-insert validity - std::list<T>::iterator b = list0301.begin(); - std::list<T>::iterator m = list0301.end(); --m; - std::list<T>::iterator e = list0301.end(); - - // fill insert at end of list - T::reset(); - list0301.insert(list0301.end(), 3, T(13)); // should be [11 11 11 13 13 13] - VERIFY(list0301.size() == 6); - VERIFY(T::copyCount() == 3); - VERIFY(b == list0301.begin() && b->id() == 11); - VERIFY(e == list0301.end()); - VERIFY(m->id() == 11); - - // fill insert in the middle of list - ++m; - T::reset(); - list0301.insert(m, 3, T(12)); // should be [11 11 11 12 12 12 13 13 13] - VERIFY(list0301.size() == 9); - VERIFY(T::copyCount() == 3); - VERIFY(b == list0301.begin() && b->id() == 11); - VERIFY(e == list0301.end()); - VERIFY(m->id() == 13); - - // single erase - T::reset(); - m = list0301.erase(m); // should be [11 11 11 12 12 12 13 13] - VERIFY(list0301.size() == 8); - VERIFY(T::dtorCount() == 1); - VERIFY(b == list0301.begin() && b->id() == 11); - VERIFY(e == list0301.end()); - VERIFY(m->id() == 13); - - // range erase - T::reset(); - m = list0301.erase(list0301.begin(), m); // should be [13 13] - VERIFY(list0301.size() == 2); - VERIFY(T::dtorCount() == 6); - VERIFY(m->id() == 13); - - // range fill at beginning - const int A[] = {321, 322, 333}; - const int N = sizeof(A) / sizeof(int); - T::reset(); - b = list0301.begin(); - list0301.insert(b, A, A + N); // should be [321 322 333 13 13] - VERIFY(list0301.size() == 5); - VERIFY(T::copyCount() == 3); - VERIFY(m->id() == 13); - - // range fill at end - T::reset(); - list0301.insert(e, A, A + N); // should be [321 322 333 13 13 321 322 333] - VERIFY(list0301.size() == 8); - VERIFY(T::copyCount() == 3); - VERIFY(e == list0301.end()); - VERIFY(m->id() == 13); - - // range fill in middle - T::reset(); - list0301.insert(m, A, A + N); - VERIFY(list0301.size() == 11); - VERIFY(T::copyCount() == 3); - VERIFY(e == list0301.end()); - VERIFY(m->id() == 13); - - T::reset(); - list0301.clear(); - VERIFY(list0301.size() == 0); - VERIFY(T::dtorCount() == 11); - VERIFY(e == list0301.end()); -} - -int main() -{ - test01(); - test02(); - test03(); - - return !test; -} -// vi:set sw=2 ts=2: diff --git a/libstdc++-v3/testsuite/23_containers/list_operators.cc b/libstdc++-v3/testsuite/23_containers/list_operators.cc deleted file mode 100644 index 69a59943e1e..00000000000 --- a/libstdc++-v3/testsuite/23_containers/list_operators.cc +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (C) 2001 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without Pred the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.2.2.4 list operations [lib.list.ops] - -#include <list> -#include <testsuite_hooks.h> - -bool test = true; - -// splice(p, x) + remove + reverse -void -test01() -{ - const int K = 417; - const int A[] = {1, 2, 3, 4, 5}; - const int B[] = {K, K, K, K, K}; - const int N = sizeof(A) / sizeof(int); - const int M = sizeof(B) / sizeof(int); - - std::list<int> list0101(A, A + N); - std::list<int> list0102(B, B + M); - std::list<int>::iterator p = list0101.begin(); - - VERIFY(list0101.size() == N); - VERIFY(list0102.size() == M); - - ++p; - list0101.splice(p, list0102); // [1 K K K K K 2 3 4 5] - VERIFY(list0101.size() == N + M); - VERIFY(list0102.size() == 0); - - // remove range from middle - list0101.remove(K); - VERIFY(list0101.size() == N); - - // remove first element - list0101.remove(1); - VERIFY(list0101.size() == N - 1); - - // remove last element - list0101.remove(5); - VERIFY(list0101.size() == N - 2); - - // reverse - list0101.reverse(); - p = list0101.begin(); - VERIFY(*p == 4); ++p; - VERIFY(*p == 3); ++p; - VERIFY(*p == 2); ++p; - VERIFY(p == list0101.end()); -} - -// splice(p, x, i) + remove_if + operator== -void -test02() -{ - const int A[] = {1, 2, 3, 4, 5}; - const int B[] = {2, 1, 3, 4, 5}; - const int C[] = {1, 3, 4, 5, 2}; - const int N = sizeof(A) / sizeof(int); - std::list<int> list0201(A, A + N); - std::list<int> list0202(A, A + N); - std::list<int> list0203(B, B + N); - std::list<int> list0204(C, C + N); - std::list<int>::iterator i = list0201.begin(); - - // result should be unchanged - list0201.splice(list0201.begin(), list0201, i); - VERIFY(list0201 == list0202); - - // result should be [2 1 3 4 5] - ++i; - list0201.splice(list0201.begin(), list0201, i); - VERIFY(list0201 != list0202); - VERIFY(list0201 == list0203); - - // result should be [1 3 4 5 2] - list0201.splice(list0201.end(), list0201, i); - VERIFY(list0201 == list0204); -} - -// splice(p, x, f, l) + sort + merge + unique -void -test03() -{ - const int A[] = {103, 203, 603, 303, 403, 503}; - const int B[] = {417, 417, 417, 417, 417}; - const int E[] = {103, 417, 417, 203, 603, 303, 403, 503}; - const int F[] = {103, 203, 303, 403, 417, 417, 503, 603}; - const int C[] = {103, 203, 303, 403, 417, 417, 417, 417, 417, 503, 603}; - const int D[] = {103, 203, 303, 403, 417, 503, 603}; - const int N = sizeof(A) / sizeof(int); - const int M = sizeof(B) / sizeof(int); - const int P = sizeof(C) / sizeof(int); - const int Q = sizeof(D) / sizeof(int); - const int R = sizeof(E) / sizeof(int); - - std::list<int> list0301(A, A + N); - std::list<int> list0302(B, B + M); - std::list<int> list0303(C, C + P); - std::list<int> list0304(D, D + Q); - std::list<int> list0305(E, E + R); - std::list<int> list0306(F, F + R); - std::list<int>::iterator p = list0301.begin(); - std::list<int>::iterator q = list0302.begin(); - - ++p; ++q; ++q; - list0301.splice(p, list0302, list0302.begin(), q); - VERIFY(list0301 == list0305); - VERIFY(list0301.size() == N + 2); - VERIFY(list0302.size() == M - 2); - - list0301.sort(); - VERIFY(list0301 == list0306); - - list0301.merge(list0302); - VERIFY(list0301.size() == N + M); - VERIFY(list0302.size() == 0); - VERIFY(list0301 == list0303); - - list0301.unique(); - VERIFY(list0301 == list0304); -} - -// A comparison predicate to order by rightmost digit. Tracks call counts for -// performance checks. -struct CompLastLt -{ - bool operator()(const int x, const int y) { ++itsCount; return x % 10 < y % 10; } - static int count() { return itsCount; } - static void reset() { itsCount = 0; } - static int itsCount; -}; - -int CompLastLt::itsCount; - -struct CompLastEq -{ - bool operator()(const int x, const int y) { ++itsCount; return x % 10 == y % 10; } - static int count() { return itsCount; } - static void reset() { itsCount = 0; } - static int itsCount; -}; - -int CompLastEq::itsCount; - -// sort(pred) + merge(pred) + unique(pred) -// also checks performance requirements -void -test04() -{ - const int A[] = {1, 2, 3, 4, 5, 6}; - const int B[] = {12, 15, 13, 14, 11}; - const int C[] = {11, 12, 13, 14, 15}; - const int D[] = {1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6}; - const int N = sizeof(A) / sizeof(int); - const int M = sizeof(B) / sizeof(int); - const int Q = sizeof(D) / sizeof(int); - - std::list<int> list0401(A, A + N); - std::list<int> list0402(B, B + M); - std::list<int> list0403(C, C + M); - std::list<int> list0404(D, D + Q); - std::list<int> list0405(A, A + N); - - // sort B - CompLastLt lt; - - CompLastLt::reset(); - list0402.sort(lt); - VERIFY(list0402 == list0403); - - CompLastLt::reset(); - list0401.merge(list0402, lt); - VERIFY(list0401 == list0404); - VERIFY(lt.count() <= (N + M - 1)); - - CompLastEq eq; - - CompLastEq::reset(); - list0401.unique(eq); - VERIFY(list0401 == list0405); - VERIFY(eq.count() == (N + M - 1)); -} - -main(int argc, char* argv[]) -{ - test01(); - test02(); - test03(); - test04(); - - return !test; -} -// vi:set sw=2 ts=2: diff --git a/libstdc++-v3/testsuite/23_containers/map_insert.cc b/libstdc++-v3/testsuite/23_containers/map_insert.cc deleted file mode 100644 index 67c838f993a..00000000000 --- a/libstdc++-v3/testsuite/23_containers/map_insert.cc +++ /dev/null @@ -1,70 +0,0 @@ -// 2001-08-23 pme & Sylvain.Pion@sophia.inria.fr - -// Copyright (C) 2001, 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.3.1.2, table 69 -- map::insert(p,t) - -#include <map> -#include <testsuite_hooks.h> - -// { dg-do run } - -// libstdc++/3349 and -// http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01375.html -void test01() -{ - bool test = true; - typedef std::map<int, int> Map; - Map M; - Map::iterator hint; - - hint = M.insert(Map::value_type(7, 0)).first; - - M.insert(hint, Map::value_type(8, 1)); - M.insert(M.begin(), Map::value_type(9, 2)); - -#if 0 - // The tree's __rb_verify() member must be exposed in map<> before this - // will even compile. It's good test to see that "missing" entries are - // in fact present in the {map,tree}, but in the wrong place. - if (0) - { - Map::iterator i = M.begin(); - while (i != M.end()) { - std::cerr << '(' << i->first << ',' << i->second << ")\n"; - ++i; - } - std::cerr << "tree internal verify: " - << std::boolalpha << M.__rb_verify() << "\n"; - } -#endif - - VERIFY ( M.find(7) != M.end() ); - VERIFY ( M.find(8) != M.end() ); - VERIFY ( M.find(9) != M.end() ); -} - - -int main() -{ - test01(); - - return 0; -} - diff --git a/libstdc++-v3/testsuite/23_containers/map_operators_neg.cc b/libstdc++-v3/testsuite/23_containers/map_operators_neg.cc deleted file mode 100644 index 75b604c80c2..00000000000 --- a/libstdc++-v3/testsuite/23_containers/map_operators_neg.cc +++ /dev/null @@ -1,49 +0,0 @@ -// 2000-09-07 bgarcia@laurelnetworks.com - -// Copyright (C) 2000, 2001, 2002 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.3.4 template class multiset negative tests - -#include <map> -#include <string> - -// { dg-do compile } - -// libstdc++/86: map & set iterator comparisons are not type-safe -void test01() -{ - bool test = true; - std::map<unsigned int, int> mapByIndex; - std::map<std::string, unsigned> mapByName; - - mapByIndex.insert(std::pair<unsigned, int>(0, 1)); - mapByIndex.insert(std::pair<unsigned, int>(6, 5)); - - std::map<unsigned, int>::iterator itr(mapByIndex.begin()); - - // NB: notice, it's not mapByIndex!! - test &= itr != mapByName.end(); // { dg-error "no" } - test &= itr == mapByName.end(); // { dg-error "no" } -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/multiset.cc b/libstdc++-v3/testsuite/23_containers/multiset.cc deleted file mode 100644 index b82612f5c7f..00000000000 --- a/libstdc++-v3/testsuite/23_containers/multiset.cc +++ /dev/null @@ -1,74 +0,0 @@ -// 1999-06-24 bkoz - -// Copyright (C) 1999 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.3.4 template class multiset - -#include <iostream> -#include <iterator> -#include <set> -#include <algorithm> - -namespace std -{ - std::ostream& - operator<<(std::ostream& os, std::pair<int, int> const& p) - { return os << p.first << ' ' << p.second; } -} - -bool -operator<(std::pair<int, int> const& lhs, std::pair<int, int> const& rhs) -{ return lhs.first < rhs.first; } - -int main () -{ - typedef std::multiset<std::pair<int, int> >::iterator iterator; - std::pair<int, int> p(69, 0); - std::multiset<std::pair<int, int> > s; - - for (p.second = 0; p.second < 5; ++p.second) - s.insert(p); - for (iterator it = s.begin(); it != s.end(); ++it) - if (it->second < 5) - { - s.insert(it, p); - ++p.second; - } - - // XXX need to use debug-assert here and get this working with an - // ostrinsrtream, that way we can just check the strings for - // equivalance. - std::copy(s.begin(), s.end(), - std::ostream_iterator<std::pair<int, int> >(std::cout, "\n")); - - return 0; -} - -/* output: -69 5 -69 0 -69 6 -69 1 -69 7 -69 2 -69 8 -69 3 -69 9 -69 4 -*/ diff --git a/libstdc++-v3/testsuite/23_containers/vector_capacity.cc b/libstdc++-v3/testsuite/23_containers/vector_capacity.cc deleted file mode 100644 index b6e347de309..00000000000 --- a/libstdc++-v3/testsuite/23_containers/vector_capacity.cc +++ /dev/null @@ -1,178 +0,0 @@ -// 1999-05-07 -// bkoz - -// Copyright (C) 1999, 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.2.4.2 vector capacity - -#include <vector> -#include <stdexcept> -#include <testsuite_allocator.h> -#include <testsuite_hooks.h> - -using __gnu_cxx_test::copy_tracker; -using __gnu_cxx_test::allocation_tracker; -using __gnu_cxx_test::tracker_alloc; -using __gnu_cxx_test::copy_constructor; -using __gnu_cxx_test::assignment_operator; -using __gnu_cxx_test::destructor; - -template<typename T> - struct A { }; - -struct B { }; - -void test01() -{ - // non POD types - bool test = true; - std::vector< A<B> > vec01; - typedef std::vector< A<B> >::size_type size_type; - - size_type sz01 = vec01.capacity(); - vec01.reserve(100); - size_type sz02 = vec01.capacity(); - VERIFY( sz02 >= sz01 ); - - sz01 = vec01.size() + 5; - vec01.resize(sz01); - sz02 = vec01.size(); - VERIFY( sz01 == sz02 ); - - sz01 = vec01.size() - 5; - vec01.resize(sz01); - sz02 = vec01.size(); - VERIFY( sz01 == sz02 ); -} - -// libstdc++/8230 -void test02() -{ - bool test = true; - { - std::vector<int> array; - const std::size_t size = array.max_size(); - try - { - array.reserve(size); - } - catch (const std::length_error& error) - { - test &= false; - } - catch (const std::bad_alloc& error) - { - test &= true; - } - catch (...) - { - test &= false; - } - VERIFY( test ); - } - - { - std::vector<int> array; - const std::size_t size = array.max_size() + 1; - try - { - array.reserve(size); - } - catch (const std::length_error& error) - { - test &= true; - } - catch (...) - { - test &= false; - } - VERIFY( test ); - } -} - -// Verifies basic functionality of reserve() with forced reallocation. -void -test_reserve() -{ - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - allocation_tracker::resetCounts(); - { - X a(3); - const X::size_type old_size = a.size(); - const X::size_type old_capacity = a.capacity(); - const X::size_type new_capacity = old_capacity + 10; - T::reset(); - - a.reserve(new_capacity); - - // [23.2.4.1 (2)] - VERIFY(new_capacity <= a.capacity()); - // [23.2.4.1 (3)] - VERIFY(old_size == a.size()); - VERIFY(copy_constructor::count() <= old_size); - VERIFY(destructor::count() <= old_size); - } - // check for memory leaks - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); -} - -// Verifies that reserve() with reallocation offers the strong -// exception guarantee. -void -test_reserve_exception_guarantee() -{ - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - allocation_tracker::resetCounts(); - { - X a(7); - const X::size_type old_size = a.size(); - const X::size_type old_capacity = a.capacity(); - const X::size_type new_capacity = old_capacity + 10; - T::reset(); - copy_constructor::throw_on(3); - - try - { - a.reserve(new_capacity); - VERIFY(("no exception thrown", false)); - } - catch (...) - { - } - - VERIFY(old_capacity == a.capacity()); - VERIFY(copy_constructor::count() == destructor::count()+1); - } - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); -} - -int main() -{ - test01(); - test02(); - test_reserve(); - test_reserve_exception_guarantee(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/vector_ctor.cc b/libstdc++-v3/testsuite/23_containers/vector_ctor.cc deleted file mode 100644 index 8b93207606e..00000000000 --- a/libstdc++-v3/testsuite/23_containers/vector_ctor.cc +++ /dev/null @@ -1,664 +0,0 @@ -// 1999-06-29 bkoz - -// Copyright (C) 1999-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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.2.4.1 vector constructors, copy, and assignment - -#include <vector> -#include <string> -#include <testsuite_allocator.h> -#include <testsuite_hooks.h> - -using __gnu_cxx_test::copy_tracker; -using __gnu_cxx_test::allocation_tracker; -using __gnu_cxx_test::tracker_alloc; -using __gnu_cxx_test::copy_constructor; -using __gnu_cxx_test::assignment_operator; - -template<typename T> - struct A { }; - -struct B { }; - -void test01() -{ - // 1 - bool test = true; - std::vector< A<B> > vec01; - std::vector< A<B> > vec02(5); - typedef std::vector< A<B> >::size_type size_type; - - vec01 = vec02; - -#ifdef DEBUG_ASSERT - assert(test); -#endif -} - -// 2 -template class std::vector<double>; -template class std::vector< A<B> >; - - -// libstdc++/102 -void test02() -{ - std::vector<int> v1; - std::vector<int> v2 (v1); -} - -// test range constructors and range-fill constructor -void -test03() -{ - bool test = true; - const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; - const int B[] = {7, 7, 7, 7, 7}; - const int N = sizeof(A) / sizeof(int); - const int M = sizeof(B) / sizeof(int); - - std::vector<int> v3(A, A + N); - VERIFY(std::equal(v3.begin(), v3.end(), A)); - - std::vector<int> v4(v3.begin(), v3.end()); - VERIFY(std::equal(v4.begin(), v4.end(), A)); - - std::vector<int> v5(M, 7); - VERIFY(std::equal(v5.begin(), v5.end(), B)); - VERIFY(std::equal(B, B + M, v5.begin())); - -#ifdef DEBUG_ASSERT - assert(test); -#endif -} - -// libstdc++/6513 -void test04() -{ - bool test = true; - const char* c_strings[5] = { "1", "2", "3", "4", "5" }; - std::vector<std::string> strings(c_strings, c_strings + 5); - -#ifdef DEBUG_ASSERT - assert(test); -#endif -} - - -// @fn test_default_ctor_exception_gurantee This test verifies that if -// one of the vector's contained objects throws an exception from its -// constructor while the vector is being constructed and filled with -// default values, all memory is returned to the allocator whence it -// came. -void -test_default_ctor_exception_gurantee() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - copy_tracker::reset(); - copy_constructor::throw_on(3); - allocation_tracker::resetCounts(); - - // run test - try - { - X a(7); - VERIFY(("no exception thrown", false)); - } - catch (...) - { - } - - // assert postconditions - VERIFY(("memory leak detected:", - allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal())); - - // teardown -} - -// @fn test_copy_ctor_exception_gurantee This test verifies that if -// one of the vector's contained objects throws an exception from its -// constructor while the vector is being copy constructed, all memory -// is returned to the allocator whence it came. -void -test_copy_ctor_exception_gurantee() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - allocation_tracker::resetCounts(); - { - X a(7); - copy_tracker::reset(); - copy_constructor::throw_on(3); - - // run test - try - { - X u(a); - VERIFY(("no exception thrown", false)); - } - catch (...) - { - } - } - - // assert postconditions - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -// operator=() -// -// case 1: lhs.size() > rhs.size() -// case 2: lhs.size() < rhs.size() < lhs.capacity() -// case 3: lhs.capacity() < rhs.size() -// -void -test_assignment_operator_1() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - X r(9); - X a(r.size() - 2); - copy_tracker::reset(); - allocation_tracker::resetCounts(); - - // preconditions - VERIFY(r.size() > a.size()); - - // run test - r = a; - - // assert postconditions - VERIFY(r == a); - VERIFY(allocation_tracker::allocationTotal() == 0); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -void -test_assignment_operator_2() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - X r(1); - r.reserve(17); - X a(r.size() + 7); - copy_tracker::reset(); - allocation_tracker::resetCounts(); - - // preconditions - VERIFY(r.size() < a.size()); - VERIFY(a.size() < r.capacity()); - - // run test - r = a; - - // assert postconditions - VERIFY(r == a); - VERIFY(allocation_tracker::allocationTotal() == 0); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -void -test_assignment_operator_3() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - allocation_tracker::resetCounts(); - { - X r(1); - X a(r.capacity() + 7); - copy_tracker::reset(); - - // preconditions - VERIFY(r.capacity() < a.size()); - - // run test - r = a; - - // assert postconditions - VERIFY(r == a); - } - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -void -test_assignment_operator_3_exception_guarantee() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - allocation_tracker::resetCounts(); - { - X r(1); - X a(r.capacity() + 7); - copy_tracker::reset(); - copy_constructor::throw_on(3); - - // preconditions - VERIFY(r.capacity() < a.size()); - - // run test - try - { - r = a; - VERIFY(("no exception thrown", false)); - } - catch (...) - { - } - } - - // assert postconditions - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -// fill assign() -// -// case 1: [23.2.4.1 (3)] n <= size() -// case 2: [23.2.4.1 (3)] size() < n <= capacity() -// case 3: [23.2.4.1 (3)] n > capacity() -// case 4: [23.2.4.1 (3)] n > capacity(), exception guarantees -// case 5: [23.1.1 (9)] fill assign disguised as a range assign -// -void -test_fill_assign_1() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - X a(7); - X::size_type old_size = a.size(); - X::size_type new_size = old_size - 2; - const T t; - - copy_tracker::reset(); - allocation_tracker::resetCounts(); - - // run test - a.assign(new_size, t); - - // assert postconditions - VERIFY(a.size() == new_size); - VERIFY(allocation_tracker::allocationTotal() == 0); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -void -test_fill_assign_2() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - X a(7); - a.reserve(11); - X::size_type old_size = a.size(); - X::size_type old_capacity = a.capacity(); - X::size_type new_size = old_size + 2; - const T t; - - copy_tracker::reset(); - allocation_tracker::resetCounts(); - - // assert preconditions - VERIFY(old_size < new_size); - VERIFY(new_size <= old_capacity); - - // run test - a.assign(new_size, t); - - // assert postconditions - VERIFY(a.size() == new_size); - VERIFY(allocation_tracker::allocationTotal() == 0); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -void -test_fill_assign_3() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - allocation_tracker::resetCounts(); - { - X a(7); - X::size_type old_size = a.size(); - X::size_type old_capacity = a.capacity(); - X::size_type new_size = old_capacity + 4; - const T t; - - copy_tracker::reset(); - - // assert preconditions - VERIFY(new_size > old_capacity); - - // run test - a.assign(new_size, t); - - // assert postconditions - VERIFY(a.size() == new_size); - } - - VERIFY(allocation_tracker::allocationTotal() > 0); - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -void -test_fill_assign_3_exception_guarantee() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - allocation_tracker::resetCounts(); - { - X a(7); - X::size_type old_size = a.size(); - X::size_type old_capacity = a.capacity(); - X::size_type new_size = old_capacity + 4; - const T t; - - copy_tracker::reset(); - copy_constructor::throw_on(3); - - // assert preconditions - VERIFY(new_size > old_capacity); - - // run test - try - { - a.assign(new_size, t); - VERIFY(("no exception thrown", false)); - } - catch (...) - { - } - - // assert postconditions - VERIFY(a.size() == old_size); - VERIFY(a.capacity() == old_capacity); - } - - VERIFY(allocation_tracker::allocationTotal() > 0); - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -void -test_fill_assign_4() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - X a(7); - X::size_type old_size = a.size(); - X::size_type new_size = old_size - 2; - X::size_type new_value = 117; - - copy_tracker::reset(); - allocation_tracker::resetCounts(); - - // run test - a.assign(new_size, new_value); - - // assert postconditions - VERIFY(a.size() == new_size); - VERIFY(allocation_tracker::allocationTotal() == 0); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -// range assign() -// -// case 1: [23.2.4.1 (2)] input iterator -// case 2: [23.2.4.1 (2)] forward iterator, distance(first, last) <= size() -// case 3: [23.2.4.1 (2)] -// forward iterator, size() < distance(first, last) <= capacity() -// case 4: [23.2.4.1 (2)] forward iterator, distance(first, last) > capacity() -// case 5: [23.2.4.1 (2)] -// forward iterator, distance(first, last) > capacity(), -// exception guarantees -void -test_range_assign_1() -{ - // @TODO -} - -void -test_range_assign_2() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - X a(7); - X b(3); - X::size_type old_size = a.size(); - - copy_tracker::reset(); - allocation_tracker::resetCounts(); - - // assert preconditions - VERIFY(b.size() < a.capacity()); - - // run test - a.assign(b.begin(), b.end()); - - // assert postconditions - VERIFY(a.size() == b.size()); - VERIFY(a == b); - VERIFY(allocation_tracker::allocationTotal() == 0); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -void -test_range_assign_3() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - X a(7); - a.reserve(a.size() + 7); - X b(a.size() + 3); - X::size_type old_size = a.size(); - - copy_tracker::reset(); - allocation_tracker::resetCounts(); - - // assert preconditions - VERIFY(a.size() < b.size()); - VERIFY(b.size() < a.capacity()); - - // run test - a.assign(b.begin(), b.end()); - - // assert postconditions - VERIFY(a.size() == b.size()); - VERIFY(a == b); - VERIFY(allocation_tracker::allocationTotal() == 0); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -void -test_range_assign_4() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - allocation_tracker::resetCounts(); - { - X a(7); - X b(a.capacity() + 7); - X::size_type old_size = a.size(); - - copy_tracker::reset(); - - // assert preconditions - VERIFY(b.size() > a.capacity()); - - // run test - a.assign(b.begin(), b.end()); - - // assert postconditions - VERIFY(a.size() == b.size()); - VERIFY(a == b); - } - VERIFY(allocation_tracker::allocationTotal() > 0); - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - -void -test_range_assign_4_exception_guarantee() -{ - // setup - bool test = true; - typedef copy_tracker T; - typedef std::vector<T, tracker_alloc<T> > X; - - allocation_tracker::resetCounts(); - { - X a(7); - X b(a.capacity() + 7); - X::size_type old_size = a.size(); - - copy_tracker::reset(); - copy_constructor::throw_on(3); - - // assert preconditions - VERIFY(b.size() > a.capacity()); - - // run test - try - { - a.assign(b.begin(), b.end()); - VERIFY(("no exception thrown", false)); - } - catch (...) - { - } - } - - // assert postconditions - VERIFY(allocation_tracker::allocationTotal() > 0); - VERIFY(allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()); - - // teardown - copy_tracker::reset(); - allocation_tracker::resetCounts(); -} - - -int main() -{ - test01(); - test02(); - test03(); - test04(); - test_default_ctor_exception_gurantee(); - test_copy_ctor_exception_gurantee(); - test_assignment_operator_1(); - test_assignment_operator_2(); - test_assignment_operator_3(); - test_assignment_operator_3_exception_guarantee(); - test_fill_assign_1(); - test_fill_assign_2(); - test_fill_assign_3(); - test_fill_assign_3_exception_guarantee(); - test_fill_assign_4(); - test_range_assign_1(); - test_range_assign_2(); - test_range_assign_3(); - test_range_assign_4(); - test_range_assign_4_exception_guarantee(); - - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/vector_modifiers.cc b/libstdc++-v3/testsuite/23_containers/vector_modifiers.cc deleted file mode 100644 index 1f0b338c3b7..00000000000 --- a/libstdc++-v3/testsuite/23_containers/vector_modifiers.cc +++ /dev/null @@ -1,88 +0,0 @@ -// 1999-11-09 bkoz - -// Copyright (C) 1999, 2001 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 23.2.4.3 vector modifiers - -#include <vector> -#include "testsuite_hooks.h" - -bool test = true; - -template<typename T> - struct A { }; - -struct B { }; - -// vector::insert(iterator, inputiterator first, inputiterator last) -void -test01() -{ - // POD types - typedef std::vector<int> vec_POD; - vec_POD vec01; - int i01 = 5; - int* pi01 = &i01; - vec01.insert(vec01.begin(), pi01, pi01 + 1); - - // non POD types - typedef std::vector< A<B> > vec_nonPOD; - vec_nonPOD vec02; - A<B> np01; - A<B>* pnp01 = &np01; - vec02.insert(vec02.begin(), pnp01, pnp01 + 1); -} - -// test the assign() function -void -test03() -{ - const int K = 417; - const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; - const int B[] = {K, K, K, K, K}; - const int N = sizeof(A) / sizeof(int); - const int M = sizeof(B) / sizeof(int); - bool test = true; - - // assign from pointer range - std::vector<int> v3; - v3.assign(A, A + N); - VERIFY(std::equal(v3.begin(), v3.end(), A)); - VERIFY(v3.size() == N); - - // assign from iterator range - std::vector<int> v4; - v4.assign(v3.begin(), v3.end()); - VERIFY(std::equal(v4.begin(), v4.end(), A)); - VERIFY(std::equal(A, A + N, v4.begin())); - - // assign from initializer range with resize - v4.assign(M, K); - VERIFY(std::equal(v4.begin(), v4.end(), B)); - VERIFY(std::equal(B, B + M, v4.begin())); - VERIFY((v4.size() == M) && (M != N)); -} - -int main() -{ - test01(); - test03(); - - return !test; -} diff --git a/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc b/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc index 72758eed308..2f97f8973cf 100644 --- a/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc @@ -1,6 +1,6 @@ // 1999-06-28 bkoz -// Copyright (C) 1999, 2001 Free Software Foundation, Inc. +// Copyright (C) 1999, 2001, 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 @@ -133,11 +133,6 @@ bool test02(void) c = *++istrb_it28; VERIFY( c == slit01[++i] ); } - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } diff --git a/libstdc++-v3/testsuite/24_iterators/iterator.cc b/libstdc++-v3/testsuite/24_iterators/iterator.cc index 7acd1ec26e1..db8b63369a5 100644 --- a/libstdc++-v3/testsuite/24_iterators/iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/iterator.cc @@ -2,7 +2,7 @@ // 24.3.1 Iterator traits // (basic_string and vector implementations) // -// Copyright (C) 1999 Philip Martin +// Copyright (C) 1999, 2003 Free Software Foundation, Inc. // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or @@ -603,9 +603,6 @@ main(int argc, char **argv) failures += test6642(); -#ifdef DEBUG_ASSERT - assert (failures == 0); -#endif - + VERIFY(failures == 0); return 0; } diff --git a/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc b/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc index 23ddee57c9f..6fbfe6d5144 100644 --- a/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc @@ -1,6 +1,6 @@ // 2001-04-30 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 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 @@ -106,11 +106,6 @@ bool test02(void) tmp = ostrs00.str(); VERIFY ( tmp != str01 ); VERIFY ( tmp != str02 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc index f6bf336597c..a3a23050165 100644 --- a/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc +++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc @@ -1,4 +1,5 @@ -// Copyright (C) 2000 Free Software Foundation, Inc. +// { dg-do compile } +// 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 @@ -29,17 +30,3 @@ void bar(foo* a, foo* b, foo& x) { foo* c = std::lower_bound(a, b, x); } - -void test01() -{ - bool test = true; - -#ifdef DEBUG_ASSERT - assert(test); -#endif -} - -int main() -{ - return 0; -} diff --git a/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc b/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc index d304aa47b38..f285fb70fec 100644 --- a/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc +++ b/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc @@ -1,7 +1,7 @@ // 2000-02-10 // Petter Urkedal <petter@matfys.lth.se> -// Copyright (C) 2000 Free Software Foundation +// Copyright (C) 2000, 2003 Free Software Foundation // // 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 @@ -47,10 +47,6 @@ test_good(std::string str, R x, R y) VERIFY( flteq(z.real(), x) ); VERIFY( flteq(z.imag(), y) ); VERIFY( ch == '#' ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif return 0; } @@ -58,12 +54,11 @@ template<typename R> int test_fail(std::string str) { + bool test = true; std::complex<R> z; std::istringstream iss(str); iss >> z; -#ifdef DEBUG_ASSERT - assert(iss.fail() && !iss.bad()); -#endif + VERIFY( iss.fail() && !iss.bad() ); return 0; } @@ -113,8 +108,8 @@ void test02() bool test = true; // Construct locale with specialized facets. - typedef gnu_sstream::__numput_type numput_type; - typedef gnu_sstream::__numget_type numget_type; + typedef gnu_sstream::__num_put_type numput_type; + typedef gnu_sstream::__num_get_type numget_type; std::locale loc_c = std::locale::classic(); std::locale loc_1(loc_c, new numput_type); std::locale loc_2(loc_1, new numget_type); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/2.cc index af92af0ff11..5005c17f4b4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/2.cc @@ -33,7 +33,7 @@ namespace test { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; typedef short type_t; template class basic_filebuf<type_t, char_traits<type_t> >; template class basic_filebuf<pod_char, char_traits<pod_char> >; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc index de6e1339a0e..434f1e2312d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc @@ -42,7 +42,7 @@ void test02() VERIFY( p != bad); // 1 "if file is not positioned at its beginning" fails... - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); locale ret = ob.pubimbue(loc_de); VERIFY( ob.getloc() == loc ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc index 5a43a2a4a2f..efe8cbbeea0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc @@ -34,10 +34,10 @@ void test07() std::filebuf ob; VERIFY( ob.getloc() == loc ); - locale::global(__gnu_cxx_test::try_named_locale("en_US")); + locale::global(__gnu_test::try_named_locale("en_US")); VERIFY( ob.getloc() == loc ); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); locale ret = ob.pubimbue(loc_de); VERIFY( ob.getloc() == loc_de ); VERIFY( ret == loc ); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc index 4acff8123e7..7fe0d4cc65b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc @@ -42,7 +42,7 @@ void test02() VERIFY( p != bad); // 1 "if file is not positioned at its beginning" fails... - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); locale ret = ob.pubimbue(loc_de); VERIFY( ob.getloc() == loc ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc index 1b083fd023a..8a76a997c9a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc @@ -34,10 +34,10 @@ void test07() std::wfilebuf ob; VERIFY( ob.getloc() == loc ); - locale::global(__gnu_cxx_test::try_named_locale("en_US")); + locale::global(__gnu_test::try_named_locale("en_US")); VERIFY( ob.getloc() == loc ); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); locale ret = ob.pubimbue(loc_de); VERIFY( ob.getloc() == loc_de ); VERIFY( ret == loc ); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc index 185fb1ed658..fc96a047fdf 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc @@ -28,7 +28,7 @@ void test01() bool test = true; wfilebuf fb; - locale loc(__gnu_cxx_test::try_named_locale("en_US.UTF-8")); + locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); fb.pubimbue(loc); fb.pubsetbuf(0, 0); fb.open("tmp_11305-1", ios_base::out); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc index f50f59218cd..2415a2edcfb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc @@ -28,7 +28,7 @@ void test02() bool test = true; wfilebuf fb; - locale loc(__gnu_cxx_test::try_named_locale("en_US.UTF-8")); + locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); fb.pubimbue(loc); fb.pubsetbuf(0, 0); fb.open("tmp_11305-2", ios_base::out); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc index 86153ea1ff0..fc0092df09c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc @@ -28,7 +28,7 @@ void test03() bool test = true; wfilebuf fb; - locale loc(__gnu_cxx_test::try_named_locale("en_US.UTF-8")); + locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); fb.pubimbue(loc); fb.open("tmp_11305-3", ios_base::out); wfilebuf::int_type n1 = fb.sputc(L'a'); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc index b923a8a9e70..1886f8e630f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc @@ -28,7 +28,7 @@ void test04() bool test = true; wfilebuf fb; - locale loc(__gnu_cxx_test::try_named_locale("en_US.UTF-8")); + locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); fb.pubimbue(loc); fb.open("tmp_11405-4", ios_base::out); wfilebuf::int_type n1 = fb.sputc(L'i'); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc index e03da5f2064..f1b30d8de1a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "sgetc.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc index 451518c1f23..f649ef87dc6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc @@ -33,7 +33,7 @@ const char name_03[] = "tmp_sbumpc_1io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc index 69559a9a69c..1a43f327dca 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc @@ -32,7 +32,7 @@ const char name_02[] = "tmp_sbumpc_1out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc index d0f256ee10c..e06e0625efb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "sgetc.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc index ef1f28f786e..54a3047ad00 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc @@ -33,7 +33,7 @@ const char name_03[] = "tmp_sbumpc_2io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc index 1d8df086bcc..a650e8eab96 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc @@ -32,7 +32,7 @@ const char name_02[] = "tmp_sbumpc_2out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc index 62173d0c843..2da27f13dcd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekoff.txt"; void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc index 00872f4117d..a655fd81ab7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekoff-1io.tst"; void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc index 39abdac89d3..40c62aafe25 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekoff-1out.tst"; void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc index 0dc97ded28a..a1adf32b8be 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekoff.txt"; void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc index 8be6f5e7adf..fd30a33007d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekoff-2io.tst"; void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc index 4a39a2164f3..786fb245a16 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekoff-2out.tst"; void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc new file mode 100644 index 00000000000..f3f3cc712d4 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc @@ -0,0 +1,136 @@ +// 2003-09-08 Petur Runolfsson <peturr02@ru.is> + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.8.1.4 Overridden virtual functions + +#include <fstream> +#include <locale> +#include <cstdio> +#include <testsuite_hooks.h> + +// Check that basic_filebuf::seekoff handles UTF-8 when open for input. +void test01() +{ + using namespace std; + typedef wfilebuf::pos_type pos_type; + typedef wfilebuf::int_type int_type; + + bool test = true; + const char name[] = "tmp_seekoff-1.tst"; + const int_type eof = wfilebuf::traits_type::eof(); + + const char cstr[] = + "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" + "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" + "'()*+,-./0123456789:;<=>?@}~\x7f\xc2\x80\xc2\x81\xc2\x82\xc2" + "\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a" + "\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2" + "\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99" + "\xc2\x9a\xc2\x9b\xc2\x9c\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3" + "\xbe\xc3\xbf\xc4\x80\xc4\x81\xc4\x82\xc4\x83\xc4\x84\xc4\x85" + "\xc4\x86\xc4\x87\xc4\x88\xc4\x89\xc4\x8a\xc4\x8b\xc4\x8c\xc4" + "\x8d\xc4\x8e\xc4\x8f\xc4\x90\xc4\x91\xc4\x92\xc4\x93\xc4\x94" + "\xc4\x95\xc4\x96\xc4\x97\xc4\x98\xc4\x99\xdf\xb8\xdf\xb9\xdf" + "\xba\xdf\xbb\xdf\xbc\xdf\xbd\xdf\xbe\xdf\xbf\xe0\xa0\x80\xe0" + "\xa0\x81\xe0\xa0\x82\xe0\xa0\x83\xe0\xa0\x84\xe0\xa0\x85\xe0" + "\xa0\x86\xe0\xa0\x87\xe0\xa0\x88\xe0\xa0\x89\xe0\xa0\x8a\xe0" + "\xa0\x8b\xe0\xa0\x8c\xe0\xa0\x8d\xe0\xa0\x8e\xe0\xa0\x8f\xe0" + "\xa0\x90\xe0\xa0\x91\xe0\xa0\x92\xe0\xa0\x93\xe0\xa0\x94\xe0" + "\xa0\x95\xe0\xa0\x96\xe0\xa0\x97\x1\x2\x4\x8\x10\x20@\xc2\x80" + "\xc4\x80\xc8\x80\xd0\x80\xe0\xa0\x80\xe1\x80\x80\xe2\x80\x80" + "\xe4\x80\x80\xe8\x80\x80\xf0\x90\x80\x80\xf0\xa0\x80\x80\xf1" + "\x80\x80\x80\xf2\x80\x80\x80\xf4\x80\x80\x80\xf8\x88\x80\x80" + "\x80\xf8\x90\x80\x80\x80\xf8\xa0\x80\x80\x80\xf9\x80\x80\x80" + "\x80\xfa\x80\x80\x80\x80\xfc\x84\x80\x80\x80\x80\xfc\x88\x80" + "\x80\x80\x80\xfc\x90\x80\x80\x80\x80\xfc\xa0\x80\x80\x80\x80" + "\xfd\x80\x80\x80\x80\x80"; + + const wchar_t wstr[] = { + 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, + 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, L'!', + L'"', L'#', L'$', L'%', L'&', L'\'', L'(', L')', L'*', L'+', + L',', L'-', L'.', L'/', L'0', L'1', L'2', L'3', L'4', L'5', + L'6', L'7', L'8', L'9', L':', L';', L'<', L'=', L'>', L'?', + L'@', L'}', L'~', 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, + 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9a, 0x9b, 0x9c, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x100, + 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, + 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, + 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x7f8, 0x7f9, + 0x7fa, 0x7fb, 0x7fc, 0x7fd, 0x7fe, 0x7ff, 0x800, 0x801, 0x802, + 0x803, 0x804, 0x805, 0x806, 0x807, 0x808, 0x809, 0x80a, 0x80b, + 0x80c, 0x80d, 0x80e, 0x80f, 0x810, 0x811, 0x812, 0x813, 0x814, + 0x815, 0x816, 0x817, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, L'@', + 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, + 0x10000, 0x20000, 0x40000, 0x80000, 0x100000, 0x200000, 0x400000, + 0x800000, 0x1000000, 0x2000000, 0x4000000, 0x8000000, 0x10000000, + 0x20000000, 0x40000000, 0x0 + }; + + const size_t clen = sizeof(cstr) / sizeof(cstr[0]); + const size_t wlen = sizeof(wstr) / sizeof(wstr[0]); + + const int loops = 2 * BUFSIZ / wlen; + locale loc = __gnu_test::try_named_locale("se_NO.UTF-8"); + + FILE* file = fopen(name, "w"); + for (int i = 0; i < loops; ++i) + fwrite(cstr, 1, clen, file); + fclose(file); + + wfilebuf fb; + fb.pubimbue(loc); + fb.open(name, ios_base::in); + + pos_type p1 = fb.pubseekoff(0, ios_base::cur); + pos_type end = fb.pubseekoff(0, ios_base::end); + pos_type beg = fb.pubseekoff(0, ios_base::beg); + VERIFY( p1 == beg ); + + const size_t limit = wlen * loops; + for (size_t index = 0; index < limit; ++index) + { + // Call seekoff at pseudo-random intervals. + if (index % 5 == 0 || index % 7 == 0) + { + pos_type p2 = fb.pubseekoff(0, ios_base::cur); + VERIFY( p2 != pos_type(-1) ); + } + int_type c1 = fb.sbumpc(); + VERIFY( c1 != eof ); + VERIFY( c1 == wstr[index % wlen] ); + } + + pos_type p3 = fb.pubseekoff(0, ios_base::cur); + VERIFY( p3 == end ); + + int_type c2 = fb.sbumpc(); + VERIFY( c2 == eof ); + + fb.close(); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc new file mode 100644 index 00000000000..9ad978bee9f --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc @@ -0,0 +1,89 @@ +// 2003-09-08 Petur Runolfsson <peturr02@ru.is> + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.8.1.4 Overridden virtual functions + +#include <fstream> +#include <locale> +#include <cstdio> +#include <testsuite_hooks.h> + +// Check that basic_filebuf::seekoff handles UTF-8 when open for input and +// output. +void test02() +{ + using namespace std; + typedef wfilebuf::int_type int_type; + bool test = true; + const char name[] = "tmp_seekoff-2.tst"; + + locale loc = __gnu_test::try_named_locale("se_NO.UTF-8"); + + const size_t size = 10; + wchar_t buf[size]; + streamsize n; + + wfilebuf fb; + fb.pubimbue(loc); + fb.open(name, ios_base::in | ios_base::out | ios_base::trunc); + + n = fb.sputn(L"\xa0st", 3); + VERIFY( n == 3 ); + + fb.pubseekoff(0, ios_base::beg); + n = fb.sgetn(buf, 2); + VERIFY( n == 2 ); + VERIFY( !wmemcmp(buf, L"\xa0s", 2) ); + + fb.pubseekoff(0, ios_base::cur); + n = fb.sputn(L"\xb2R", 2); + VERIFY( n == 2 ); + + fb.pubseekoff(0, ios_base::beg); + n = fb.sgetn(buf, size); + VERIFY( n == 4 ); + VERIFY( !wmemcmp(buf, L"\xa0s\xb2R", 4) ); + + fb.pubseekoff(0, ios_base::beg); + n = fb.sputn(L"\x90m\x92n\x94", 5); + VERIFY( n == 5 ); + + fb.pubseekoff(0, ios_base::beg); + n = fb.sgetn(buf, 2); + VERIFY( n == 2 ); + VERIFY( !wmemcmp(buf, L"\x90m", 2) ); + + fb.pubseekoff(0, ios_base::end); + n = fb.sputn(L"I\xbfJ", 3); + VERIFY( n == 3 ); + + fb.pubseekoff(0, ios_base::beg); + n = fb.sgetn(buf, size); + VERIFY( n == 8 ); + VERIFY( !wmemcmp(buf, L"\x90m\x92n\x94I\xbfJ", 8) ); + + fb.close(); +} + +int main() +{ + test02(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc index 9464eefc1d3..3230e121ed2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekpos.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc index 009886032aa..ecaa19fb2d8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekpos-1io.tst"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc index b0008f3cb43..e3c9ac3f3f3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekpos-1out.tst"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc index ec1dca5abb8..2fde41aed9e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekpos.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc index f883cf9ef3a..71fb68bf3ff 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekpos-2io.tst"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc index 9531e01c609..ee8c65f5154 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc @@ -32,7 +32,7 @@ const char name_01[] = "seekpos-2out.tst"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc index 2927991c060..f7a65870df4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc @@ -34,7 +34,9 @@ void test02() filebuf fbuf01; fbuf01.open("tmp", ios_base::out); - fbuf01.pubsetbuf(buf, strlitsize); + // NB: +2 otherwise sputn is optimized to a direct write, + // bypassing the buffer. + fbuf01.pubsetbuf(buf, strlitsize + 2); fbuf01.sputn(strlit, strlitsize); VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc index 7ae7cdccee4..2a1012d812e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc @@ -33,7 +33,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc index 7a754768002..ca92295456e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc @@ -34,7 +34,7 @@ const char name_03[] = "tmp_sgetc_1io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc index 41e18e435e4..cdd9bf47051 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc @@ -33,7 +33,7 @@ const char name_02[] = "tmp_sgetc_1out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc index 979a3fd3845..3c539de1840 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc @@ -33,7 +33,7 @@ const char name_01[] = "sgetc.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc index e12ef3455cd..09b6e8a7f0a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc @@ -34,7 +34,7 @@ const char name_03[] = "tmp_sgetc_2io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc index 491c028c281..1db40febda2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc @@ -33,7 +33,7 @@ const char name_02[] = "tmp_sgetc_2out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc index 0f17624c58c..523bdeac34b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc @@ -33,7 +33,7 @@ const char name_01[] = "sgetn.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc index e1d9a38f75e..9942a822b26 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc @@ -34,7 +34,7 @@ const char name_03[] = "tmp_sgetn_1io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc index eb710f2d056..1039c397303 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc @@ -33,7 +33,7 @@ const char name_02[] = "tmp_sgetn_1out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc index 62c5a0f93f0..451e6dcfee3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc @@ -33,7 +33,7 @@ const char name_01[] = "sgetn.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc index 30ccee29f2e..a3fd754e36d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc @@ -34,7 +34,7 @@ const char name_03[] = "tmp_sgetn_2io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc index 99a907493d4..c0e6be07443 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc @@ -33,7 +33,7 @@ const char name_02[] = "tmp_sgetn_2out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc index 437a7fb6535..d2d9d3b1c55 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc @@ -34,7 +34,7 @@ const char name_03[] = "tmp_snextc_1io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc index aa5000d987a..973d89b41f3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc @@ -34,7 +34,7 @@ const char name_03[] = "tmp_snextc_1io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc index 118383a978e..fd7124a1448 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc @@ -34,7 +34,7 @@ const char name_03[] = "tmp_snextc_1io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc index 8c563ad41e8..fc89dd5e644 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "sgetc.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc index a044c6d4f41..8c2c0e868e5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc @@ -33,7 +33,7 @@ const char name_03[] = "tmp_snextc_2io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc index 8af126337f6..816c3f85406 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc @@ -32,7 +32,7 @@ const char name_02[] = "tmp_snextc_2out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc index bd6e2055eff..1d216e8ec20 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc @@ -33,7 +33,7 @@ const char name_01[] = "sgetc.txt"; // file with data in it void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc index f43191cc730..d867e5b87a2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc @@ -32,7 +32,7 @@ const char name_01[] = "tmp_sputbackc_1io.tst"; // empty file, need to create void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc index 83d57e2fc61..5b5dbb557c1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc @@ -33,7 +33,7 @@ const char name_01[] = "tmp_sputbackc_1out.tst"; // empty file, need to create void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc index 5deafbc7da7..a9267cf0034 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc @@ -33,7 +33,7 @@ const char name_01[] = "sgetc.txt"; // file with data in it void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc index 093c663db3a..e7166106d59 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc @@ -32,7 +32,7 @@ const char name_01[] = "tmp_sputbackc_2io.tst"; // empty file, need to create void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc index 52f041d8af9..2ff9a6c5aad 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc @@ -33,7 +33,7 @@ const char name_01[] = "tmp_sputbackc_2out.tst"; // empty file, need to create void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc index 25d9ee0ce8d..31b176bcbf6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc index 72350c0a8b8..275def18397 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc @@ -33,7 +33,7 @@ const char name_03[] = "tmp_sputc_1io.tst"; void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc index f4b5b73f0e7..09086b07d60 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc @@ -32,7 +32,7 @@ const char name_02[] = "tmp_sputc_1out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc index 85ab4efbeff..680e058a904 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc index 373a6a8cba5..abbdea55fbd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc @@ -33,7 +33,7 @@ const char name_03[] = "tmp_sputc_2io.tst"; void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc index 96e12954a97..78e2b4eb3d6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc @@ -32,7 +32,7 @@ const char name_02[] = "tmp_sputc_2out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc index 235fce07e22..4888f23bb16 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc index 9ec3d259ca8..7f32662d315 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc @@ -33,7 +33,7 @@ const char name_03[] = "tmp_sputn_1io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc index f98bcd745b1..d17db7abf3b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc @@ -32,7 +32,7 @@ const char name_02[] = "tmp_sputn_1out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc index 8972b5efcb8..a9f188cf410 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc @@ -32,7 +32,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc index c6109c2f100..2dc0204c94e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc @@ -33,7 +33,7 @@ const char name_03[] = "tmp_sputn_2io.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc index 81cd506aba1..26046b17a35 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc @@ -32,7 +32,7 @@ const char name_02[] = "tmp_sputn_2out.tst"; // empty file, need to create void test05() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc index bf753cabcb6..7e3b9c07621 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc @@ -33,7 +33,7 @@ const char name_01[] = "sgetc.txt"; // file with data in it void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc index 78464834bec..5cbaf1b8db2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc @@ -32,7 +32,7 @@ const char name_01[] = "tmp_sungetc_1io.tst"; // empty file, need to create void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc index 99cf7ed383c..daefb70b997 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc @@ -33,7 +33,7 @@ const char name_01[] = "tmp_sungetc_1out.tst"; // empty file, need to create void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc index e0814fdddc0..d35a3f2ae8b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc @@ -33,7 +33,7 @@ const char name_01[] = "sgetc.txt"; // file with data in it void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc index 24d015c90e7..b45ba2676bf 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc @@ -32,7 +32,7 @@ const char name_01[] = "tmp_sungetc_2io.tst"; // empty file, need to create void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc index d6cd79f5c6e..f08df15e7b8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc @@ -33,7 +33,7 @@ const char name_01[] = "tmp_sungetc_2out.tst"; // empty file, need to create void test01() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc new file mode 100644 index 00000000000..d55b89c90ac --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc @@ -0,0 +1,110 @@ +// 2003-09-04 Petur Runolfsson <peturr02@ru.is> + +// Copyright (C) 2003 Free Software Foundation +// +// 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.8.1.4 Overridden virtual functions + +#include <locale> +#include <fstream> +#include <cstdio> +#include <testsuite_hooks.h> + +// Test handing of UTF-8 in basic_filebuf::underflow +void test01() +{ + using namespace std; + bool test = true; + const char name[] = "tmp_underflow-1.tst"; + + const char cstr[] = + "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" + "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" + "'()*+,-./0123456789:;<=>?@}~\x7f\xc2\x80\xc2\x81\xc2\x82\xc2" + "\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a" + "\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2" + "\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99" + "\xc2\x9a\xc2\x9b\xc2\x9c\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3" + "\xbe\xc3\xbf\xc4\x80\xc4\x81\xc4\x82\xc4\x83\xc4\x84\xc4\x85" + "\xc4\x86\xc4\x87\xc4\x88\xc4\x89\xc4\x8a\xc4\x8b\xc4\x8c\xc4" + "\x8d\xc4\x8e\xc4\x8f\xc4\x90\xc4\x91\xc4\x92\xc4\x93\xc4\x94" + "\xc4\x95\xc4\x96\xc4\x97\xc4\x98\xc4\x99\xdf\xb8\xdf\xb9\xdf" + "\xba\xdf\xbb\xdf\xbc\xdf\xbd\xdf\xbe\xdf\xbf\xe0\xa0\x80\xe0" + "\xa0\x81\xe0\xa0\x82\xe0\xa0\x83\xe0\xa0\x84\xe0\xa0\x85\xe0" + "\xa0\x86\xe0\xa0\x87\xe0\xa0\x88\xe0\xa0\x89\xe0\xa0\x8a\xe0" + "\xa0\x8b\xe0\xa0\x8c\xe0\xa0\x8d\xe0\xa0\x8e\xe0\xa0\x8f\xe0" + "\xa0\x90\xe0\xa0\x91\xe0\xa0\x92\xe0\xa0\x93\xe0\xa0\x94\xe0" + "\xa0\x95\xe0\xa0\x96\xe0\xa0\x97\x1\x2\x4\x8\x10\x20@\xc2\x80" + "\xc4\x80\xc8\x80\xd0\x80\xe0\xa0\x80\xe1\x80\x80\xe2\x80\x80" + "\xe4\x80\x80\xe8\x80\x80\xf0\x90\x80\x80\xf0\xa0\x80\x80\xf1" + "\x80\x80\x80\xf2\x80\x80\x80\xf4\x80\x80\x80\xf8\x88\x80\x80" + "\x80\xf8\x90\x80\x80\x80\xf8\xa0\x80\x80\x80\xf9\x80\x80\x80" + "\x80\xfa\x80\x80\x80\x80\xfc\x84\x80\x80\x80\x80\xfc\x88\x80" + "\x80\x80\x80\xfc\x90\x80\x80\x80\x80\xfc\xa0\x80\x80\x80\x80" + "\xfd\x80\x80\x80\x80\x80"; + + const wchar_t wstr[] = { + 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, + 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, L'!', + L'"', L'#', L'$', L'%', L'&', L'\'', L'(', L')', L'*', L'+', + L',', L'-', L'.', L'/', L'0', L'1', L'2', L'3', L'4', L'5', + L'6', L'7', L'8', L'9', L':', L';', L'<', L'=', L'>', L'?', + L'@', L'}', L'~', 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, + 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9a, 0x9b, 0x9c, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x100, + 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, + 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, + 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x7f8, 0x7f9, + 0x7fa, 0x7fb, 0x7fc, 0x7fd, 0x7fe, 0x7ff, 0x800, 0x801, 0x802, + 0x803, 0x804, 0x805, 0x806, 0x807, 0x808, 0x809, 0x80a, 0x80b, + 0x80c, 0x80d, 0x80e, 0x80f, 0x810, 0x811, 0x812, 0x813, 0x814, + 0x815, 0x816, 0x817, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, L'@', + 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, + 0x10000, 0x20000, 0x40000, 0x80000, 0x100000, 0x200000, 0x400000, + 0x800000, 0x1000000, 0x2000000, 0x4000000, 0x8000000, 0x10000000, + 0x20000000, 0x40000000, 0x0 + }; + + const size_t clen = sizeof(cstr) / sizeof(cstr[0]); + const size_t wlen = sizeof(wstr) / sizeof(wstr[0]); + + locale loc = __gnu_test::try_named_locale("se_NO.UTF-8"); + + FILE* file = fopen(name, "w"); + fwrite(cstr, 1, clen, file); + fclose(file); + + wchar_t wbuf[wlen + 1]; + + wfilebuf fb; + fb.pubimbue(loc); + fb.open(name, ios_base::in); + streamsize n = fb.sgetn(wbuf, wlen + 1); + fb.close(); + + VERIFY( n == wlen ); + VERIFY( !wmemcmp(wbuf, wstr, wlen) ); +} + +int main () +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc index c4866ef3d97..d0753650d12 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc @@ -34,7 +34,7 @@ void test01() fbout.close(); wfilebuf fbin; - locale loc(__gnu_cxx_test::try_named_locale("en_US.UTF-8")); + locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); fbin.pubimbue(loc); fbin.open(name_01, ios_base::in); VERIFY( fbin.sbumpc() == L'a' ); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc index 90dfb8fd1fd..1717f2a5aeb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc @@ -35,7 +35,7 @@ void test02() fbout.close(); wfilebuf fbin; - locale loc(__gnu_cxx_test::try_named_locale("en_US.UTF-8")); + locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); fbin.pubimbue(loc); fbin.open(name_02, ios_base::in); VERIFY( fbin.sbumpc() == L'a' ); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc index c4b48597919..c23cb56f26b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc @@ -34,7 +34,7 @@ void test03() fbout.close(); wfilebuf fbin; - locale loc(__gnu_cxx_test::try_named_locale("en_US.UTF-8")); + locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); fbin.pubimbue(loc); fbin.pubsetbuf(0, 0); fbin.open(name_03, ios_base::in); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc index 00d1edc2f05..ec2f0f89245 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc @@ -35,7 +35,7 @@ void test04() fbout.close(); wfilebuf fbin; - locale loc(__gnu_cxx_test::try_named_locale("en_US.UTF-8")); + locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); fbin.pubimbue(loc); fbin.pubsetbuf(0, 0); fbin.open(name_04, ios_base::in); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc new file mode 100644 index 00000000000..77616ed5d91 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc @@ -0,0 +1,111 @@ +// 2003-09-04 Petur Runolfsson <peturr02@ru.is> + +// Copyright (C) 2003 Free Software Foundation +// +// 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.8.1.4 Overridden virtual functions + +#include <locale> +#include <fstream> +#include <cstdio> +#include <testsuite_hooks.h> + +// Test handing of UTF-8 in unbuffered basic_filebuf::underflow +void test02() +{ + using namespace std; + bool test = true; + const char name[] = "tmp_underflow-2.tst"; + + const char cstr[] = + "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" + "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" + "'()*+,-./0123456789:;<=>?@}~\x7f\xc2\x80\xc2\x81\xc2\x82\xc2" + "\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a" + "\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2" + "\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99" + "\xc2\x9a\xc2\x9b\xc2\x9c\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3" + "\xbe\xc3\xbf\xc4\x80\xc4\x81\xc4\x82\xc4\x83\xc4\x84\xc4\x85" + "\xc4\x86\xc4\x87\xc4\x88\xc4\x89\xc4\x8a\xc4\x8b\xc4\x8c\xc4" + "\x8d\xc4\x8e\xc4\x8f\xc4\x90\xc4\x91\xc4\x92\xc4\x93\xc4\x94" + "\xc4\x95\xc4\x96\xc4\x97\xc4\x98\xc4\x99\xdf\xb8\xdf\xb9\xdf" + "\xba\xdf\xbb\xdf\xbc\xdf\xbd\xdf\xbe\xdf\xbf\xe0\xa0\x80\xe0" + "\xa0\x81\xe0\xa0\x82\xe0\xa0\x83\xe0\xa0\x84\xe0\xa0\x85\xe0" + "\xa0\x86\xe0\xa0\x87\xe0\xa0\x88\xe0\xa0\x89\xe0\xa0\x8a\xe0" + "\xa0\x8b\xe0\xa0\x8c\xe0\xa0\x8d\xe0\xa0\x8e\xe0\xa0\x8f\xe0" + "\xa0\x90\xe0\xa0\x91\xe0\xa0\x92\xe0\xa0\x93\xe0\xa0\x94\xe0" + "\xa0\x95\xe0\xa0\x96\xe0\xa0\x97\x1\x2\x4\x8\x10\x20@\xc2\x80" + "\xc4\x80\xc8\x80\xd0\x80\xe0\xa0\x80\xe1\x80\x80\xe2\x80\x80" + "\xe4\x80\x80\xe8\x80\x80\xf0\x90\x80\x80\xf0\xa0\x80\x80\xf1" + "\x80\x80\x80\xf2\x80\x80\x80\xf4\x80\x80\x80\xf8\x88\x80\x80" + "\x80\xf8\x90\x80\x80\x80\xf8\xa0\x80\x80\x80\xf9\x80\x80\x80" + "\x80\xfa\x80\x80\x80\x80\xfc\x84\x80\x80\x80\x80\xfc\x88\x80" + "\x80\x80\x80\xfc\x90\x80\x80\x80\x80\xfc\xa0\x80\x80\x80\x80" + "\xfd\x80\x80\x80\x80\x80"; + + const wchar_t wstr[] = { + 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, + 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, L'!', + L'"', L'#', L'$', L'%', L'&', L'\'', L'(', L')', L'*', L'+', + L',', L'-', L'.', L'/', L'0', L'1', L'2', L'3', L'4', L'5', + L'6', L'7', L'8', L'9', L':', L';', L'<', L'=', L'>', L'?', + L'@', L'}', L'~', 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, + 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9a, 0x9b, 0x9c, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x100, + 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, + 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, + 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x7f8, 0x7f9, + 0x7fa, 0x7fb, 0x7fc, 0x7fd, 0x7fe, 0x7ff, 0x800, 0x801, 0x802, + 0x803, 0x804, 0x805, 0x806, 0x807, 0x808, 0x809, 0x80a, 0x80b, + 0x80c, 0x80d, 0x80e, 0x80f, 0x810, 0x811, 0x812, 0x813, 0x814, + 0x815, 0x816, 0x817, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, L'@', + 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, + 0x10000, 0x20000, 0x40000, 0x80000, 0x100000, 0x200000, 0x400000, + 0x800000, 0x1000000, 0x2000000, 0x4000000, 0x8000000, 0x10000000, + 0x20000000, 0x40000000, 0x0 + }; + + const size_t clen = sizeof(cstr) / sizeof(cstr[0]); + const size_t wlen = sizeof(wstr) / sizeof(wstr[0]); + + locale loc = __gnu_test::try_named_locale("se_NO.UTF-8"); + + FILE* file = fopen(name, "w"); + fwrite(cstr, 1, clen, file); + fclose(file); + + wchar_t wbuf[wlen + 1]; + + wfilebuf fb; + fb.pubimbue(loc); + fb.pubsetbuf(0, 0); + fb.open(name, ios_base::in); + streamsize n = fb.sgetn(wbuf, wlen + 1); + fb.close(); + + VERIFY( n == wlen ); + VERIFY( !wmemcmp(wbuf, wstr, wlen) ); +} + +int main () +{ + test02(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc new file mode 100644 index 00000000000..169d3ebfa25 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc @@ -0,0 +1,116 @@ +// 2003-09-04 Petur Runolfsson <peturr02@ru.is> + +// Copyright (C) 2003 Free Software Foundation +// +// 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.8.1.4 Overridden virtual functions + +#include <locale> +#include <fstream> +#include <cstdio> +#include <testsuite_hooks.h> + +// Test handing of UTF-8 in basic_filebuf::underflow +void test03() +{ + using namespace std; + bool test = true; + const char name[] = "tmp_underflow-3.tst"; + + const char cstr[] = + "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" + "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" + "'()*+,-./0123456789:;<=>?@}~\x7f\xc2\x80\xc2\x81\xc2\x82\xc2" + "\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a" + "\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2" + "\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99" + "\xc2\x9a\xc2\x9b\xc2\x9c\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3" + "\xbe\xc3\xbf\xc4\x80\xc4\x81\xc4\x82\xc4\x83\xc4\x84\xc4\x85" + "\xc4\x86\xc4\x87\xc4\x88\xc4\x89\xc4\x8a\xc4\x8b\xc4\x8c\xc4" + "\x8d\xc4\x8e\xc4\x8f\xc4\x90\xc4\x91\xc4\x92\xc4\x93\xc4\x94" + "\xc4\x95\xc4\x96\xc4\x97\xc4\x98\xc4\x99\xdf\xb8\xdf\xb9\xdf" + "\xba\xdf\xbb\xdf\xbc\xdf\xbd\xdf\xbe\xdf\xbf\xe0\xa0\x80\xe0" + "\xa0\x81\xe0\xa0\x82\xe0\xa0\x83\xe0\xa0\x84\xe0\xa0\x85\xe0" + "\xa0\x86\xe0\xa0\x87\xe0\xa0\x88\xe0\xa0\x89\xe0\xa0\x8a\xe0" + "\xa0\x8b\xe0\xa0\x8c\xe0\xa0\x8d\xe0\xa0\x8e\xe0\xa0\x8f\xe0" + "\xa0\x90\xe0\xa0\x91\xe0\xa0\x92\xe0\xa0\x93\xe0\xa0\x94\xe0" + "\xa0\x95\xe0\xa0\x96\xe0\xa0\x97\x1\x2\x4\x8\x10\x20@\xc2\x80" + "\xc4\x80\xc8\x80\xd0\x80\xe0\xa0\x80\xe1\x80\x80\xe2\x80\x80" + "\xe4\x80\x80\xe8\x80\x80\xf0\x90\x80\x80\xf0\xa0\x80\x80\xf1" + "\x80\x80\x80\xf2\x80\x80\x80\xf4\x80\x80\x80\xf8\x88\x80\x80" + "\x80\xf8\x90\x80\x80\x80\xf8\xa0\x80\x80\x80\xf9\x80\x80\x80" + "\x80\xfa\x80\x80\x80\x80\xfc\x84\x80\x80\x80\x80\xfc\x88\x80" + "\x80\x80\x80\xfc\x90\x80\x80\x80\x80\xfc\xa0\x80\x80\x80\x80" + "\xfd\x80\x80\x80\x80\x80"; + + const wchar_t wstr[] = { + 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, + 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, L'!', + L'"', L'#', L'$', L'%', L'&', L'\'', L'(', L')', L'*', L'+', + L',', L'-', L'.', L'/', L'0', L'1', L'2', L'3', L'4', L'5', + L'6', L'7', L'8', L'9', L':', L';', L'<', L'=', L'>', L'?', + L'@', L'}', L'~', 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, + 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9a, 0x9b, 0x9c, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x100, + 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, + 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, + 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x7f8, 0x7f9, + 0x7fa, 0x7fb, 0x7fc, 0x7fd, 0x7fe, 0x7ff, 0x800, 0x801, 0x802, + 0x803, 0x804, 0x805, 0x806, 0x807, 0x808, 0x809, 0x80a, 0x80b, + 0x80c, 0x80d, 0x80e, 0x80f, 0x810, 0x811, 0x812, 0x813, 0x814, + 0x815, 0x816, 0x817, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, L'@', + 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, + 0x10000, 0x20000, 0x40000, 0x80000, 0x100000, 0x200000, 0x400000, + 0x800000, 0x1000000, 0x2000000, 0x4000000, 0x8000000, 0x10000000, + 0x20000000, 0x40000000, 0x0 + }; + + const size_t clen = sizeof(cstr) / sizeof(cstr[0]); + const size_t wlen = sizeof(wstr) / sizeof(wstr[0]); + + const int loops = 2 * BUFSIZ / wlen; + locale loc = __gnu_test::try_named_locale("se_NO.UTF-8"); + + FILE* file = fopen(name, "w"); + for (int i = 0; i < loops; ++i) + fwrite(cstr, 1, clen, file); + fclose(file); + + wchar_t wbuf[wlen]; + + wfilebuf fb; + fb.pubimbue(loc); + fb.open(name, ios_base::in); + for (int i = 0; i < loops; ++i) + { + streamsize n = fb.sgetn(wbuf, wlen); + VERIFY( n == wlen ); + VERIFY( !wmemcmp(wbuf, wstr, wlen) ); + } + + VERIFY( fb.sgetc() == wfilebuf::traits_type::eof() ); + fb.close(); +} + +int main () +{ + test03(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/vector_element_access.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc index 5f5b5d231de..00fb3774489 100644 --- a/libstdc++-v3/testsuite/23_containers/vector_element_access.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc @@ -1,7 +1,7 @@ -// 2000-09-06 -// bkoz +// 2003-09-04 Petur Runolfsson <peturr02@ru.is> +// Adapted from 27_io/basic_filebuf/underflow/char/2.cc -// Copyright (C) 2000 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -19,50 +19,36 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// 23.2.4 vector +// 27.8.1.4 Overridden virtual functions -#include <vector> -#include <stdexcept> +#include <fstream> +#include <locale> #include <testsuite_hooks.h> -template<typename T> -struct A { }; - -struct B { }; - -// http://gcc.gnu.org/ml/libstdc++/2000-09/msg00002.html -bool test01() +void test01() { bool test = true; - std::vector< A<B> > vec01; - std::vector< A<B> > vec02(5); - typedef std::vector< A<B> >::size_type size_type; - typedef std::vector< A<B> >::reference reference; - - try - { - reference r01 = vec01.at(6); - VERIFY( false ); // Should not get here, as exception thrown. - } - catch(std::out_of_range& err) - { - VERIFY( true ); - } - catch(...) - { - VERIFY( false ); - } + using namespace std; -#ifdef DEBUG_ASSERT - assert(test); -#endif + locale loc (__gnu_test::try_named_locale("se_NO.UTF-8")); + wfilebuf fb_out, fb_in_out; + fb_out.pubimbue(loc); + fb_in_out.pubimbue(loc); - return test; + fb_out.open("tmp_underflow.tst", ios::out); + fb_out.sputc(L'S'); + fb_out.sputc(L'T'); + fb_out.close(); + + fb_in_out.open("tmp_underflow.tst", ios::in | ios::out); + while (fb_in_out.sbumpc() != filebuf::traits_type::eof()); + + VERIFY( fb_in_out.sputc(L'x') == L'x' ); + fb_in_out.close(); } int main() { test01(); - return 0; } diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc new file mode 100644 index 00000000000..f8636b0cc30 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc @@ -0,0 +1,73 @@ +// 2003-09-04 Petur Runolfsson <peturr02@ru.is> + +// Copyright (C) 2003 Free Software Foundation +// +// 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.8.1.4 Overridden virtual functions + +#include <locale> +#include <fstream> +#include <cstdio> +#include <testsuite_hooks.h> + +// Test that unbuffered really means unbuffered for UTF-8 +void test05() +{ + using namespace std; + bool test = true; + const char* name = "tmp_underflow-5"; + + wfilebuf fb; + fb.pubsetbuf(0, 0); + fb.pubimbue(__gnu_test::try_named_locale("se_NO.UTF-8")); + + FILE* file = fopen(name, "w"); + setvbuf(file, 0, _IONBF, 0); + fputs("abcde", file); + + fb.open(name, ios_base::in); + VERIFY( fb.sbumpc() == L'a' ); + + fseek(file, 1, SEEK_SET); + fputc('0', file); + + VERIFY( fb.sbumpc() == L'0' ); + VERIFY( fb.sbumpc() == L'c' ); + + fputc('1', file); + fputc('2', file); + + VERIFY( fb.sbumpc() == L'2' ); + VERIFY( fb.sbumpc() == L'e' ); + VERIFY( fb.sbumpc() == WEOF ); + + fputc('3', file); + fputc('4', file); + + VERIFY( fb.sbumpc() == L'4' ); + VERIFY( fb.sbumpc() == WEOF ); + + fb.close(); + fclose(file); +} + +int main() +{ + test05(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc index a764bb2b5de..5bd831378d7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc @@ -35,7 +35,7 @@ void test01() putc(static_cast<unsigned char>(i), file); fclose(file); - locale loc (__gnu_cxx_test::try_named_locale("de_DE.ISO-8859-15@euro")); + locale loc (__gnu_test::try_named_locale("de_DE.ISO-8859-15@euro")); wchar_t buf[1]; wfilebuf fb; fb.pubimbue(loc); diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/2.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/2.cc index 3faf03f4dcf..861a6044f9e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_fstream/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_fstream/2.cc @@ -38,7 +38,7 @@ namespace test { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; typedef short type_t; template class basic_fstream<type_t, char_traits<type_t> >; template class basic_fstream<pod_char, char_traits<pod_char> >; diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc index 6daa4e02c5e..3286411eb62 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc @@ -43,7 +43,7 @@ void test03() typedef std::ios_base::fmtflags fmtflags; typedef std::ios_base::iostate iostate; locale loc_c = locale::classic(); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); std::ios ios_01(NULL); std::ios ios_02(NULL); ios_01.imbue(loc_c); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/2.cc index 40ec332923d..7676f6a094e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/2.cc @@ -38,7 +38,7 @@ namespace test { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; typedef short type_t; template class basic_istream<type_t, char_traits<type_t> >; template class basic_istream<pod_char, char_traits<pod_char> >; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc index b2fdd2691e7..9c3b3605cb8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc @@ -119,11 +119,6 @@ bool test01() { ss_01 >> pi; std::printf ("%x %x\n", pi, po); VERIFY( po == pi ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc index 374fbd8e0c7..94136d2e168 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc @@ -56,11 +56,6 @@ bool test02() { VERIFY( n == 20000 ); char c = is.peek(); VERIFY( c == 65 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc index 869d828b091..65306c4d6e3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc @@ -55,11 +55,6 @@ bool test03() istr >> l01; // _M_in_end set completely incorrectly here. VERIFY( l01 == 12220101 ); VERIFY( istr.rdstate() == std::ios_base::eofbit ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc index de92bcd52cb..206c81e506b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc @@ -70,10 +70,6 @@ void test06() is >> c; // EOF VERIFY( c == ',' ); VERIFY( static_cast<bool>(is.rdstate() & std::ios_base::failbit) ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc index 118668ea1d9..6167471ba49 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc @@ -156,10 +156,6 @@ void test07() VERIFY( static_cast<bool>(is.rdstate() & std::ios_base::failbit) ); VERIFY( static_cast<bool>(is.rdstate() & std::ios_base::eofbit) ); is.clear(); - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc index f8491612ddf..2a2c3cc1ff7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc @@ -79,11 +79,6 @@ void test08() is >> h2; VERIFY( h2 == 2212322 ); VERIFY( static_cast<bool>(is.rdstate() & std::ios_base::eofbit) ); - - -#ifdef DEBUG_ASSERT - assert(test); -#endif } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc index 37e175e6f7c..67d98d53de8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc @@ -58,10 +58,6 @@ bool test09() test = f1 == 2456; VERIFY( f2 == 0.00567 ); VERIFY( c == '-' ); -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc index bc67190533f..de7bbf9ada8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc @@ -139,11 +139,6 @@ bool test10() { is_05.ignore(); is_05 >> n; VERIFY( n == 16 ); - -#ifdef DEBUG_ASSERT - assert(test); -#endif - return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc index 9d59395bde4..157084167f5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc @@ -39,7 +39,7 @@ void test02() { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; basic_stringstream<pod_char, char_traits<pod_char> > sstr; // 1 diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc index 99dd0b09bc1..27e1e3667ff 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc @@ -30,6 +30,7 @@ // 27.4.2.1.6 class ios_base::init #include <fstream> +#include <typeinfo> #include <testsuite_hooks.h> // char_traits specialization diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc index 6f51df5850d..4e928fad62b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc @@ -30,6 +30,7 @@ // 27.4.2.1.6 class ios_base::init #include <sstream> +#include <typeinfo> #include <testsuite_hooks.h> // char_traits specialization diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/2.cc index 8c672b1f076..3910aa7bd34 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/2.cc @@ -38,7 +38,7 @@ namespace test { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; typedef short type_t; template class basic_ostream<type_t, char_traits<type_t> >; template class basic_ostream<pod_char, char_traits<pod_char> >; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc index 8a81b964fd1..f49f60405f8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc @@ -30,7 +30,7 @@ using namespace std; -#ifndef DEBUG_ASSERT +#ifndef _GLIBCXX_ASSERT # define TEST_NUMPUT_VERBOSE 1 #endif diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc index 92180927f6f..2cf4021108f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc @@ -43,7 +43,7 @@ test02() os2.setf(ios::fixed); // Check it can be done in a locale with grouping on. - locale loc2 = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc2 = __gnu_test::try_named_locale("de_DE"); os2.imbue(loc2); os2 << fixed << setprecision(3) << val2 << endl; os2 << endl; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc index a439c9e78ab..484e66b8c15 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc @@ -30,7 +30,7 @@ using namespace std; -#ifndef DEBUG_ASSERT +#ifndef _GLIBCXX_ASSERT # define TEST_NUMPUT_VERBOSE 1 #endif diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc index 3cdf3b83310..2c8f6c67463 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc @@ -30,6 +30,7 @@ // 27.4.2.1.6 class ios_base::init #include <fstream> +#include <typeinfo> #include <testsuite_hooks.h> // char_traits specialization diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc index 5f68c585ad5..141548ad10a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc @@ -30,6 +30,7 @@ // 27.4.2.1.6 class ios_base::init #include <sstream> +#include <typeinfo> #include <testsuite_hooks.h> // char_traits specialization diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/2.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/2.cc index b3a48269bf4..71da9a59349 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/2.cc @@ -38,7 +38,7 @@ namespace test { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; typedef short type_t; template class basic_streambuf<type_t, char_traits<type_t> >; template class basic_streambuf<pod_char, char_traits<pod_char> >; diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc index fee82668f9d..7dbfdc75562 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc @@ -53,10 +53,10 @@ void test08() testbuf ob; VERIFY( ob.getloc() == loc ); - locale::global(__gnu_cxx_test::try_named_locale("en_US")); + locale::global(__gnu_test::try_named_locale("en_US")); VERIFY( ob.getloc() == loc ); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); locale ret = ob.pubimbue(loc_de); VERIFY( ob.getloc() == loc_de ); VERIFY( ret == loc ); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/1.cc index a91deab2f1d..7841f3275c5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/1.cc @@ -50,7 +50,7 @@ void test01() namespace test { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; typedef short type_t; template class basic_stringbuf<type_t, char_traits<type_t> >; template class basic_stringbuf<pod_char, char_traits<pod_char> >; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/2.cc index f40868a179f..940aa7a852a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/2.cc @@ -33,7 +33,7 @@ namespace test { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; typedef short type_t; template class basic_stringbuf<type_t, char_traits<type_t> >; template class basic_stringbuf<pod_char, char_traits<pod_char> >; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/4.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/4.cc index cd4c4311c6a..fd2ddbd6acc 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/4.cc @@ -30,8 +30,8 @@ namespace test { using namespace std; - using __gnu_cxx_test::pod_char; - typedef __gnu_cxx_test::tracker_alloc<char> alloc_type; + using __gnu_test::pod_char; + typedef __gnu_test::tracker_alloc<char> alloc_type; template class basic_stringbuf<char, char_traits<char>, alloc_type>; } // test diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc index 7006dda094a..549e59ef841 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc @@ -33,10 +33,10 @@ void test03() std::stringbuf ob; VERIFY( ob.getloc() == loc ); - locale::global(__gnu_cxx_test::try_named_locale("en_US")); + locale::global(__gnu_test::try_named_locale("en_US")); VERIFY( ob.getloc() == loc ); - locale loc_de = __gnu_cxx_test::try_named_locale("de_DE"); + locale loc_de = __gnu_test::try_named_locale("de_DE"); locale ret = ob.pubimbue(loc_de); VERIFY( ob.getloc() == loc_de ); VERIFY( ret == loc ); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/2.cc index abadf8271e6..5cd55f1d30b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringstream/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/2.cc @@ -38,7 +38,7 @@ namespace test { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; typedef short type_t; template class basic_stringstream<type_t, char_traits<type_t> >; template class basic_stringstream<pod_char, char_traits<pod_char> >; diff --git a/libstdc++-v3/testsuite/27_io/fpos/1.cc b/libstdc++-v3/testsuite/27_io/fpos/1.cc index 5d074c1e270..8d927dc51e1 100644 --- a/libstdc++-v3/testsuite/27_io/fpos/1.cc +++ b/libstdc++-v3/testsuite/27_io/fpos/1.cc @@ -28,7 +28,7 @@ namespace test { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; typedef short type_t; template class fpos<type_t>; template class fpos<pod_char>; diff --git a/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc b/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc index e6f9921b368..f0baf752ef7 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc @@ -41,5 +41,5 @@ void test01() io1 = io2; } // { dg-error "within this context" "" { target *-*-* } 41 } -// { dg-error "is private" "" { target *-*-* } 696 } +// { dg-error "is private" "" { target *-*-* } 748 } // { dg-error "operator=" "" { target *-*-* } 0 } diff --git a/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc b/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc index 5d77444b342..08865db583e 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc @@ -41,5 +41,5 @@ void test02() test_base io2 = io1; } // { dg-error "within this context" "" { target *-*-* } 41 } -// { dg-error "is private" "" { target *-*-* } 693 } +// { dg-error "is private" "" { target *-*-* } 745 } // { dg-error "copy constructor" "" { target *-*-* } 0 } diff --git a/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc b/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc index dac74cd35da..ee27d44788c 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc @@ -48,7 +48,7 @@ void test01() int main(void) { - __gnu_cxx_test::set_memory_limits(); + __gnu_test::set_memory_limits(); test01(); return 0; } diff --git a/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc b/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc index 751b6be2583..7df7eb965b4 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc @@ -123,7 +123,7 @@ void test02() int main(void) { - __gnu_cxx_test::set_memory_limits(); + __gnu_test::set_memory_limits(); test02(); return 0; } diff --git a/libstdc++-v3/testsuite/27_io/ios_base/storage/3.cc b/libstdc++-v3/testsuite/27_io/ios_base/storage/3.cc index 2c9816a397e..ea5e13a422a 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/storage/3.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/storage/3.cc @@ -46,7 +46,7 @@ void test03() int main(void) { - __gnu_cxx_test::set_memory_limits(); + __gnu_test::set_memory_limits(); test03(); return 0; } diff --git a/libstdc++-v3/testsuite/23_containers/set_operators_neg.cc b/libstdc++-v3/testsuite/27_io/objects/char/12048-1.cc index c3c23741e2e..7ad336dafe6 100644 --- a/libstdc++-v3/testsuite/23_containers/set_operators_neg.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/12048-1.cc @@ -1,6 +1,7 @@ -// 2000-09-07 bgarcia@laurelnetworks.com +// Derived from libstdc++/12048 by LJR <ljrittle@acm.org> with +// reminder from Petur Runolfsson <peturr02@ru.is>. -// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -18,26 +19,25 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// 23.3.4 template class multiset negative tests +#include <iostream> +#include <testsuite_hooks.h> -#include <set> -#include <string> - -// { dg-do compile } +void +test01() +{ + std::freopen("cin_unget-1.txt", "r", stdin); + + char c1; + char c2; + std::cin.get(c1); + std::cin.unget(); + std::cin.get(c2); + VERIFY( std::cin.good() ); + VERIFY( c1 == c2 ); +} -// libstdc++/86: map & set iterator comparisons are not type-safe int main(void) { - bool test = true; - - std::set<unsigned int> setByIndex; - std::set<std::string> setByName; - - std::set<unsigned int>::iterator itr(setByIndex.begin()); - - // NB: it's not setByIndex!! - test &= itr != setByName.end(); // { dg-error "no" } - test &= itr == setByName.end(); // { dg-error "no" } - + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/27_io/objects/char/12048-2.cc b/libstdc++-v3/testsuite/27_io/objects/char/12048-2.cc new file mode 100644 index 00000000000..d544d644065 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/objects/char/12048-2.cc @@ -0,0 +1,41 @@ +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <iostream> +#include <cstdio> +#include <testsuite_hooks.h> + +void +test01() +{ + std::freopen("cin_unget-1.txt", "r", stdin); + + char c1; + int c2; + std::cin.get(c1); + std::cin.unget(); + VERIFY( std::cin.good() ); + c2 = std::fgetc(stdin); + VERIFY( c2 == std::char_traits<char>::to_int_type(c1) ); +} + +int main(void) +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/objects/char/12048-3.cc b/libstdc++-v3/testsuite/27_io/objects/char/12048-3.cc new file mode 100644 index 00000000000..2f69b072233 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/objects/char/12048-3.cc @@ -0,0 +1,39 @@ +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <iostream> +#include <testsuite_hooks.h> + +void +test01() +{ + std::freopen("cin_unget-1.txt", "r", stdin); + + char buf[2]; + VERIFY( std::cin.rdbuf()->sgetn(buf, 2) == 2 ); + int c1 = std::cin.rdbuf()->sungetc(); + int c2 = std::cin.rdbuf()->sbumpc(); + VERIFY( c1 == std::char_traits<char>::to_int_type(buf[1]) ); + VERIFY( c2 == c1 ); +} + +int main(void) +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/objects/char/12048-4.cc b/libstdc++-v3/testsuite/27_io/objects/char/12048-4.cc new file mode 100644 index 00000000000..6c0b28fe4db --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/objects/char/12048-4.cc @@ -0,0 +1,40 @@ +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <iostream> +#include <cstdio> +#include <testsuite_hooks.h> + +void +test01() +{ + std::freopen("cin_unget-1.txt", "r", stdin); + + char buf[2]; + VERIFY( std::cin.rdbuf()->sgetn(buf, 2) == 2 ); + int c1 = std::cin.rdbuf()->sungetc(); + int c2 = std::fgetc(stdin); + VERIFY( c1 == std::char_traits<char>::to_int_type(buf[1]) ); + VERIFY( c2 == c1 ); +} + +int main(void) +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/objects/char/12048-5.cc b/libstdc++-v3/testsuite/27_io/objects/char/12048-5.cc new file mode 100644 index 00000000000..884f49e9010 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/objects/char/12048-5.cc @@ -0,0 +1,55 @@ +// Derived from libstdc++/12048 by LJR <ljrittle@acm.org> with +// reminder from Petur Runolfsson <peturr02@ru.is>. + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// DR 49 states that cin.rdbuf()->sbumpc() and fgetc(stdin) should be +// equivalent and interchangable. Currently however, cin.rdbuf()->sungetc() +// only returns characters that were read with cin.rdbuf()->sbumpc() + +// { dg-do run { xfail *-*-* } } + +#include <iostream> +#include <cstdio> +#include <testsuite_hooks.h> + +void +test01() +{ + std::freopen("cin_unget-1.txt", "r", stdin); + + char c1; + int c2; + char c3; + std::cin.get(c1); + c2 = std::fgetc(stdin); + std::cin.unget(); + if (std::cin.good()) + { + std::cin.get(c3); + VERIFY( std::cin.good() ); + VERIFY( c3 == std::char_traits<char>::to_char_type(c2) ); + } +} + +int main(void) +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc index f0a7868ba4f..f797380836f 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc @@ -22,7 +22,7 @@ #include <cstdio> #include <testsuite_hooks.h> -// Test handling of UTF-8 in wcin and wcout +// Test handling of UTF-8 in wcin void test10() { using namespace std; @@ -30,7 +30,7 @@ void test10() bool test = true; const char* name = "tmp_10"; - locale loc(__gnu_cxx_test::try_named_locale("se_NO.UTF-8")); + locale loc(__gnu_test::try_named_locale("se_NO.UTF-8")); locale::global(loc); wcin.imbue(loc); wcout.imbue(loc); @@ -87,18 +87,9 @@ void test10() }; size_t i_size = wcslen(i_lit); - freopen(name, "w", stdout); - - wcout.write(i_lit, i_size); - wcout.flush(); - VERIFY( wcout.good() ); - - FILE* file = fopen(name, "r"); - char* buf = new char[e_size + 10]; - size_t n = fread(buf, 1, e_size + 10, file); + FILE* file = fopen(name, "w"); + size_t n = fwrite(e_lit, 1, e_size, file); VERIFY( n == e_size ); - VERIFY( !memcmp(buf, e_lit, e_size) ); - delete[] buf; fclose(file); freopen(name, "r", stdin); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc new file mode 100644 index 00000000000..d538612a60d --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc @@ -0,0 +1,109 @@ +// 2003-05-01 Petur Runolfsson <peturr02@ru.is> + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <iostream> +#include <cstdio> +#include <testsuite_hooks.h> + +// Test handling of UTF-8 in wcout +void test11() +{ + using namespace std; + + bool test = true; + const char* name = "tmp_11"; + + locale loc(__gnu_test::try_named_locale("se_NO.UTF-8")); + locale::global(loc); + wcin.imbue(loc); + wcout.imbue(loc); + + const char* e_lit = + "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" + "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" + "'()*+,-./0123456789:;<=>?@}~\x7f\xc2\x80\xc2\x81\xc2\x82\xc2" + "\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a" + "\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2" + "\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99" + "\xc2\x9a\xc2\x9b\xc2\x9c\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3" + "\xbe\xc3\xbf\xc4\x80\xc4\x81\xc4\x82\xc4\x83\xc4\x84\xc4\x85" + "\xc4\x86\xc4\x87\xc4\x88\xc4\x89\xc4\x8a\xc4\x8b\xc4\x8c\xc4" + "\x8d\xc4\x8e\xc4\x8f\xc4\x90\xc4\x91\xc4\x92\xc4\x93\xc4\x94" + "\xc4\x95\xc4\x96\xc4\x97\xc4\x98\xc4\x99\xdf\xb8\xdf\xb9\xdf" + "\xba\xdf\xbb\xdf\xbc\xdf\xbd\xdf\xbe\xdf\xbf\xe0\xa0\x80\xe0" + "\xa0\x81\xe0\xa0\x82\xe0\xa0\x83\xe0\xa0\x84\xe0\xa0\x85\xe0" + "\xa0\x86\xe0\xa0\x87\xe0\xa0\x88\xe0\xa0\x89\xe0\xa0\x8a\xe0" + "\xa0\x8b\xe0\xa0\x8c\xe0\xa0\x8d\xe0\xa0\x8e\xe0\xa0\x8f\xe0" + "\xa0\x90\xe0\xa0\x91\xe0\xa0\x92\xe0\xa0\x93\xe0\xa0\x94\xe0" + "\xa0\x95\xe0\xa0\x96\xe0\xa0\x97\x1\x2\x4\x8\x10\x20@\xc2\x80" + "\xc4\x80\xc8\x80\xd0\x80\xe0\xa0\x80\xe1\x80\x80\xe2\x80\x80" + "\xe4\x80\x80\xe8\x80\x80\xf0\x90\x80\x80\xf0\xa0\x80\x80\xf1" + "\x80\x80\x80\xf2\x80\x80\x80\xf4\x80\x80\x80\xf8\x88\x80\x80" + "\x80\xf8\x90\x80\x80\x80\xf8\xa0\x80\x80\x80\xf9\x80\x80\x80" + "\x80\xfa\x80\x80\x80\x80\xfc\x84\x80\x80\x80\x80\xfc\x88\x80" + "\x80\x80\x80\xfc\x90\x80\x80\x80\x80\xfc\xa0\x80\x80\x80\x80" + "\xfd\x80\x80\x80\x80\x80"; + size_t e_size = strlen(e_lit); + + const wchar_t i_lit[] = { + 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, + 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, L'!', + L'"', L'#', L'$', L'%', L'&', L'\'', L'(', L')', L'*', L'+', + L',', L'-', L'.', L'/', L'0', L'1', L'2', L'3', L'4', L'5', + L'6', L'7', L'8', L'9', L':', L';', L'<', L'=', L'>', L'?', + L'@', L'}', L'~', 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, + 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9a, 0x9b, 0x9c, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x100, + 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, + 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, + 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x7f8, 0x7f9, + 0x7fa, 0x7fb, 0x7fc, 0x7fd, 0x7fe, 0x7ff, 0x800, 0x801, 0x802, + 0x803, 0x804, 0x805, 0x806, 0x807, 0x808, 0x809, 0x80a, 0x80b, + 0x80c, 0x80d, 0x80e, 0x80f, 0x810, 0x811, 0x812, 0x813, 0x814, + 0x815, 0x816, 0x817, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, L'@', + 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, + 0x10000, 0x20000, 0x40000, 0x80000, 0x100000, 0x200000, 0x400000, + 0x800000, 0x1000000, 0x2000000, 0x4000000, 0x8000000, 0x10000000, + 0x20000000, 0x40000000, 0x0 + }; + size_t i_size = wcslen(i_lit); + + freopen(name, "w", stdout); + + wcout.write(i_lit, i_size); + wcout.flush(); + VERIFY( wcout.good() ); + + FILE* file = fopen(name, "r"); + char* buf = new char[e_size + 10]; + size_t n = fread(buf, 1, e_size + 10, file); + VERIFY( n == e_size ); + VERIFY( !memcmp(buf, e_lit, e_size) ); + delete[] buf; + fclose(file); +} + +int main() +{ + test11(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc new file mode 100644 index 00000000000..50e4e78cd8c --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc @@ -0,0 +1,119 @@ +// 2003-09-04 Petur Runolfsson <peturr02@ru.is> + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <unistd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + +#include <iostream> +#include <cstdio> +#include <testsuite_hooks.h> + +// Test handling of UTF-8 in wcout +void test12() +{ + using namespace std; + + bool test = true; + const char* name = "tmp_12"; + + locale loc(__gnu_test::try_named_locale("se_NO.UTF-8")); + locale::global(loc); + std::ios_base::sync_with_stdio(false); + wcout.imbue(loc); + + const char cstr[] = + "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" + "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" + "'()*+,-./0123456789:;<=>?@}~\x7f\xc2\x80\xc2\x81\xc2\x82\xc2" + "\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a" + "\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2" + "\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99" + "\xc2\x9a\xc2\x9b\xc2\x9c\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3" + "\xbe\xc3\xbf\xc4\x80\xc4\x81\xc4\x82\xc4\x83\xc4\x84\xc4\x85" + "\xc4\x86\xc4\x87\xc4\x88\xc4\x89\xc4\x8a\xc4\x8b\xc4\x8c\xc4" + "\x8d\xc4\x8e\xc4\x8f\xc4\x90\xc4\x91\xc4\x92\xc4\x93\xc4\x94" + "\xc4\x95\xc4\x96\xc4\x97\xc4\x98\xc4\x99\xdf\xb8\xdf\xb9\xdf" + "\xba\xdf\xbb\xdf\xbc\xdf\xbd\xdf\xbe\xdf\xbf\xe0\xa0\x80\xe0" + "\xa0\x81\xe0\xa0\x82\xe0\xa0\x83\xe0\xa0\x84\xe0\xa0\x85\xe0" + "\xa0\x86\xe0\xa0\x87\xe0\xa0\x88\xe0\xa0\x89\xe0\xa0\x8a\xe0" + "\xa0\x8b\xe0\xa0\x8c\xe0\xa0\x8d\xe0\xa0\x8e\xe0\xa0\x8f\xe0" + "\xa0\x90\xe0\xa0\x91\xe0\xa0\x92\xe0\xa0\x93\xe0\xa0\x94\xe0" + "\xa0\x95\xe0\xa0\x96\xe0\xa0\x97\x1\x2\x4\x8\x10\x20@\xc2\x80" + "\xc4\x80\xc8\x80\xd0\x80\xe0\xa0\x80\xe1\x80\x80\xe2\x80\x80" + "\xe4\x80\x80\xe8\x80\x80\xf0\x90\x80\x80\xf0\xa0\x80\x80\xf1" + "\x80\x80\x80\xf2\x80\x80\x80\xf4\x80\x80\x80\xf8\x88\x80\x80" + "\x80\xf8\x90\x80\x80\x80\xf8\xa0\x80\x80\x80\xf9\x80\x80\x80" + "\x80\xfa\x80\x80\x80\x80\xfc\x84\x80\x80\x80\x80\xfc\x88\x80" + "\x80\x80\x80\xfc\x90\x80\x80\x80\x80\xfc\xa0\x80\x80\x80\x80" + "\xfd\x80\x80\x80\x80\x80"; + + const wchar_t wstr[] = { + 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, + 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, L'!', + L'"', L'#', L'$', L'%', L'&', L'\'', L'(', L')', L'*', L'+', + L',', L'-', L'.', L'/', L'0', L'1', L'2', L'3', L'4', L'5', + L'6', L'7', L'8', L'9', L':', L';', L'<', L'=', L'>', L'?', + L'@', L'}', L'~', 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, + 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9a, 0x9b, 0x9c, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x100, + 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, + 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, + 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x7f8, 0x7f9, + 0x7fa, 0x7fb, 0x7fc, 0x7fd, 0x7fe, 0x7ff, 0x800, 0x801, 0x802, + 0x803, 0x804, 0x805, 0x806, 0x807, 0x808, 0x809, 0x80a, 0x80b, + 0x80c, 0x80d, 0x80e, 0x80f, 0x810, 0x811, 0x812, 0x813, 0x814, + 0x815, 0x816, 0x817, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, L'@', + 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, + 0x10000, 0x20000, 0x40000, 0x80000, 0x100000, 0x200000, 0x400000, + 0x800000, 0x1000000, 0x2000000, 0x4000000, 0x8000000, 0x10000000, + 0x20000000, 0x40000000, 0x0 + }; + + const size_t clen = sizeof(cstr) / sizeof(cstr[0]); + const size_t wlen = sizeof(wstr) / sizeof(wstr[0]); + + int fd = open(name, + O_WRONLY | O_CREAT | O_TRUNC, + 0666); + VERIFY( fd != -1 ); + VERIFY( dup2(fd, 1) == 1 ); + close(fd); + + wcout.write(wstr, wlen); + wcout.flush(); + VERIFY( wcout.good() ); + + FILE* file = fopen(name, "r"); + char buf[clen + 10]; + size_t n = fread(buf, 1, clen + 10, file); + VERIFY( n == clen ); + VERIFY( !memcmp(buf, cstr, clen) ); + fclose(file); +} + +int main() +{ + test12(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/map_operators.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-1.cc index 47604deb4a8..dbdf1d12f7e 100644 --- a/libstdc++-v3/testsuite/23_containers/map_operators.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-1.cc @@ -1,6 +1,7 @@ -// 2000-09-07 bgarcia@laurelnetworks.com +// Derived from libstdc++/12048 by LJR <ljrittle@acm.org> with +// reminder from Petur Runolfsson <peturr02@ru.is>. -// Copyright (C) 2000, 2001 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -18,32 +19,25 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// 23.3.4 template class multiset - -#include <map> -#include <string> #include <iostream> +#include <testsuite_hooks.h> -// libstdc++/737 -// http://gcc.gnu.org/ml/libstdc++/2000-11/msg00093.html -void test02() +void +test01() { - typedef std::map<int,const int> MapInt; - - MapInt m; - - for (unsigned i=0;i<10;++i) - m.insert(MapInt::value_type(i,i)); - - for (MapInt::const_iterator i = m.begin(); i != m.end(); ++i) - std::cerr << i->second << ' '; - - for (MapInt::const_iterator i = m.begin(); m.end() != i; ++i) - std::cerr << i->second << ' '; + std::freopen("cin_unget-1.txt", "r", stdin); + + wchar_t c1; + wchar_t c2; + std::wcin.get(c1); + std::wcin.unget(); + std::wcin.get(c2); + VERIFY( std::wcin.good() ); + VERIFY( c1 == c2 ); } -int main() +int main(void) { - test02(); + test01(); return 0; } diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-2.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-2.cc new file mode 100644 index 00000000000..f96302ad292 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-2.cc @@ -0,0 +1,42 @@ +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <iostream> +#include <cstdio> +#include <cwchar> +#include <testsuite_hooks.h> + +void +test01() +{ + std::freopen("cin_unget-1.txt", "r", stdin); + + wchar_t c1; + std::wint_t c2; + std::wcin.get(c1); + std::wcin.unget(); + VERIFY( std::wcin.good() ); + c2 = std::fgetwc(stdin); + VERIFY( c2 == std::char_traits<wchar_t>::to_int_type(c1) ); +} + +int main(void) +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/adaptors.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-3.cc index e0bd8618300..568b6a1409a 100644 --- a/libstdc++-v3/testsuite/23_containers/adaptors.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-3.cc @@ -1,6 +1,7 @@ -// 2002-06-28 pme +// Derived from libstdc++/12048 by LJR <ljrittle@acm.org> with +// reminder from Petur Runolfsson <peturr02@ru.is>. -// Copyright (C) 2002 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -18,62 +19,25 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// 23.2.3 container adaptros - -#include <queue> -#include <stack> +#include <iostream> +#include <cwchar> #include <testsuite_hooks.h> -// libstdc++/7157 void test01() { - std::queue<int> q; - - q.push(1); - q.front(); - q.pop(); -} - - -// libstdc++/7158 -void -test02() -{ - std::stack<int> st; - - st.push(1); - st.top() = 42; - st.pop(); -} - - -// libstdc++/7161 -void -test03() -{ - int data[] = {1, 2, 3}; - std::priority_queue<int> pq; - std::size_t size = pq.size(); - - for (int i = 0; i < 3; ++i) - pq.push(data[i]); - - size = pq.size(); - pq.top(); - for (int i = 0; i < 2; ++i) - pq.pop(); - - while (!pq.empty()) - pq.pop(); + std::freopen("cin_unget-1.txt", "r", stdin); + + wchar_t buf[2]; + VERIFY( std::wcin.rdbuf()->sgetn(buf, 2) == 2 ); + std::wint_t c1 = std::wcin.rdbuf()->sungetc(); + std::wint_t c2 = std::wcin.rdbuf()->sbumpc(); + VERIFY( c1 == std::char_traits<wchar_t>::to_int_type(buf[1]) ); + VERIFY( c2 == c1 ); } - -int main() +int main(void) { test01(); - test02(); - test03(); - return 0; } diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-4.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-4.cc new file mode 100644 index 00000000000..5096cd055e3 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-4.cc @@ -0,0 +1,41 @@ +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <iostream> +#include <cstdio> +#include <cwchar> +#include <testsuite_hooks.h> + +void +test01() +{ + std::freopen("cin_unget-1.txt", "r", stdin); + + wchar_t buf[2]; + VERIFY( std::wcin.rdbuf()->sgetn(buf, 2) == 2 ); + wint_t c1 = std::wcin.rdbuf()->sungetc(); + wint_t c2 = std::fgetwc(stdin); + VERIFY( c1 == std::char_traits<wchar_t>::to_int_type(buf[1]) ); + VERIFY( c2 == c1 ); +} + +int main(void) +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-5.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-5.cc new file mode 100644 index 00000000000..bc965fd35f9 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-5.cc @@ -0,0 +1,53 @@ +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// DR 49 states that cin.rdbuf()->sbumpc() and fgetc(stdin) should be +// equivalent and interchangable. Currently however, cin.rdbuf()->sungetc() +// only returns characters that were read with cin.rdbuf()->sbumpc() + +// { dg-do run { xfail *-*-* } } + +#include <iostream> +#include <cstdio> +#include <cwchar> +#include <testsuite_hooks.h> + +void +test01() +{ + std::freopen("cin_unget-1.txt", "r", stdin); + + wchar_t c1; + std::wint_t c2; + wchar_t c3; + std::wcin.get(c1); + c2 = std::fgetwc(stdin); + std::wcin.unget(); + if (std::wcin.good()) + { + std::wcin.get(c3); + VERIFY( std::wcin.good() ); + VERIFY( c3 == std::char_traits<wchar_t>::to_char_type(c2) ); + } +} + +int main(void) +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc new file mode 100644 index 00000000000..b974b4afb85 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc @@ -0,0 +1,118 @@ +// 2003-09-04 Petur Runolfsson <peturr02@ru.is> + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <unistd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + +#include <iostream> +#include <cstdio> +#include <testsuite_hooks.h> + +// Test handling of UTF-8 in wcin +void test13() +{ + using namespace std; + + bool test = true; + const char* name = "tmp_13"; + + locale loc(__gnu_test::try_named_locale("se_NO.UTF-8")); + locale::global(loc); + std::ios_base::sync_with_stdio(false); + wcin.imbue(loc); + + const char cstr[] = + "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" + "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" + "'()*+,-./0123456789:;<=>?@}~\x7f\xc2\x80\xc2\x81\xc2\x82\xc2" + "\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a" + "\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2" + "\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99" + "\xc2\x9a\xc2\x9b\xc2\x9c\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3" + "\xbe\xc3\xbf\xc4\x80\xc4\x81\xc4\x82\xc4\x83\xc4\x84\xc4\x85" + "\xc4\x86\xc4\x87\xc4\x88\xc4\x89\xc4\x8a\xc4\x8b\xc4\x8c\xc4" + "\x8d\xc4\x8e\xc4\x8f\xc4\x90\xc4\x91\xc4\x92\xc4\x93\xc4\x94" + "\xc4\x95\xc4\x96\xc4\x97\xc4\x98\xc4\x99\xdf\xb8\xdf\xb9\xdf" + "\xba\xdf\xbb\xdf\xbc\xdf\xbd\xdf\xbe\xdf\xbf\xe0\xa0\x80\xe0" + "\xa0\x81\xe0\xa0\x82\xe0\xa0\x83\xe0\xa0\x84\xe0\xa0\x85\xe0" + "\xa0\x86\xe0\xa0\x87\xe0\xa0\x88\xe0\xa0\x89\xe0\xa0\x8a\xe0" + "\xa0\x8b\xe0\xa0\x8c\xe0\xa0\x8d\xe0\xa0\x8e\xe0\xa0\x8f\xe0" + "\xa0\x90\xe0\xa0\x91\xe0\xa0\x92\xe0\xa0\x93\xe0\xa0\x94\xe0" + "\xa0\x95\xe0\xa0\x96\xe0\xa0\x97\x1\x2\x4\x8\x10\x20@\xc2\x80" + "\xc4\x80\xc8\x80\xd0\x80\xe0\xa0\x80\xe1\x80\x80\xe2\x80\x80" + "\xe4\x80\x80\xe8\x80\x80\xf0\x90\x80\x80\xf0\xa0\x80\x80\xf1" + "\x80\x80\x80\xf2\x80\x80\x80\xf4\x80\x80\x80\xf8\x88\x80\x80" + "\x80\xf8\x90\x80\x80\x80\xf8\xa0\x80\x80\x80\xf9\x80\x80\x80" + "\x80\xfa\x80\x80\x80\x80\xfc\x84\x80\x80\x80\x80\xfc\x88\x80" + "\x80\x80\x80\xfc\x90\x80\x80\x80\x80\xfc\xa0\x80\x80\x80\x80" + "\xfd\x80\x80\x80\x80\x80"; + + const wchar_t wstr[] = { + 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, + 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, L'!', + L'"', L'#', L'$', L'%', L'&', L'\'', L'(', L')', L'*', L'+', + L',', L'-', L'.', L'/', L'0', L'1', L'2', L'3', L'4', L'5', + L'6', L'7', L'8', L'9', L':', L';', L'<', L'=', L'>', L'?', + L'@', L'}', L'~', 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, + 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9a, 0x9b, 0x9c, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x100, + 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, + 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, + 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x7f8, 0x7f9, + 0x7fa, 0x7fb, 0x7fc, 0x7fd, 0x7fe, 0x7ff, 0x800, 0x801, 0x802, + 0x803, 0x804, 0x805, 0x806, 0x807, 0x808, 0x809, 0x80a, 0x80b, + 0x80c, 0x80d, 0x80e, 0x80f, 0x810, 0x811, 0x812, 0x813, 0x814, + 0x815, 0x816, 0x817, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, L'@', + 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, + 0x10000, 0x20000, 0x40000, 0x80000, 0x100000, 0x200000, 0x400000, + 0x800000, 0x1000000, 0x2000000, 0x4000000, 0x8000000, 0x10000000, + 0x20000000, 0x40000000, 0x0 + }; + + const size_t clen = sizeof(cstr) / sizeof(cstr[0]); + const size_t wlen = sizeof(wstr) / sizeof(wstr[0]); + + FILE* file = fopen(name, "w"); + fwrite(cstr, 1, clen, file); + fclose(file); + + int fd = open(name, O_RDONLY); + dup2(fd, 0); + close(fd); + + wchar_t wbuf[wlen + 10]; + wcin.read(wbuf, wlen + 10); + streamsize n = wcin.gcount(); + VERIFY( n == wlen ); + VERIFY( !wmemcmp(wbuf, wstr, wlen) ); + VERIFY( wcin.eof() ); + VERIFY( wcin.fail() ); + VERIFY( !wcin.bad() ); +} + +int main() +{ + test13(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc index 835282fe449..79d087840c5 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc @@ -34,7 +34,7 @@ void test01() putc(static_cast<unsigned char>(i), file); fclose(file); - locale loc (__gnu_cxx_test::try_named_locale("de_DE.ISO-8859-15@euro")); + locale loc (__gnu_test::try_named_locale("de_DE.ISO-8859-15@euro")); locale::global(loc); // Set locale for stdin freopen(name, "r", stdin); diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am index bbe1fe5f45b..3a03189b7b8 100644 --- a/libstdc++-v3/testsuite/Makefile.am +++ b/libstdc++-v3/testsuite/Makefile.am @@ -21,28 +21,14 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ## USA. -AUTOMAKE_OPTIONS = cygnus dejagnu +AUTOMAKE_OPTIONS = dejagnu -mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs - -DEJATOOL = libstdc++-v3 - -EXPECT = `if [ -f @glibcxx_builddir@/../../expect/expect ] ; then \ - echo @glibcxx_builddir@/../../expect/expect ; \ - else echo expect ; fi` - -RUNTEST = `if [ -f @glibcxx_srcdir@/../dejagnu/runtest ] ; then \ - echo @glibcxx_srcdir@/../dejagnu/runtest ; \ - else echo runtest; fi` +include $(top_srcdir)/fragment.am AM_MAKEFLAGS = -j1 AM_RUNTESTFLAGS = -RUNTESTFLAGS = -PWD_COMMAND = $${PWDCMD-pwd} ## CXX is actually a "C" compiler. These are real C++ programs. -glibcxx_srcdir=@glibcxx_srcdir@ -glibcxx_builddir=@glibcxx_builddir@ testsuite_flags_script=${glibcxx_builddir}/scripts/testsuite_flags CXX=`${testsuite_flags_script} --build-cxx` @@ -51,13 +37,6 @@ CXXLINK = \ $(LIBTOOL) --tag=CXX --mode=link $(CXX) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ -GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ -LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ -TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ -INCLUDES = \ - -nostdinc++ \ - @GLIBCXX_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@ - # Generated lists of files to run. All of these names are valid make # targets, if you wish to generate a list manually. lists_of_files = \ @@ -73,7 +52,7 @@ libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc if GLIBCXX_TEST_ABI noinst_PROGRAMS = abi_check else -noinst_PROGRAMS = +noinst_PROGRAMS = endif abi_check_SOURCES = abi_check.cc @@ -90,9 +69,8 @@ endif # This is automatically run after the generated check-DEJAGNU rule. check-local: check-abi -baseline_dir = @baseline_dir@ baseline_file = ${baseline_dir}/baseline_symbols.txt -extract_symvers = @glibcxx_srcdir@/scripts/extract_symvers +extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers current_symbols.txt: ${extract_symvers} ../src/.libs/libstdc++.so -@(${extract_symvers} ../src/.libs/libstdc++.so current_symbols.txt) @@ -105,7 +83,7 @@ baseline_symbols: exit 1; \ fi; true) -new-abi-baseline: +new-abi-baseline: -@$(mkinstalldirs) ${baseline_dir} -@(output=${baseline_file}; \ if test -f $${output}; then \ @@ -120,11 +98,11 @@ if GLIBCXX_TEST_ABI # 'check-abi' to test for changes against that file. check-abi: abi_check baseline_symbols current_symbols.txt -@(./abi_check --check ./current_symbols.txt ${baseline_file} \ - 2>&1 | tee libstdc++-v3-abi.sum) + 2>&1 | tee libstdc++-abi.sum) -check-abi-verbose: abi_check baseline_symbols current_symbols.txt +check-abi-verbose: abi_check baseline_symbols current_symbols.txt -@(./abi_check --check-verbose ./current_symbols.txt ${baseline_file} \ - 2>&1 | tee libstdc++-v3-abi.sum) + 2>&1 | tee libstdc++-abi.sum) else check-abi: @@ -147,7 +125,7 @@ check-script-install: ${survey_script} ${survey_script} 0) -# Runs the testsuite/performance tests. +# Runs the testsuite/performance tests. # Some of these tests create large (~75MB) files, allocate huge # ammounts of memory, or otherwise tie up machine resources. Thus, # running this is off by default. @@ -168,4 +146,4 @@ check-script check-script-install check-performance # By adding these files here, automake will remove them for 'make clean' CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ - testsuite_* site.exp abi_check baseline_symbols + testsuite_* site.exp abi_check baseline_symbols diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in index 1752949b542..c44c29428d5 100644 --- a/libstdc++-v3/testsuite/Makefile.in +++ b/libstdc++-v3/testsuite/Makefile.in @@ -1,6 +1,8 @@ -# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am +# Makefile.in generated by automake 1.7.6 from Makefile.am. +# @configure_input@ -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -10,62 +12,40 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. - -SHELL = @SHELL@ +@SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ - top_builddir = .. -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -build_alias = @build_alias@ build_triplet = @build@ -host_alias = @host_alias@ host_triplet = @host@ -target_alias = @target_alias@ target_triplet = @target@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ @@ -74,6 +54,7 @@ CCODECVT_CC = @CCODECVT_CC@ CCODECVT_H = @CCODECVT_H@ CCOLLATE_CC = @CCOLLATE_CC@ CCTYPE_CC = @CCTYPE_CC@ +CFLAGS = @CFLAGS@ CLOCALE_CC = @CLOCALE_CC@ CLOCALE_H = @CLOCALE_H@ CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@ @@ -82,106 +63,192 @@ CMESSAGES_H = @CMESSAGES_H@ CMONEY_CC = @CMONEY_CC@ CNUMERIC_CC = @CNUMERIC_CC@ CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ CSTDIO_H = @CSTDIO_H@ CTIME_CC = @CTIME_CC@ CTIME_H = @CTIME_H@ +CXX = `${testsuite_flags_script} --build-cxx` CXXCPP = @CXXCPP@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ DEBUG_FLAGS = @DEBUG_FLAGS@ -DLLTOOL = @DLLTOOL@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FPOS_H = @FPOS_H@ FPOS_INC_SRCDIR = @FPOS_INC_SRCDIR@ -GCJ = @GCJ@ -GCJFLAGS = @GCJFLAGS@ -GLIBCXX_IS_CROSS_COMPILING = @GLIBCXX_IS_CROSS_COMPILING@ +GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@ +GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@ +GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@ +GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@ +GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE = @GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@ +GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE = @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ +GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@ +GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@ +GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@ +GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@ +GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@ +GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@ +GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@ +GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ +GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ +GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ +GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ +GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBMATHOBJS = @LIBMATHOBJS@ -LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_FLAG = @LIBUNWIND_FLAG@ LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@ OPT_LDFLAGS = @OPT_LDFLAGS@ OS_INC_SRCDIR = @OS_INC_SRCDIR@ PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SECTION_FLAGS = @SECTION_FLAGS@ SECTION_LDFLAGS = @SECTION_LDFLAGS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ STRIP = @STRIP@ SYMVER_MAP = @SYMVER_MAP@ +TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_FLAGS = @WARN_FLAGS@ WERROR = @WERROR@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__leading_dot = @am__leading_dot@ +baseline_dir = @baseline_dir@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ check_msgfmt = @check_msgfmt@ +datadir = @datadir@ enable_shared = @enable_shared@ enable_static = @enable_static@ -glibcxx_CXX = @glibcxx_CXX@ +exec_prefix = @exec_prefix@ glibcxx_MOFILES = @glibcxx_MOFILES@ glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@ glibcxx_POFILES = @glibcxx_POFILES@ -glibcxx_basedir = @glibcxx_basedir@ +glibcxx_builddir = @glibcxx_builddir@ glibcxx_localedir = @glibcxx_localedir@ glibcxx_prefixdir = @glibcxx_prefixdir@ +glibcxx_srcdir = @glibcxx_srcdir@ glibcxx_thread_h = @glibcxx_thread_h@ glibcxx_toolexecdir = @glibcxx_toolexecdir@ glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@ gxx_include_dir = @gxx_include_dir@ -ifGNUmake = @ifGNUmake@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ libtool_VERSION = @libtool_VERSION@ +localstatedir = @localstatedir@ +mandir = @mandir@ +multi_basedir = @multi_basedir@ +oldincludedir = @oldincludedir@ +port_specific_symbol_files = @port_specific_symbol_files@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ toplevel_srcdir = @toplevel_srcdir@ -AUTOMAKE_OPTIONS = cygnus dejagnu +AUTOMAKE_OPTIONS = dejagnu + +MAINT_CHARSET = latin1 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs +PWD_COMMAND = $${PWDCMD-pwd} +STAMP = echo timestamp > -DEJATOOL = libstdc++-v3 +toolexecdir = $(glibcxx_toolexecdir) +toolexeclibdir = $(glibcxx_toolexeclibdir) -EXPECT = `if [ -f @glibcxx_builddir@/../../expect/expect ] ; then echo @glibcxx_builddir@/../../expect/expect ; else echo expect ; fi` +# These bits are all figured out from configure. Look in acinclude.m4 +# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS. +CONFIG_CXXFLAGS = \ + $(SECTION_FLAGS) $(EXTRA_CXX_FLAGS) +WARN_CXXFLAGS = \ + $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once -RUNTEST = `if [ -f @glibcxx_srcdir@/../dejagnu/runtest ] ; then echo @glibcxx_srcdir@/../dejagnu/runtest ; else echo runtest; fi` +# -I/-D flags to pass when compiling. +AM_CPPFLAGS = $(GLIBCXX_INCLUDES) AM_MAKEFLAGS = -j1 AM_RUNTESTFLAGS = -RUNTESTFLAGS = -PWD_COMMAND = $${PWDCMD-pwd} -glibcxx_srcdir = @glibcxx_srcdir@ -glibcxx_builddir = @glibcxx_builddir@ testsuite_flags_script = ${glibcxx_builddir}/scripts/testsuite_flags -CXX = `${testsuite_flags_script} --build-cxx` - -CXXLINK = LD_RUN_PATH=$${LD_RUN_PATH:+$$LD_RUN_PATH:}${glibcxx_builddir}/src/.libs $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ - -GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ -LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ -TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ -INCLUDES = -nostdinc++ @GLIBCXX_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@ +CXXLINK = \ + LD_RUN_PATH=$${LD_RUN_PATH:+$$LD_RUN_PATH:}${glibcxx_builddir}/src/.libs\ + $(LIBTOOL) --tag=CXX --mode=link $(CXX) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ # Generated lists of files to run. All of these names are valid make # targets, if you wish to generate a list manually. -lists_of_files = testsuite_files testsuite_files_interactive testsuite_files_performance +lists_of_files = \ + testsuite_files \ + testsuite_files_interactive \ + testsuite_files_performance noinst_LIBRARIES = libv3test.a libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc -@GLIBCXX_TEST_ABI_TRUE@noinst_PROGRAMS = abi_check @GLIBCXX_TEST_ABI_FALSE@noinst_PROGRAMS = + +@GLIBCXX_TEST_ABI_TRUE@noinst_PROGRAMS = abi_check abi_check_SOURCES = abi_check.cc -baseline_dir = @baseline_dir@ baseline_file = ${baseline_dir}/baseline_symbols.txt -extract_symvers = @glibcxx_srcdir@/scripts/extract_symvers +extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers # These two special 'check-script' rules use the bash script # 'check_survey' to do testing. This script is not as portable as the @@ -190,101 +257,91 @@ extract_symvers = @glibcxx_srcdir@/scripts/extract_symvers # items like compile time, execution time, and binary size. survey_script = ${glibcxx_builddir}/scripts/check_survey -# Runs the testsuite/performance tests. +# Runs the testsuite/performance tests. # Some of these tests create large (~75MB) files, allocate huge # ammounts of memory, or otherwise tie up machine resources. Thus, # running this is off by default. performance_script = ${glibcxx_srcdir}/scripts/check_performance # By adding these files here, automake will remove them for 'make clean' -CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum testsuite_* site.exp abi_check baseline_symbols +CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ + testsuite_* site.exp abi_check baseline_symbols -CONFIG_HEADER = ../config.h -CONFIG_CLEAN_FILES = -LIBRARIES = $(noinst_LIBRARIES) - - -DEFS = @DEFS@ -I. -I$(srcdir) -I.. -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -libv3test_a_LIBADD = -libv3test_a_OBJECTS = testsuite_hooks.$(OBJEXT) \ -testsuite_allocator.$(OBJEXT) -@GLIBCXX_TEST_ABI_TRUE@noinst_PROGRAMS = abi_check$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) - -abi_check_OBJECTS = abi_check.$(OBJEXT) +subdir = testsuite +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) + +libv3test_a_AR = $(AR) cru +libv3test_a_LIBADD = +am_libv3test_a_OBJECTS = testsuite_hooks.$(OBJEXT) \ + testsuite_allocator.$(OBJEXT) +libv3test_a_OBJECTS = $(am_libv3test_a_OBJECTS) +@GLIBCXX_TEST_ABI_TRUE@noinst_PROGRAMS = abi_check$(EXEEXT) +@GLIBCXX_TEST_ABI_FALSE@noinst_PROGRAMS = +PROGRAMS = $(noinst_PROGRAMS) + +am_abi_check_OBJECTS = abi_check.$(OBJEXT) +abi_check_OBJECTS = $(am_abi_check_OBJECTS) abi_check_LDADD = $(LDADD) -abi_check_DEPENDENCIES = -abi_check_LDFLAGS = -CXXFLAGS = @CXXFLAGS@ -CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +abi_check_DEPENDENCIES = +abi_check_LDFLAGS = + +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = +am__depfiles_maybe = +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = tar -GZIP_ENV = --best +DIST_SOURCES = $(libv3test_a_SOURCES) $(abi_check_SOURCES) +DIST_COMMON = $(top_srcdir)/fragment.am Makefile.am Makefile.in SOURCES = $(libv3test_a_SOURCES) $(abi_check_SOURCES) -OBJECTS = $(libv3test_a_OBJECTS) $(abi_check_OBJECTS) - -all: all-redirect -.SUFFIXES: -.SUFFIXES: .S .c .cc .lo .o .obj .s -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --cygnus testsuite/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status +all: all-am -mostlyclean-noinstLIBRARIES: +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/fragment.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign testsuite/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libv3test.a: $(libv3test_a_OBJECTS) $(libv3test_a_DEPENDENCIES) + -rm -f libv3test.a + $(libv3test_a_AR) libv3test.a $(libv3test_a_OBJECTS) $(libv3test_a_LIBADD) + $(RANLIB) libv3test.a -distclean-noinstLIBRARIES: - -maintainer-clean-noinstLIBRARIES: - -.c.o: - $(COMPILE) -c $< - -# FIXME: We should only use cygpath when building on Windows, -# and only if it is available. -.c.obj: - $(COMPILE) -c `cygpath -w $<` - -.s.o: - $(COMPILE) -c $< - -.S.o: - $(COMPILE) -c $< +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +abi_check$(EXEEXT): $(abi_check_OBJECTS) $(abi_check_DEPENDENCIES) + @rm -f abi_check$(EXEEXT) + $(CXXLINK) $(abi_check_LDFLAGS) $(abi_check_OBJECTS) $(abi_check_LDADD) $(LIBS) mostlyclean-compile: - -rm -f *.o core *.core - -rm -f *.$(OBJEXT) - -clean-compile: + -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c -maintainer-clean-compile: - -.c.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< +.cc.o: + $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< -.s.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< +.cc.obj: + $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` -.S.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< +.cc.lo: + $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< mostlyclean-libtool: -rm -f *.lo @@ -293,140 +350,156 @@ clean-libtool: -rm -rf .libs _libs distclean-libtool: + -rm -f libtool +uninstall-info-am: -maintainer-clean-libtool: - -libv3test.a: $(libv3test_a_OBJECTS) $(libv3test_a_DEPENDENCIES) - -rm -f libv3test.a - $(AR) cru libv3test.a $(libv3test_a_OBJECTS) $(libv3test_a_LIBADD) - $(RANLIB) libv3test.a - -mostlyclean-noinstPROGRAMS: - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -distclean-noinstPROGRAMS: - -maintainer-clean-noinstPROGRAMS: +ETAGS = etags +ETAGSFLAGS = -abi_check$(EXEEXT): $(abi_check_OBJECTS) $(abi_check_DEPENDENCIES) - @rm -f abi_check$(EXEEXT) - $(CXXLINK) $(abi_check_LDFLAGS) $(abi_check_OBJECTS) $(abi_check_LDADD) $(LIBS) -.cc.o: - $(CXXCOMPILE) -c $< -.cc.obj: - $(CXXCOMPILE) -c `cygpath -w $<` -.cc.lo: - $(LTCXXCOMPILE) -c $< +CTAGS = ctags +CTAGSFLAGS = tags: TAGS -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) + mkid -fID $$unique -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique -mostlyclean-tags: +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique -clean-tags: +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = testsuite - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done - -RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +RUNTESTFLAGS = +DEJATOOL = $(PACKAGE) +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +EXPECT = expect +RUNTEST = runtest check-DEJAGNU: site.exp - srcdir=`cd $(srcdir) && pwd`; export srcdir; \ + srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ - if [ -f $(top_builddir)/../expect/expect ]; then \ - TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \ - export TCL_LIBRARY; \ - fi; \ runtest=$(RUNTEST); \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ - $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + l='$(DEJATOOL)'; for tool in $$l; do \ + $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + done; \ else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi site.exp: Makefile @echo 'Making a new site.exp file...' - @test ! -f site.bak || rm -f site.bak - @echo '## these variables are automatically generated by make ##' > $@-t - @echo '# Do not edit here. If you wish to override these values' >> $@-t - @echo '# edit the last section' >> $@-t - @echo 'set tool $(DEJATOOL)' >> $@-t - @echo 'set srcdir $(srcdir)' >> $@-t - @echo 'set objdir' `pwd` >> $@-t - @echo 'set host_alias $(host_alias)' >> $@-t - @echo 'set host_triplet $(host_triplet)' >> $@-t - @echo 'set target_alias $(target_alias)' >> $@-t - @echo 'set target_triplet $(target_triplet)' >> $@-t - @echo 'set build_alias $(build_alias)' >> $@-t - @echo 'set build_triplet $(build_triplet)' >> $@-t - @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t - @test ! -f $(srcdir)/site.exp || sed '1,/^## All variables above are.*##/ d' $(srcdir)/site.exp >> $@-t + @echo '## these variables are automatically generated by make ##' >site.tmp + @echo '# Do not edit here. If you wish to override these values' >>site.tmp + @echo '# edit the last section' >>site.tmp + @echo 'set srcdir $(srcdir)' >>site.tmp + @echo "set objdir `pwd`" >>site.tmp + @echo 'set build_alias "$(build_alias)"' >>site.tmp + @echo 'set build_triplet $(build_triplet)' >>site.tmp + @echo 'set host_alias "$(host_alias)"' >>site.tmp + @echo 'set host_triplet $(host_triplet)' >>site.tmp + @echo 'set target_alias "$(target_alias)"' >>site.tmp + @echo 'set target_triplet $(target_triplet)' >>site.tmp + @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp + @test ! -f site.exp || \ + sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @-rm -f site.bak @test ! -f site.exp || mv site.exp site.bak - @mv $@-t site.exp -info-am: -info: info-am -dvi-am: -dvi: dvi-am -check-am: + @mv site.tmp site.exp + +distclean-DEJAGNU: + -rm -f site.exp site.bak + -l='$(DEJATOOL)'; for tool in $$l; do \ + rm -f $$tool.sum $$tool.log; \ + done +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/.. + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check-local check: check-am -installcheck-am: -installcheck: installcheck-am -install-info-am: -install-info: install-info-am -install-exec-am: -install-exec: install-exec-am +all-am: Makefile $(LIBRARIES) $(PROGRAMS) all-local -install-data-am: +installdirs: +install: install-am +install-exec: install-exec-am install-data: install-data-am +uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: -uninstall: uninstall-am -all-am: Makefile $(LIBRARIES) $(PROGRAMS) all-local -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: @@ -434,51 +507,69 @@ clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: -mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \ - mostlyclean-libtool mostlyclean-noinstPROGRAMS \ - mostlyclean-tags mostlyclean-generic + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am -mostlyclean: mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + clean-noinstPROGRAMS mostlyclean-am -clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \ - clean-noinstPROGRAMS clean-tags clean-generic \ - mostlyclean-am +distclean: distclean-am -clean: clean-am +distclean-am: clean-am distclean-DEJAGNU distclean-compile \ + distclean-generic distclean-libtool distclean-tags -distclean-am: distclean-noinstLIBRARIES distclean-compile \ - distclean-libtool distclean-noinstPROGRAMS \ - distclean-tags distclean-generic clean-am - -rm -f libtool +dvi: dvi-am -distclean: distclean-am +dvi-am: -maintainer-clean-am: maintainer-clean-noinstLIBRARIES \ - maintainer-clean-compile maintainer-clean-libtool \ - maintainer-clean-noinstPROGRAMS maintainer-clean-tags \ - maintainer-clean-generic distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: maintainer-clean: maintainer-clean-am -.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ -clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ -mostlyclean-compile distclean-compile clean-compile \ -maintainer-clean-compile mostlyclean-libtool distclean-libtool \ -clean-libtool maintainer-clean-libtool mostlyclean-noinstPROGRAMS \ -distclean-noinstPROGRAMS clean-noinstPROGRAMS \ -maintainer-clean-noinstPROGRAMS tags mostlyclean-tags distclean-tags \ -clean-tags maintainer-clean-tags distdir check-DEJAGNU info-am info \ -dvi-am dvi check-local check check-am installcheck-am installcheck \ -install-info-am install-info install-exec-am install-exec \ -install-data-am install-data install-am install uninstall-am uninstall \ -all-local all-redirect all-am all installdirs mostlyclean-generic \ -distclean-generic clean-generic maintainer-clean-generic clean \ -mostlyclean distclean maintainer-clean +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am all-local check check-DEJAGNU check-am \ + check-local clean clean-generic clean-libtool \ + clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \ + distclean-DEJAGNU distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am info \ + info-am install install-am install-data install-data-am \ + install-exec install-exec-am install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-info-am all-local: stamp_wchar testsuite_files @@ -502,7 +593,7 @@ baseline_symbols: exit 1; \ fi; true) -new-abi-baseline: +new-abi-baseline: -@$(mkinstalldirs) ${baseline_dir} -@(output=${baseline_file}; \ if test -f $${output}; then \ @@ -516,11 +607,11 @@ new-abi-baseline: # 'check-abi' to test for changes against that file. @GLIBCXX_TEST_ABI_TRUE@check-abi: abi_check baseline_symbols current_symbols.txt @GLIBCXX_TEST_ABI_TRUE@ -@(./abi_check --check ./current_symbols.txt ${baseline_file} \ -@GLIBCXX_TEST_ABI_TRUE@ 2>&1 | tee libstdc++-v3-abi.sum) +@GLIBCXX_TEST_ABI_TRUE@ 2>&1 | tee libstdc++-abi.sum) -@GLIBCXX_TEST_ABI_TRUE@check-abi-verbose: abi_check baseline_symbols current_symbols.txt +@GLIBCXX_TEST_ABI_TRUE@check-abi-verbose: abi_check baseline_symbols current_symbols.txt @GLIBCXX_TEST_ABI_TRUE@ -@(./abi_check --check-verbose ./current_symbols.txt ${baseline_file} \ -@GLIBCXX_TEST_ABI_TRUE@ 2>&1 | tee libstdc++-v3-abi.sum) +@GLIBCXX_TEST_ABI_TRUE@ 2>&1 | tee libstdc++-abi.sum) @GLIBCXX_TEST_ABI_FALSE@check-abi: @GLIBCXX_TEST_ABI_FALSE@check-abi-verbose: @@ -542,7 +633,6 @@ ${lists_of_files}: .PHONY: baseline_symbols new-abi-baseline check-abi check-abi-verbose \ check-script check-script-install check-performance - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libstdc++-v3/testsuite/data/cin_unget-1.txt b/libstdc++-v3/testsuite/data/cin_unget-1.txt new file mode 100644 index 00000000000..81c545efebe --- /dev/null +++ b/libstdc++-v3/testsuite/data/cin_unget-1.txt @@ -0,0 +1 @@ +1234 diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/01.cc b/libstdc++-v3/testsuite/demangle/abi_examples/01.cc index 8ce9ee3da4c..585cfe0435c 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/01.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/01.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // extern "C" function // extern "C" float f(void) { }; diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/02.cc b/libstdc++-v3/testsuite/demangle/abi_examples/02.cc index 44558e1faed..ce33e53894a 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/02.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/02.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // or variable "f" // int f; diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/03.cc b/libstdc++-v3/testsuite/demangle/abi_examples/03.cc index f807189fb09..a33fe48e4f9 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/03.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/03.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // or a global namespace variable "f" /* diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/04.cc b/libstdc++-v3/testsuite/demangle/abi_examples/04.cc index 7705d8d7117..0c8e9da6cc9 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/04.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/04.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // void f() { }; // int f() { }; diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/05.cc b/libstdc++-v3/testsuite/demangle/abi_examples/05.cc index 927b7e11d49..673a773d115 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/05.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/05.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // void f(int) { }; // int f(int) { }; diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/06.cc b/libstdc++-v3/testsuite/demangle/abi_examples/06.cc index 47f07a3096f..a016170a866 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/06.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/06.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // class bar { }; // void foo(bar) { }; diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/07.cc b/libstdc++-v3/testsuite/demangle/abi_examples/07.cc index e73c3dd5b93..b6943f222c3 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/07.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/07.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // class X { }; // int operator%(X, X) { }; diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/08.cc b/libstdc++-v3/testsuite/demangle/abi_examples/08.cc index 74394dc00bd..66b8dcb3e1c 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/08.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/08.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // int operator+(X&, X&) { }; verify_demangle("_ZplR1XS0_", "operator+(X&, X&)"); // XXX diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/09.cc b/libstdc++-v3/testsuite/demangle/abi_examples/09.cc index 8e56b104ab2..c014936f3ca 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/09.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/09.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // int operator<< (X const&, X const&) { }; verify_demangle("_ZlsRK1XS1_", "operator<<(X const&, X const&)"); diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/10.cc b/libstdc++-v3/testsuite/demangle/abi_examples/10.cc index 597e83bbae8..fc422a7cd04 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/10.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/10.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* template<typename T> diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/11.cc b/libstdc++-v3/testsuite/demangle/abi_examples/11.cc index 7201afbee55..abf547cc7bb 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/11.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/11.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // template<typename T> void f(int) { } // template void f<int>(int); diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/12.cc b/libstdc++-v3/testsuite/demangle/abi_examples/12.cc index c0c31a21f59..f0460fa4096 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/12.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/12.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* class Duo { }; diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/13.cc b/libstdc++-v3/testsuite/demangle/abi_examples/13.cc index 43aae1f34b3..79240561a1c 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/13.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/13.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* class Duo { }; diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/14.cc b/libstdc++-v3/testsuite/demangle/abi_examples/14.cc index 4bb70f643e0..26cf382374f 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/14.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/14.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* typedef void fun(double); diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/15.cc b/libstdc++-v3/testsuite/demangle/abi_examples/15.cc index b79f1cc859e..0adb9a20a23 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/15.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/15.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* namespace N diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/16.cc b/libstdc++-v3/testsuite/demangle/abi_examples/16.cc index 5afc643a304..c13cf6cbc05 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/16.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/16.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* namespace System diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/17.cc b/libstdc++-v3/testsuite/demangle/abi_examples/17.cc index e9ce1058673..dd9bc7815f2 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/17.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/17.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* namespace Arena diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/18.cc b/libstdc++-v3/testsuite/demangle/abi_examples/18.cc index 847568ca89c..3989da573b6 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/18.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/18.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* template<typename T1, typename T2> struct Stack diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/19.cc b/libstdc++-v3/testsuite/demangle/abi_examples/19.cc index f70a389f5bc..21d18342bf3 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/19.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/19.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("_Z1fI1XEvPVN1AIT_E1TE", "void f<X>(A<X>::T volatile*)"); diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/20.cc b/libstdc++-v3/testsuite/demangle/abi_examples/20.cc index 99517157437..a528b4318a6 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/20.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/20.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("_ZngILi42EEvN1AIXplT_Li2EEE1TE", "void operator-<42>(A<(42) + (2)>::T)"); diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/21.cc b/libstdc++-v3/testsuite/demangle/abi_examples/21.cc index debeb790fd2..ad186115596 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/21.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/21.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("_Z4makeI7FactoryiET_IT0_Ev", "Factory<int> make<Factory, int>()"); diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/22.cc b/libstdc++-v3/testsuite/demangle/abi_examples/22.cc index debeb790fd2..ad186115596 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/22.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/22.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("_Z4makeI7FactoryiET_IT0_Ev", "Factory<int> make<Factory, int>()"); diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/23.cc b/libstdc++-v3/testsuite/demangle/abi_examples/23.cc index 02f55a8cffc..4e3961afd08 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/23.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/23.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("_Z3foo5Hello5WorldS0_S_", "foo(Hello, World, World, Hello)"); diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/24.cc b/libstdc++-v3/testsuite/demangle/abi_examples/24.cc index e200574e873..888d5eb1729 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/24.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/24.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("_Z3fooPM2ABi", "foo(int AB::**)"); diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/25.cc b/libstdc++-v3/testsuite/demangle/abi_examples/25.cc index 04ba05bad96..3bb2b3f19fe 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/25.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/25.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // Equivalent // uncompressed, cp-dem diff --git a/libstdc++-v3/testsuite/demangle/abi_examples/26.cc b/libstdc++-v3/testsuite/demangle/abi_examples/26.cc index 075a80515cb..6f7f83e589c 100644 --- a/libstdc++-v3/testsuite/demangle/abi_examples/26.cc +++ b/libstdc++-v3/testsuite/demangle/abi_examples/26.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("_ZTI7a_class", "typeinfo for a_class"); diff --git a/libstdc++-v3/testsuite/demangle/abi_text/01.cc b/libstdc++-v3/testsuite/demangle/abi_text/01.cc index f26ec7c615e..33cfd01ac0b 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/01.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/01.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // 5.1.5 Type encodings. // int* volatile const restrict _far p; diff --git a/libstdc++-v3/testsuite/demangle/abi_text/02.cc b/libstdc++-v3/testsuite/demangle/abi_text/02.cc index 210ad98e687..aedf031c6b9 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/02.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/02.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // template<int I> void foo (int (&)[I + 1]) { }; // template void foo<2> (int (&)[3]); diff --git a/libstdc++-v3/testsuite/demangle/abi_text/03.cc b/libstdc++-v3/testsuite/demangle/abi_text/03.cc index 678fd287244..c880ae12b50 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/03.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/03.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // struct A; // void f (void (A::*)() const) {} diff --git a/libstdc++-v3/testsuite/demangle/abi_text/04.cc b/libstdc++-v3/testsuite/demangle/abi_text/04.cc index 66f739fffc2..2a7c8f6a2be 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/04.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/04.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // void foo(char); verify_demangle("_Z3fooc", "foo(char)"); diff --git a/libstdc++-v3/testsuite/demangle/abi_text/05.cc b/libstdc++-v3/testsuite/demangle/abi_text/05.cc index ddada2cdbb3..4dec5d3b8eb 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/05.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/05.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // void foo(char); // template<void (&)(char)> struct CB { }; diff --git a/libstdc++-v3/testsuite/demangle/abi_text/06.cc b/libstdc++-v3/testsuite/demangle/abi_text/06.cc index 01b09b407c6..1dc2d4f804c 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/06.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/06.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // extern "C" bool IsEmpty(char *); // template<void (&)(char *)> struct CB; diff --git a/libstdc++-v3/testsuite/demangle/abi_text/07.cc b/libstdc++-v3/testsuite/demangle/abi_text/07.cc index 2005dde6baf..3502e2ea629 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/07.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/07.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // 5.1.6 Scope Encoding /* diff --git a/libstdc++-v3/testsuite/demangle/abi_text/08.cc b/libstdc++-v3/testsuite/demangle/abi_text/08.cc index f85ef438429..00398478fb2 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/08.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/08.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // encoding of N::f::"Itanium C++ ABI" (no discriminator) verify_demangle("_ZZN1N1fEiEs", "N::f(int)::string literal"); diff --git a/libstdc++-v3/testsuite/demangle/abi_text/09.cc b/libstdc++-v3/testsuite/demangle/abi_text/09.cc index 66f03076f2a..97b2c64a286 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/09.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/09.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // encoding of N::f::X::g() // (third local mangled entity used as a class-qualifier) diff --git a/libstdc++-v3/testsuite/demangle/abi_text/10.cc b/libstdc++-v3/testsuite/demangle/abi_text/10.cc index 82f7392b23e..de44769d85f 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/10.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/10.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("_ZNZN1N1fEiE1X1gEv", "error code = -2: invalid mangled name"); diff --git a/libstdc++-v3/testsuite/demangle/abi_text/11.cc b/libstdc++-v3/testsuite/demangle/abi_text/11.cc index 7eed78762bf..aa349f578c8 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/11.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/11.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // 5.1.7 Compression. // typedef void T(); diff --git a/libstdc++-v3/testsuite/demangle/abi_text/12.cc b/libstdc++-v3/testsuite/demangle/abi_text/12.cc index 25c92c54daf..d19317ce03a 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/12.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/12.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // N::T<int, int>::mf(N::T<double, double>) verify_demangle("_ZN1N1TIiiE2mfES0_IddE", diff --git a/libstdc++-v3/testsuite/demangle/abi_text/13.cc b/libstdc++-v3/testsuite/demangle/abi_text/13.cc index 63a64e0d47d..da765f078c0 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/13.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/13.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // std::state verify_demangle("_ZSt5state", "std::state"); diff --git a/libstdc++-v3/testsuite/demangle/abi_text/14.cc b/libstdc++-v3/testsuite/demangle/abi_text/14.cc index 358c6e1a633..9cd854a8771 100644 --- a/libstdc++-v3/testsuite/demangle/abi_text/14.cc +++ b/libstdc++-v3/testsuite/demangle/abi_text/14.cc @@ -26,7 +26,7 @@ // http://www.codesourcery.com/cxx-abi/abi.html#mangling int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // std::_In::ward verify_demangle("_ZNSt3_In4wardE", "std::_In::ward"); diff --git a/libstdc++-v3/testsuite/demangle/regression/3111-1.cc b/libstdc++-v3/testsuite/demangle/regression/3111-1.cc index 6e7d702c289..38a27ece499 100644 --- a/libstdc++-v3/testsuite/demangle/regression/3111-1.cc +++ b/libstdc++-v3/testsuite/demangle/regression/3111-1.cc @@ -25,7 +25,7 @@ // c++/3111 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("_Z1fKPFiiE", "f(int (* const)(int))"); diff --git a/libstdc++-v3/testsuite/demangle/regression/3111-2.cc b/libstdc++-v3/testsuite/demangle/regression/3111-2.cc index fe6ceb3abed..8897c5069a1 100644 --- a/libstdc++-v3/testsuite/demangle/regression/3111-2.cc +++ b/libstdc++-v3/testsuite/demangle/regression/3111-2.cc @@ -25,7 +25,7 @@ // c++/3111 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem FAIL // icc FAIL diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-01.cc b/libstdc++-v3/testsuite/demangle/regression/7986-01.cc index f05f097fe2f..e864957db39 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-01.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-01.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem FAIL verify_demangle("_Z1fA37_iPS_", "f(int[37], int (*) [37])"); diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-02.cc b/libstdc++-v3/testsuite/demangle/regression/7986-02.cc index ae9d945cb01..7a10b0fd982 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-02.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-02.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // Equivalent, but formatting difference in void argument. // verify_demangle("_Z1fM1AFivEPS0_", "f(int (A::*)(void), int (*)(void))"); diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-03.cc b/libstdc++-v3/testsuite/demangle/regression/7986-03.cc index 2596f9aa161..02fc75b3e74 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-03.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-03.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem FAIL verify_demangle("_Z1fPFPA1_ivE", "f(int (*(*)()) [1])"); diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-04.cc b/libstdc++-v3/testsuite/demangle/regression/7986-04.cc index 23d1f1f9cd6..5c4acbf1b22 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-04.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-04.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem FAIL verify_demangle("_Z1fPKM1AFivE", "f(int (A::* const*)())"); diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-05.cc b/libstdc++-v3/testsuite/demangle/regression/7986-05.cc index b3393c903ff..e1216fc6376 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-05.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-05.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem FAIL verify_demangle("_Z1jM1AFivEPS1_", "j(int (A::*)(), int (A::**)())"); diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-06.cc b/libstdc++-v3/testsuite/demangle/regression/7986-06.cc index 360c70c1cfe..12c0d8b08e6 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-06.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-06.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem FAIL verify_demangle("_Z1sPA37_iPS0_", "s(int (*) [37], int (**) [37])"); diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-07.cc b/libstdc++-v3/testsuite/demangle/regression/7986-07.cc index 933c4c61e42..6a4dfb05024 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-07.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-07.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem FAIL verify_demangle("_Z3fooA30_A_i", "foo(int[30][])"); diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-08.cc b/libstdc++-v3/testsuite/demangle/regression/7986-08.cc index 20800856518..a6a01cc32d5 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-08.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-08.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem FAIL verify_demangle("_Z3kooPA28_A30_i", "koo(int (*) [28][30])"); diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-09.cc b/libstdc++-v3/testsuite/demangle/regression/7986-09.cc index 18a18b35c54..aef3ae2f6df 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-09.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-09.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem FAIL // Equivalent as considered order-insensitive? diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-10.cc b/libstdc++-v3/testsuite/demangle/regression/7986-10.cc index ff7fa4c3a6c..9833b7233db 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-10.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-10.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("_ZlsRKU3fooU4bart1XS2_", "operator<<(X bart foo const&, X bart foo const)"); diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-11.cc b/libstdc++-v3/testsuite/demangle/regression/7986-11.cc index 49114d2c8ac..d2076ac58e3 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-11.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-11.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem FAIL verify_demangle("_Z1fM1AKFivE", "f(int (A::*)() const)"); diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-12.cc b/libstdc++-v3/testsuite/demangle/regression/7986-12.cc index 64a400f781f..97e76cc9af7 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986-12.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986-12.cc @@ -25,7 +25,7 @@ // libstdc++/7986 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // ICE on figmative float template parameters? /* diff --git a/libstdc++-v3/testsuite/demangle/regression/7986.cc b/libstdc++-v3/testsuite/demangle/regression/7986.cc index 05fa6a71c29..42f2139089b 100644 --- a/libstdc++-v3/testsuite/demangle/regression/7986.cc +++ b/libstdc++-v3/testsuite/demangle/regression/7986.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; return 0; diff --git a/libstdc++-v3/testsuite/demangle/regression/8897.cc b/libstdc++-v3/testsuite/demangle/regression/8897.cc index f40b90f30f6..ed68f33314d 100644 --- a/libstdc++-v3/testsuite/demangle/regression/8897.cc +++ b/libstdc++-v3/testsuite/demangle/regression/8897.cc @@ -25,7 +25,7 @@ // c++/8897 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* template<typename T1> diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-01.cc b/libstdc++-v3/testsuite/demangle/regression/cw-01.cc index cda35f6a808..3a8dbc2e8e0 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-01.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-01.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* class libcw_app_ct { diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-02.cc b/libstdc++-v3/testsuite/demangle/regression/cw-02.cc index 7c0d613bee3..51f3807b186 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-02.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-02.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* namespace libcw { diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-03.cc b/libstdc++-v3/testsuite/demangle/regression/cw-03.cc index 0ab62327e4e..ca846b9bc7e 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-03.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-03.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* namespace libcw { diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-04.cc b/libstdc++-v3/testsuite/demangle/regression/cw-04.cc index d2a7c09cdbc..27eb55854af 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-04.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-04.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-05.cc b/libstdc++-v3/testsuite/demangle/regression/cw-05.cc index e56c834aeb5..5c9e25f4a50 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-05.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-05.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* struct memory_block_st { }; diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-06.cc b/libstdc++-v3/testsuite/demangle/regression/cw-06.cc index 5c22d177d9b..943a7163732 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-06.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-06.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* struct option { }; diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-07.cc b/libstdc++-v3/testsuite/demangle/regression/cw-07.cc index 25f3661fe50..a34e6f87ffe 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-07.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-07.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-08.cc b/libstdc++-v3/testsuite/demangle/regression/cw-08.cc index 25280a5151c..5bd2cf2892a 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-08.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-08.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* class A { }; diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-09.cc b/libstdc++-v3/testsuite/demangle/regression/cw-09.cc index 0ad38f1d291..3da7fe861c0 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-09.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-09.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-10.cc b/libstdc++-v3/testsuite/demangle/regression/cw-10.cc index ab0da2af05f..c4efcd30bf1 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-10.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-10.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-11.cc b/libstdc++-v3/testsuite/demangle/regression/cw-11.cc index d763e8c56af..e5405b2f6e9 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-11.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-11.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem CORE verify_demangle("_X11TransParseAddress", "_X11TransParseAddress"); diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-12.cc b/libstdc++-v3/testsuite/demangle/regression/cw-12.cc index cb6a40ee548..8838a8a1c2b 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-12.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-12.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* namespace std { diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-13.cc b/libstdc++-v3/testsuite/demangle/regression/cw-13.cc index 8fe07fd44a6..ec883be1de3 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-13.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-13.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; // cplus-dem CORE verify_demangle("_GLOBAL__I__Z2fnv", "global constructors keyed to fn()"); diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-14.cc b/libstdc++-v3/testsuite/demangle/regression/cw-14.cc index 613c0c8b32c..84b6532d372 100644 --- a/libstdc++-v3/testsuite/demangle/regression/cw-14.cc +++ b/libstdc++-v3/testsuite/demangle/regression/cw-14.cc @@ -25,7 +25,7 @@ // libcwd tests int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; /* struct G { diff --git a/libstdc++-v3/testsuite/demangle/regression/old.cc b/libstdc++-v3/testsuite/demangle/regression/old.cc index 7bb8484d78c..d9313f9fd45 100644 --- a/libstdc++-v3/testsuite/demangle/regression/old.cc +++ b/libstdc++-v3/testsuite/demangle/regression/old.cc @@ -25,7 +25,7 @@ // old libiberty tests for gnu-v3 int main() { - using namespace __gnu_cxx_test; + using namespace __gnu_test; verify_demangle("St9bad_alloc", "std::bad_alloc"); return 0; } diff --git a/libstdc++-v3/testsuite/ext/pod_char_traits.cc b/libstdc++-v3/testsuite/ext/pod_char_traits.cc index c3c4eee2594..0a6934830d7 100644 --- a/libstdc++-v3/testsuite/ext/pod_char_traits.cc +++ b/libstdc++-v3/testsuite/ext/pod_char_traits.cc @@ -34,13 +34,12 @@ int main() { - using namespace std; using namespace __gnu_cxx; typedef unsigned short value_type; typedef unsigned int int_type; typedef character<value_type, int_type> char_type; - typedef char_traits<char_type> traits_type; + typedef std::char_traits<char_type> traits_type; bool test = true; @@ -55,7 +54,7 @@ int main() test = traits_type::eq(c1, c2); // 3 basic_string<char_type> - typedef basic_string<char_type> string_type; + typedef std::basic_string<char_type> string_type; string_type str; char_type c3 = { value_type('b') }; char_type c4 = { value_type('o') }; diff --git a/libstdc++-v3/testsuite/ext/stdio_filebuf.cc b/libstdc++-v3/testsuite/ext/stdio_filebuf.cc index ec3481562a0..8b313b3f31f 100644 --- a/libstdc++-v3/testsuite/ext/stdio_filebuf.cc +++ b/libstdc++-v3/testsuite/ext/stdio_filebuf.cc @@ -29,7 +29,7 @@ namespace test { using namespace std; - using __gnu_cxx_test::pod_char; + using __gnu_test::pod_char; typedef short type_t; template class __gnu_cxx::stdio_filebuf<type_t, char_traits<type_t> >; template class __gnu_cxx::stdio_filebuf<pod_char, char_traits<pod_char> >; diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc index cffcf37590f..095829621fb 100644 --- a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc +++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc @@ -52,13 +52,89 @@ void test01() VERIFY( sbuf.sgetn(buf, 5) == 5 ); VERIFY( !memcmp(buf, c_lit + 3, 5) ); VERIFY( getc(fin) == c_lit[8] ); - VERIFY( sbuf.sungetc() == EOF ); fclose(fin); } +// libstdc++/12048 +void test02() +{ + bool test = true; + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf<char> sbuf(file); + int c1 = sbuf.sbumpc(); + VERIFY( c1 != EOF ); + int c2 = sbuf.sungetc(); + VERIFY( c2 != EOF ); + int c3 = sbuf.sbumpc(); + VERIFY( c3 == c1 ); + + std::fclose(file); +} + +// libstdc++/12048 +void test03() +{ + bool test = true; + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf<char> sbuf(file); + int c1 = sbuf.sbumpc(); + VERIFY( c1 != EOF ); + int c2 = sbuf.sungetc(); + VERIFY( c2 != EOF ); + int c3 = std::fgetc(file); + VERIFY( c3 == c1 ); + + std::fclose(file); +} + +// libstdc++/12048 +void test04() +{ + bool test = true; + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf<char> sbuf(file); + char buf[2]; + VERIFY( sbuf.sgetn(buf, 2) == 2 ); + int c2 = sbuf.sungetc(); + VERIFY( c2 != EOF ); + int c3 = sbuf.sbumpc(); + VERIFY( c3 == std::char_traits<char>::to_int_type(buf[1]) ); + + std::fclose(file); +} + +// libstdc++/12048 +void test05() +{ + bool test = true; + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf<char> sbuf(file); + char buf[2]; + VERIFY( sbuf.sgetn(buf, 2) == 2 ); + int c2 = sbuf.sungetc(); + VERIFY( c2 != EOF ); + int c3 = std::fgetc(file); + VERIFY( c3 == std::char_traits<char>::to_int_type(buf[1]) ); + + std::fclose(file); +} + int main () { test01(); + test02(); + test03(); + test04(); + test05(); + return 0; } diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc index a8cde4abda1..25276a2d677 100644 --- a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc +++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc @@ -53,13 +53,89 @@ void test01() VERIFY( wsbuf.sgetn(buf, 5) == 5 ); VERIFY( !wmemcmp(buf, w_lit + 3, 5) ); VERIFY( getwc(fin) == w_lit[8] ); - VERIFY( wsbuf.sungetc() == WEOF ); fclose(fin); } +// libstdc++/12048 +void test02() +{ + bool test = true; + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf<wchar_t> sbuf(file); + std::wint_t c1 = sbuf.sbumpc(); + VERIFY( c1 != WEOF ); + std::wint_t c2 = sbuf.sungetc(); + VERIFY( c2 != WEOF ); + std::wint_t c3 = sbuf.sbumpc(); + VERIFY( c3 == c1 ); + + std::fclose(file); +} + +// libstdc++/12048 +void test03() +{ + bool test = true; + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf<wchar_t> sbuf(file); + std::wint_t c1 = sbuf.sbumpc(); + VERIFY( c1 != WEOF ); + std::wint_t c2 = sbuf.sungetc(); + VERIFY( c2 != WEOF ); + std::wint_t c3 = std::fgetwc(file); + VERIFY( c3 == c1 ); + + std::fclose(file); +} + +// libstdc++/12048 +void test04() +{ + bool test = true; + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf<wchar_t> sbuf(file); + wchar_t buf[2]; + VERIFY( sbuf.sgetn(buf, 2) == 2 ); + std::wint_t c2 = sbuf.sungetc(); + VERIFY( c2 != WEOF ); + std::wint_t c3 = sbuf.sbumpc(); + VERIFY( c3 == std::char_traits<wchar_t>::to_int_type(buf[1]) ); + + std::fclose(file); +} + +// libstdc++/12048 +void test05() +{ + bool test = true; + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf<wchar_t> sbuf(file); + wchar_t buf[2]; + VERIFY( sbuf.sgetn(buf, 2) == 2 ); + std::wint_t c2 = sbuf.sungetc(); + VERIFY( c2 != WEOF ); + std::wint_t c3 = std::fgetwc(file); + VERIFY( c3 == std::char_traits<wchar_t>::to_int_type(buf[1]) ); + + std::fclose(file); +} + int main () { test01(); + test02(); + test03(); + test04(); + test05(); + return 0; } diff --git a/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index c7e2a9b909d..133acec63b2 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -14,30 +14,30 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# Define libstdc++-v3 callbacks for dg.exp. +# Define callbacks for dg.exp. This file is loaded early. load_lib dg.exp load_lib libgloss.exp load_lib prune.exp -# Called once, by libstdc++-v3-init below. "Static" to this file. -proc libstdc++-v3-copy-files {srcfiles dstdir} { +# Called by v3-init below. "Static" to this file. +proc v3-copy-files {srcfiles dstdir} { foreach f $srcfiles { - if { [catch { set symlink [file readlink $f] } x] } then { - file copy -force $f $dstdir - } else { - if { [regexp "^/" "$symlink"] } then { - file copy -force $symlink $dstdir - } else { - set dirname [file dirname $f] - file copy -force $dirname/$symlink $dstdir - } - } + if { [catch { set symlink [file readlink $f] } x] } then { + file copy -force $f $dstdir + } else { + if { [regexp "^/" "$symlink"] } then { + file copy -force $symlink $dstdir + } else { + set dirname [file dirname $f] + file copy -force $dirname/$symlink $dstdir + } + } } } -# Called once, from libstdc++-v3.dg/dg.exp. -proc libstdc++-v3-init { args } { +# Called once, from libstdc++/dg.exp. +proc v3-init { args } { global srcdir global outdir global blddir @@ -56,15 +56,15 @@ proc libstdc++-v3-init { args } { set dg-do-what-default run # Copy any required data files. - libstdc++-v3-copy-files [glob -nocomplain "$srcdir/data/*.tst"] $outdir - libstdc++-v3-copy-files [glob -nocomplain "$srcdir/data/*.txt"] $outdir + v3-copy-files [glob -nocomplain "$srcdir/data/*.tst"] $outdir + v3-copy-files [glob -nocomplain "$srcdir/data/*.txt"] $outdir # set LD_LIBRARY_PATH so that libgcc_s, libstdc++ binaries can be found. # locate libgcc.a so we don't need to account for different values of # SHLIB_EXT on different platforms set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] if {$gccdir != ""} { - set gccdir [file dirname $gccdir] + set gccdir [file dirname $gccdir] } set ld_library_path "." @@ -72,15 +72,15 @@ proc libstdc++-v3-init { args } { set compiler ${gccdir}/g++ if { [is_remote host] == 0 && [which $compiler] != 0 } { foreach i "[exec $compiler --print-multi-lib]" { - set mldir "" - regexp -- "\[a-z0-9=/\.-\]*;" $i mldir - set mldir [string trimright $mldir "\;@"] - if { "$mldir" == "." } { - continue - } - if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] == 1 } { - append ld_library_path ":${gccdir}/${mldir}" - } + set mldir "" + regexp -- "\[a-z0-9=/\.-\]*;" $i mldir + set mldir [string trimright $mldir "\;@"] + if { "$mldir" == "." } { + continue + } + if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] == 1 } { + append ld_library_path ":${gccdir}/${mldir}" + } } } append ld_library_path ":${blddir}/src/.libs" @@ -107,7 +107,7 @@ proc libstdc++-v3-init { args } { return "untested" } set cxx [transform "g++"] - set cxxflags "-ggdb3 -DDEBUG_ASSERT" + set cxxflags "-ggdb3 -D_GLIBCXX_ASSERT" set includes "-I./" } else { # If we find a testsuite_flags file, we're testing in the build dir. @@ -118,7 +118,7 @@ proc libstdc++-v3-init { args } { set includes [exec sh $flags_file --build-includes] } else { set cxx [transform "g++"] - set cxxflags "-ggdb3 -DDEBUG_ASSERT" + set cxxflags "-ggdb3 -D_GLIBCXX_ASSERT" set includes "-I${srcdir}" } } @@ -137,55 +137,55 @@ proc libstdc++-v3-init { args } { } # Callback from system dg-test. -proc libstdc++-v3-dg-test { prog do_what extra_tool_flags } { +proc libstdc++-dg-test { prog do_what extra_tool_flags } { # Set up the compiler flags, based on what we're going to do. switch $do_what { - "preprocess" { - set compile_type "preprocess" - set output_file "[file rootname [file tail $prog]].i" - } - "compile" { - set compile_type "assembly" - set output_file "[file rootname [file tail $prog]].s" - } - "assemble" { - set compile_type "object" - set output_file "[file rootname [file tail $prog]].o" - } - "link" { - set compile_type "executable" - set output_file "./[file rootname [file tail $prog]].exe" - } - "run" { - set compile_type "executable" - # FIXME: "./" is to cope with "." not being in $PATH. - # Should this be handled elsewhere? - # YES. - set output_file "./[file rootname [file tail $prog]].exe" - # This is the only place where we care if an executable was - # created or not. If it was, dg.exp will try to run it. - remote_file build delete $output_file; - } - default { - perror "$do_what: not a valid dg-do keyword" - return "" - } + "preprocess" { + set compile_type "preprocess" + set output_file "[file rootname [file tail $prog]].i" + } + "compile" { + set compile_type "assembly" + set output_file "[file rootname [file tail $prog]].s" + } + "assemble" { + set compile_type "object" + set output_file "[file rootname [file tail $prog]].o" + } + "link" { + set compile_type "executable" + set output_file "./[file rootname [file tail $prog]].exe" + } + "run" { + set compile_type "executable" + # FIXME: "./" is to cope with "." not being in $PATH. + # Should this be handled elsewhere? + # YES. + set output_file "./[file rootname [file tail $prog]].exe" + # This is the only place where we care if an executable was + # created or not. If it was, dg.exp will try to run it. + remote_file build delete $output_file; + } + default { + perror "$do_what: not a valid dg-do keyword" + return "" + } } set options "" if { $extra_tool_flags != "" } { - lappend options "additional_flags=$extra_tool_flags" + lappend options "additional_flags=$extra_tool_flags" } - set comp_output [libstdc++-v3_target_compile "$prog" "$output_file" "$compile_type" $options]; + set comp_output [v3_target_compile "$prog" "$output_file" "$compile_type" $options]; set comp_output [ prune_g++_output $comp_output ]; return [list $comp_output $output_file] } -# Called from libstdc++-v3-dg-test above. Calls back into system's +# Called from libstdc++-dg-test above. Calls back into system's # target_compile to actually do the work. -proc libstdc++-v3_target_compile { source dest type options } { +proc v3_target_compile { source dest type options } { global gluefile global wrap_flags global cxx @@ -194,8 +194,8 @@ proc libstdc++-v3_target_compile { source dest type options } { global blddir if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } { - lappend options "libs=${gluefile}" - lappend options "ldflags=${wrap_flags}" + lappend options "libs=${gluefile}" + lappend options "ldflags=${wrap_flags}" } set cxx_final $cxx @@ -215,7 +215,7 @@ proc libstdc++-v3_target_compile { source dest type options } { } -# Called once, from libstdc++-v3.dg/dg.exp. +# Called once, from libstdc++*/dg.exp. proc v3-list-tests { filename } { global srcdir global outdir @@ -225,16 +225,16 @@ proc v3-list-tests { filename } { # If there is a testsuite_file, use it. if { [file exists $tests_file] } { - set f [open $tests_file] - while { ! [eof $f] } { - set t [gets $f] - if { [string length "$t"] != 0 } { - lappend sfiles ${srcdir}/${t} - } - } - close $f + set f [open $tests_file] + while { ! [eof $f] } { + set t [gets $f] + if { [string length "$t"] != 0 } { + lappend sfiles ${srcdir}/${t} + } + } + close $f } else { - verbose "cannot open $tests_file" + verbose "cannot open $tests_file" } return $sfiles } diff --git a/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp b/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp deleted file mode 100644 index 00420992093..00000000000 --- a/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# libstdc++-v3 testsuite that uses the 'dg.exp' driver. - -# Load support procs. -load_lib libstdc++-v3-dg.exp - -# If a testcase doesn't have special options, use these. -global DEFAULT_CXXFLAGS -if ![info exists DEFAULT_CXXFLAGS] then { - set DEFAULT_CXXFLAGS "-DDEBUG_ASSERT" -} - -# Initialize 'dg' last or dejagnu exits with an error... -dg-init -libstdc++-v3-init - -# Main loop. -dg-runtest [v3-list-tests testsuite_files] "" $DEFAULT_CXXFLAGS -#dg-runtest [v3-list-tests testsuite_files_interactive] "" $DEFAULT_CXXFLAGS - -# All done. -dg-finish diff --git a/libstdc++-v3/testsuite/performance/allocator.cc b/libstdc++-v3/testsuite/performance/allocator.cc index 42997e952ca..4cd615e1a83 100644 --- a/libstdc++-v3/testsuite/performance/allocator.cc +++ b/libstdc++-v3/testsuite/performance/allocator.cc @@ -189,7 +189,7 @@ test_ints_mt_alloc(int iterations) // http://gcc.gnu.org/ml/libstdc++/2003-05/msg00231.html int main(void) { - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/complex_norm.cc b/libstdc++-v3/testsuite/performance/complex_norm.cc index 952e727ba56..6ed280c306a 100644 --- a/libstdc++-v3/testsuite/performance/complex_norm.cc +++ b/libstdc++-v3/testsuite/performance/complex_norm.cc @@ -32,7 +32,7 @@ int main() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/cout_insert_int.cc b/libstdc++-v3/testsuite/performance/cout_insert_int.cc index 66f15df032b..87b1871a7b1 100644 --- a/libstdc++-v3/testsuite/performance/cout_insert_int.cc +++ b/libstdc++-v3/testsuite/performance/cout_insert_int.cc @@ -32,7 +32,7 @@ int main() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/filebuf_copy.cc b/libstdc++-v3/testsuite/performance/filebuf_copy.cc index f393b92c0a3..608ca2933fa 100644 --- a/libstdc++-v3/testsuite/performance/filebuf_copy.cc +++ b/libstdc++-v3/testsuite/performance/filebuf_copy.cc @@ -32,7 +32,7 @@ int main() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/filebuf_sputc.cc b/libstdc++-v3/testsuite/performance/filebuf_sputc.cc index cdf030d0fba..c286da0202d 100644 --- a/libstdc++-v3/testsuite/performance/filebuf_sputc.cc +++ b/libstdc++-v3/testsuite/performance/filebuf_sputc.cc @@ -33,7 +33,7 @@ int main() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/fstream_seek_write.cc b/libstdc++-v3/testsuite/performance/fstream_seek_write.cc index 6c56c27a76b..838eae40245 100644 --- a/libstdc++-v3/testsuite/performance/fstream_seek_write.cc +++ b/libstdc++-v3/testsuite/performance/fstream_seek_write.cc @@ -32,7 +32,7 @@ int main() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/ifstream_getline.cc b/libstdc++-v3/testsuite/performance/ifstream_getline.cc index b7ca9976078..5f745732a18 100644 --- a/libstdc++-v3/testsuite/performance/ifstream_getline.cc +++ b/libstdc++-v3/testsuite/performance/ifstream_getline.cc @@ -32,7 +32,7 @@ int main () { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/list_create_fill_sort.cc b/libstdc++-v3/testsuite/performance/list_create_fill_sort.cc index 6b3afa5e6cd..ee3ff3369d6 100644 --- a/libstdc++-v3/testsuite/performance/list_create_fill_sort.cc +++ b/libstdc++-v3/testsuite/performance/list_create_fill_sort.cc @@ -39,7 +39,7 @@ static void create_and_fill_and_sort(const unsigned int n) int main() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/map_create_fill.cc b/libstdc++-v3/testsuite/performance/map_create_fill.cc index 5c3698ba383..b2f52554143 100644 --- a/libstdc++-v3/testsuite/performance/map_create_fill.cc +++ b/libstdc++-v3/testsuite/performance/map_create_fill.cc @@ -37,7 +37,7 @@ static void create_and_fill(const unsigned int n) int main() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/ofstream_insert_float.cc b/libstdc++-v3/testsuite/performance/ofstream_insert_float.cc index 910291a4e01..6e510416602 100644 --- a/libstdc++-v3/testsuite/performance/ofstream_insert_float.cc +++ b/libstdc++-v3/testsuite/performance/ofstream_insert_float.cc @@ -32,7 +32,7 @@ int main() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/ofstream_insert_int.cc b/libstdc++-v3/testsuite/performance/ofstream_insert_int.cc index c2e591a0f22..83fbeb835b0 100644 --- a/libstdc++-v3/testsuite/performance/ofstream_insert_int.cc +++ b/libstdc++-v3/testsuite/performance/ofstream_insert_int.cc @@ -32,7 +32,7 @@ int main() { using namespace std; - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; diff --git a/libstdc++-v3/testsuite/performance/string_append.cc b/libstdc++-v3/testsuite/performance/string_append.cc index c07c3af0699..846d424c65c 100644 --- a/libstdc++-v3/testsuite/performance/string_append.cc +++ b/libstdc++-v3/testsuite/performance/string_append.cc @@ -52,7 +52,7 @@ test_append_string(int how_much) void run_benchmark1(int how_much) { - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; start_counters(time, resource); @@ -64,7 +64,7 @@ run_benchmark1(int how_much) void run_benchmark2(int how_much) { - using namespace __gnu_cxx_test; + using namespace __gnu_test; time_counter time; resource_counter resource; start_counters(time, resource); diff --git a/libstdc++-v3/testsuite/testsuite_allocator.cc b/libstdc++-v3/testsuite/testsuite_allocator.cc index 775b2535026..a98e38884d3 100644 --- a/libstdc++-v3/testsuite/testsuite_allocator.cc +++ b/libstdc++-v3/testsuite/testsuite_allocator.cc @@ -30,7 +30,7 @@ #include <testsuite_allocator.h> -namespace __gnu_cxx_test +namespace __gnu_test { allocation_tracker::size_type allocation_tracker::allocationTotal_ = 0; allocation_tracker::size_type allocation_tracker::deallocationTotal_ = 0; diff --git a/libstdc++-v3/testsuite/testsuite_allocator.h b/libstdc++-v3/testsuite/testsuite_allocator.h index 675830eca97..866fe7cce18 100644 --- a/libstdc++-v3/testsuite/testsuite_allocator.h +++ b/libstdc++-v3/testsuite/testsuite_allocator.h @@ -38,7 +38,7 @@ #include <cstddef> #include <limits> -namespace __gnu_cxx_test +namespace __gnu_test { class allocation_tracker { @@ -169,7 +169,7 @@ namespace __gnu_cxx_test bool operator!=(const tracker_alloc<T1>&, const tracker_alloc<T2>&) throw() { return false; } -}; // namespace __gnu_cxx_test +}; // namespace __gnu_test #endif // _GLIBCXX_TESTSUITE_ALLOCATOR_H diff --git a/libstdc++-v3/testsuite/testsuite_hooks.cc b/libstdc++-v3/testsuite/testsuite_hooks.cc index 793c1dc6354..a2ace1156e4 100644 --- a/libstdc++-v3/testsuite/testsuite_hooks.cc +++ b/libstdc++-v3/testsuite/testsuite_hooks.cc @@ -42,7 +42,7 @@ #include <locale> #include <cxxabi.h> -namespace __gnu_cxx_test +namespace __gnu_test { #ifdef _GLIBCXX_MEM_LIMITS void @@ -155,8 +155,9 @@ namespace __gnu_cxx_test if (res != NULL) { string preLC_ALL = res; - for (func_callback::const_iterator i = l.begin(); i != l.end(); ++i) - (*i)(); + const func_callback::test_type* tests = l.tests(); + for (int i = 0; i < l.size(); ++i) + (*tests[i])(); string postLC_ALL= setlocale(LC_ALL, NULL); VERIFY( preLC_ALL == postLC_ALL ); } @@ -180,8 +181,9 @@ namespace __gnu_cxx_test const char* oldENV = getenv(env); if (!setenv(env, name, 1)) { - for (func_callback::const_iterator i = l.begin(); i != l.end(); ++i) - (*i)(); + const func_callback::test_type* tests = l.tests(); + for (int i = 0; i < l.size(); ++i) + (*tests[i])(); setenv(env, oldENV ? oldENV : "", 1); } else diff --git a/libstdc++-v3/testsuite/testsuite_hooks.h b/libstdc++-v3/testsuite/testsuite_hooks.h index 896bf1cbcae..698433582cf 100644 --- a/libstdc++-v3/testsuite/testsuite_hooks.h +++ b/libstdc++-v3/testsuite/testsuite_hooks.h @@ -30,7 +30,7 @@ // This file provides the following: // -// 1) VERIFY(), via DEBUG_ASSERT, from Brent Verner <brent@rcfile.org>. +// 1) VERIFY(), via _GLIBCXX_ASSERT, from Brent Verner <brent@rcfile.org>. // This file is included in the various testsuite programs to provide // #define(able) assert() behavior for debugging/testing. It may be // a suitable location for other furry woodland creatures as well. @@ -61,13 +61,12 @@ #include <bits/c++config.h> #include <bits/functexcept.h> #include <cstddef> -#ifdef DEBUG_ASSERT +#ifdef _GLIBCXX_ASSERT # include <cassert> # define VERIFY(fn) assert(fn) #else # define VERIFY(fn) test &= (fn) #endif -#include <list> #include <locale> #ifdef _GLIBCXX_HAVE_UNISTD_H # include <unistd.h> @@ -75,7 +74,7 @@ # define unlink(x) #endif -namespace __gnu_cxx_test +namespace __gnu_test { // All macros are defined in GLIBCXX_CONFIGURE_TESTSUITE and imported // from c++config.h @@ -100,8 +99,32 @@ namespace __gnu_cxx_test // Simple callback structure for variable numbers of tests (all with // same signature). Assume all unit tests are of the signature // void test01(); - typedef void (*test_func) (void); - typedef std::list<test_func> func_callback; + class func_callback + { + public: + typedef void (*test_type) (void); + + private: + int _M_size; + test_type _M_tests[15]; + + public: + func_callback(): _M_size(0) { }; + + int + size() const { return _M_size; } + + const test_type* + tests() const { return _M_tests; } + + void + push_back(test_type test) + { + _M_tests[_M_size] = test; + ++_M_size; + } + }; + // Run select unit tests after setting global locale. void @@ -127,16 +150,6 @@ namespace __gnu_cxx_test int i; }; - struct pod_unsigned_int - { - unsigned int i; - }; - - struct pod_long - { - unsigned long i; - }; - struct state { unsigned long l; @@ -157,7 +170,7 @@ namespace __gnu_cxx_test ~counter() { --count; } }; -#define assert_count(n) VERIFY(__gnu_cxx_test::counter::count == n) +#define assert_count(n) VERIFY(__gnu_test::counter::count == n) // A (static) class for counting copy constructors and possibly throwing an // exception on a desired count. @@ -310,7 +323,7 @@ namespace __gnu_cxx_test inline bool operator==(const copy_tracker& lhs, const copy_tracker& rhs) { return lhs.id() == rhs.id(); } -} // namespace __gnu_cxx_test +} // namespace __gnu_test namespace std { @@ -319,13 +332,13 @@ namespace std // char_traits specialization template<> - struct char_traits<__gnu_cxx_test::pod_char> + struct char_traits<__gnu_test::pod_char> { - typedef __gnu_cxx_test::pod_char char_type; - typedef __gnu_cxx_test::pod_int int_type; + typedef __gnu_test::pod_char char_type; + typedef __gnu_test::pod_int int_type; typedef long pos_type; typedef unsigned long off_type; - typedef __gnu_cxx_test::state state_type; + typedef __gnu_test::state state_type; static void assign(char_type& __c1, const char_type& __c2); diff --git a/libstdc++-v3/testsuite/testsuite_io.h b/libstdc++-v3/testsuite/testsuite_io.h index 6d8c24975a5..a499f9fedc4 100644 --- a/libstdc++-v3/testsuite/testsuite_io.h +++ b/libstdc++-v3/testsuite/testsuite_io.h @@ -33,7 +33,7 @@ #include <fstream> -namespace __gnu_cxx_test +namespace __gnu_test { // Used to verify the constraints/requirements on get and put areas // as defined in @@ -73,7 +73,7 @@ namespace __gnu_cxx_test } }; -}; // namespace __gnu_cxx_test +}; // namespace __gnu_test #endif // _GLIBCXX_TESTSUITE_IO_H diff --git a/libstdc++-v3/testsuite/testsuite_performance.h b/libstdc++-v3/testsuite/testsuite_performance.h index 0e82137c614..9ec2f865191 100644 --- a/libstdc++-v3/testsuite/testsuite_performance.h +++ b/libstdc++-v3/testsuite/testsuite_performance.h @@ -40,6 +40,13 @@ #ifdef __linux__ #include <malloc.h> +#elif defined (__FreeBSD__) +extern "C" +{ + struct mallinfo { int uordblks; }; + struct mallinfo mallinfo(void) + { struct mallinfo m = { (((size_t) sbrk (0) + 1023) / 1024) }; return m; } +} #else extern "C" { @@ -49,7 +56,7 @@ extern "C" } #endif -namespace __gnu_cxx_test +namespace __gnu_test { class time_counter { @@ -170,7 +177,7 @@ namespace __gnu_cxx_test { const char space = ' '; const char tab = '\t'; - const char* name = "libstdc++-v3-performance.sum"; + const char* name = "libstdc++-performance.sum"; std::string::const_iterator i = file.begin() + file.find_last_of('/') + 1; std::string testname(i, file.end()); @@ -190,7 +197,7 @@ namespace __gnu_cxx_test out << std::endl; out.close(); } -}; // namespace __gnu_cxx_test +}; // namespace __gnu_test #endif // _GLIBCXX_PERFORMANCE_H diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc index 2ea52ca975a..1283a75119a 100644 --- a/libstdc++-v3/testsuite/thread/pthread1.cc +++ b/libstdc++-v3/testsuite/thread/pthread1.cc @@ -18,8 +18,8 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* } } // { dg-options "-pthreads" { target *-*-solaris* } } // This multi-threading C++/STL/POSIX code adheres to rules outlined here: diff --git a/libstdc++-v3/testsuite/thread/pthread2.cc b/libstdc++-v3/testsuite/thread/pthread2.cc index 2ce17b72ba9..7fbdfc03aeb 100644 --- a/libstdc++-v3/testsuite/thread/pthread2.cc +++ b/libstdc++-v3/testsuite/thread/pthread2.cc @@ -19,8 +19,8 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <fstream> diff --git a/libstdc++-v3/testsuite/thread/pthread3.cc b/libstdc++-v3/testsuite/thread/pthread3.cc index 70fd9ead58a..ca8f77147e7 100644 --- a/libstdc++-v3/testsuite/thread/pthread3.cc +++ b/libstdc++-v3/testsuite/thread/pthread3.cc @@ -19,8 +19,8 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <sstream> diff --git a/libstdc++-v3/testsuite/thread/pthread4.cc b/libstdc++-v3/testsuite/thread/pthread4.cc index d4d03b3867c..f95671dcb5b 100644 --- a/libstdc++-v3/testsuite/thread/pthread4.cc +++ b/libstdc++-v3/testsuite/thread/pthread4.cc @@ -20,8 +20,8 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <string> diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/thread/pthread5.cc index b92ab8d4067..cc556046d4d 100644 --- a/libstdc++-v3/testsuite/thread/pthread5.cc +++ b/libstdc++-v3/testsuite/thread/pthread5.cc @@ -20,8 +20,8 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <vector> diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/thread/pthread6.cc index e5ea0f98617..d88f77e77e1 100644 --- a/libstdc++-v3/testsuite/thread/pthread6.cc +++ b/libstdc++-v3/testsuite/thread/pthread6.cc @@ -19,8 +19,8 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } } -// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* } } +// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* } } // { dg-options "-pthreads" { target *-*-solaris* } } #include <string> diff --git a/libstdc++-v3/testsuite/thread/pthread7-rope.cc b/libstdc++-v3/testsuite/thread/pthread7-rope.cc index 12e71efa285..716ba00ccab 100644 --- a/libstdc++-v3/testsuite/thread/pthread7-rope.cc +++ b/libstdc++-v3/testsuite/thread/pthread7-rope.cc @@ -18,9 +18,9 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } } -// { dg-options "-DDEBUG_ASSERT -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* } } -// { dg-options "-DDEBUG_ASSERT -pthreads" { target *-*-solaris* } } +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* } } +// { dg-options "-D_GLIBCXX_ASSERT -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* } } +// { dg-options "-D_GLIBCXX_ASSERT -pthreads" { target *-*-solaris* } } #include <ext/rope> #include <cstring> |