Commit cb584bcf by Benjamin Kosnik Committed by Benjamin Kosnik

testsuite_hooks.h: Remove list include.



2003-07-28  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/testsuite_hooks.h: Remove list include.
	(func_callback): Define as unique type, not std::list.
	Change DEBUG_ASSERT to _GLIBCXX_ASSERT.
	* testsuite/libstdc++-v3.dg/dg.exp: Same.
	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Same.
	* testsuite/23_containers/bitset_ctor.cc:
	* testsuite/17_intro/header_ciso646.cc: Remove DEBUG_ASSERT.
	* testsuite/18_support/numeric_limits.cc: Same.
	* testsuite/21_strings/basic_string/append/char/1.cc: Same.
	* testsuite/21_strings/basic_string/append/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/compare/char/1.cc: Same.
	* testsuite/21_strings/basic_string/compare/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/element_access/char/1.cc: Same.
	* testsuite/21_strings/basic_string/element_access/char/2.cc: Same.
	* testsuite/21_strings/basic_string/element_access/char/3.cc: Same.
	* testsuite/21_strings/basic_string/element_access/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/element_access/wchar_t/2.cc: Same.
	* testsuite/21_strings/basic_string/element_access/wchar_t/3.cc: Same.
	* testsuite/21_strings/basic_string/find/char/1.cc: Same.
	* testsuite/21_strings/basic_string/find/char/2.cc: Same.
	* testsuite/21_strings/basic_string/find/char/3.cc: Same.
	* testsuite/21_strings/basic_string/find/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/find/wchar_t/2.cc: Same.
	* testsuite/21_strings/basic_string/find/wchar_t/3.cc: Same.
	* testsuite/21_strings/basic_string/insert/char/1.cc: Same.
	* testsuite/21_strings/basic_string/insert/char/2.cc: Same.
	* testsuite/21_strings/basic_string/insert/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/insert/wchar_t/2.cc: Same.
	* testsuite/21_strings/basic_string/inserters_extractors/char/1.cc:
	* testsuite/21_strings/basic_string/inserters_extractors/char/4.cc:
	* testsuite/21_strings/basic_string/inserters_extractors/char/5.cc:
	* testsuite/21_strings/basic_string/inserters_extractors/char/6.cc:
	* testsuite/21_strings/basic_string/inserters_extractors/char/7.cc:
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc:
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc:
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc:
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc:
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc:
	* testsuite/21_strings/basic_string/operators/char/1.cc: Same.
	* testsuite/21_strings/basic_string/operators/char/2.cc: Same.
	* testsuite/21_strings/basic_string/operators/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/operators/wchar_t/2.cc: Same.
	* testsuite/21_strings/basic_string/replace/char/1.cc: Same.
	* testsuite/21_strings/basic_string/replace/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/rfind/char/1.cc: Same.
	* testsuite/21_strings/basic_string/rfind/char/2.cc: Same.
	* testsuite/21_strings/basic_string/rfind/char/3.cc: Same.
	* testsuite/21_strings/basic_string/rfind/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/rfind/wchar_t/2.cc: Same.
	* testsuite/21_strings/basic_string/rfind/wchar_t/3.cc: Same.
	* testsuite/21_strings/basic_string/substr/char/1.cc: Same.
	* testsuite/21_strings/basic_string/substr/wchar_t/1.cc: Same.
	* testsuite/23_containers/bitset_ctor.cc: Same.
	* testsuite/23_containers/bitset_shift.cc: Same.
	* testsuite/23_containers/vector_ctor.cc: Same.
	* testsuite/23_containers/vector_element_access.cc: Same.
	* testsuite/24_iterators/istreambuf_iterator.cc: Same.
	* testsuite/24_iterators/iterator.cc: Same.
	* testsuite/24_iterators/ostreambuf_iterator.cc: Same.
	* testsuite/25_algorithms/lower_bound.cc: Same.
	* testsuite/26_numerics/complex_inserters_extractors.cc: Same.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc: Same.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc: Same.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc: Same.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc: Same.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc: Same.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc: Same.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc: Same.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc: Same.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc: Same.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
        Same.

From-SVN: r69892
parent 651bed36
2003-07-28 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/testsuite_hooks.h: Remove list include.
(func_callback): Define as unique type, not std::list.
Change DEBUG_ASSERT to _GLIBCXX_ASSERT.
* testsuite/libstdc++-v3.dg/dg.exp: Same.
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Same.
* testsuite/23_containers/bitset_ctor.cc:
* testsuite/17_intro/header_ciso646.cc: Remove DEBUG_ASSERT.
* testsuite/18_support/numeric_limits.cc: Same.
* testsuite/21_strings/basic_string/append/char/1.cc: Same.
* testsuite/21_strings/basic_string/append/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/compare/char/1.cc: Same.
* testsuite/21_strings/basic_string/compare/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/element_access/char/1.cc: Same.
* testsuite/21_strings/basic_string/element_access/char/2.cc: Same.
* testsuite/21_strings/basic_string/element_access/char/3.cc: Same.
* testsuite/21_strings/basic_string/element_access/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/element_access/wchar_t/2.cc: Same.
* testsuite/21_strings/basic_string/element_access/wchar_t/3.cc: Same.
* testsuite/21_strings/basic_string/find/char/1.cc: Same.
* testsuite/21_strings/basic_string/find/char/2.cc: Same.
* testsuite/21_strings/basic_string/find/char/3.cc: Same.
* testsuite/21_strings/basic_string/find/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/find/wchar_t/2.cc: Same.
* testsuite/21_strings/basic_string/find/wchar_t/3.cc: Same.
* testsuite/21_strings/basic_string/insert/char/1.cc: Same.
* testsuite/21_strings/basic_string/insert/char/2.cc: Same.
* testsuite/21_strings/basic_string/insert/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/insert/wchar_t/2.cc: Same.
* testsuite/21_strings/basic_string/inserters_extractors/char/1.cc:
* testsuite/21_strings/basic_string/inserters_extractors/char/4.cc:
* testsuite/21_strings/basic_string/inserters_extractors/char/5.cc:
* testsuite/21_strings/basic_string/inserters_extractors/char/6.cc:
* testsuite/21_strings/basic_string/inserters_extractors/char/7.cc:
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc:
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc:
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc:
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc:
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc:
* testsuite/21_strings/basic_string/operators/char/1.cc: Same.
* testsuite/21_strings/basic_string/operators/char/2.cc: Same.
* testsuite/21_strings/basic_string/operators/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/operators/wchar_t/2.cc: Same.
* testsuite/21_strings/basic_string/replace/char/1.cc: Same.
* testsuite/21_strings/basic_string/replace/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/rfind/char/1.cc: Same.
* testsuite/21_strings/basic_string/rfind/char/2.cc: Same.
* testsuite/21_strings/basic_string/rfind/char/3.cc: Same.
* testsuite/21_strings/basic_string/rfind/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/rfind/wchar_t/2.cc: Same.
* testsuite/21_strings/basic_string/rfind/wchar_t/3.cc: Same.
* testsuite/21_strings/basic_string/substr/char/1.cc: Same.
* testsuite/21_strings/basic_string/substr/wchar_t/1.cc: Same.
* testsuite/23_containers/bitset_ctor.cc: Same.
* testsuite/23_containers/bitset_shift.cc: Same.
* testsuite/23_containers/vector_ctor.cc: Same.
* testsuite/23_containers/vector_element_access.cc: Same.
* testsuite/24_iterators/istreambuf_iterator.cc: Same.
* testsuite/24_iterators/iterator.cc: Same.
* testsuite/24_iterators/ostreambuf_iterator.cc: Same.
* testsuite/25_algorithms/lower_bound.cc: Same.
* testsuite/26_numerics/complex_inserters_extractors.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc: Same.
* testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc: Same.
* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
Same.
2003-07-28 Phil Edwards <pme@gcc.gnu.org> 2003-07-28 Phil Edwards <pme@gcc.gnu.org>
* docs/doxygen/user.cfg.in, docs/html/abi.txt, docs/html/debug.html, * docs/doxygen/user.cfg.in, docs/html/abi.txt, docs/html/debug.html,
......
// 1999-05-20 bkoz // 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 // 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 // software; you can redistribute it and/or modify it under the
...@@ -86,10 +86,6 @@ bool test01() ...@@ -86,10 +86,6 @@ bool test01()
#endif #endif
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
...@@ -110,10 +106,6 @@ bool test02() ...@@ -110,10 +106,6 @@ bool test02()
VERIFY( (arg1 && arg2) == (arg1 and arg2) ); VERIFY( (arg1 && arg2) == (arg1 and arg2) );
VERIFY( (arg1 && int1) == (arg1 and int1) ); VERIFY( (arg1 && int1) == (arg1 and int1) );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 1999-08-23 bkoz // 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 // 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 // software; you can redistribute it and/or modify it under the
...@@ -233,11 +233,6 @@ bool test01() ...@@ -233,11 +233,6 @@ bool test01()
VERIFY( !obj.traps ); VERIFY( !obj.traps );
VERIFY( !obj.tinyness_before ); VERIFY( !obj.tinyness_before );
VERIFY( obj.round_style == std::round_toward_zero ); VERIFY( obj.round_style == std::round_toward_zero );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
...@@ -281,11 +276,6 @@ bool test03() ...@@ -281,11 +276,6 @@ bool test03()
VERIFY( std::numeric_limits<signed long long>::digits10 == 18 ); VERIFY( std::numeric_limits<signed long long>::digits10 == 18 );
VERIFY( std::numeric_limits<unsigned long long>::digits10 == 19 ); VERIFY( std::numeric_limits<unsigned long long>::digits10 == 19 );
} }
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
...@@ -302,11 +292,6 @@ bool test04() ...@@ -302,11 +292,6 @@ bool test04()
VERIFY( !std::numeric_limits<unsigned long>::is_iec559 ); VERIFY( !std::numeric_limits<unsigned long>::is_iec559 );
VERIFY( !std::numeric_limits<long long>::is_iec559 ); VERIFY( !std::numeric_limits<long long>::is_iec559 );
VERIFY( !std::numeric_limits<unsigned long long>::is_iec559 ); VERIFY( !std::numeric_limits<unsigned long long>::is_iec559 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -150,10 +150,6 @@ bool test01(void) ...@@ -150,10 +150,6 @@ bool test01(void)
str05.append(str05.begin(), str05.begin() + str05.find('r')); str05.append(str05.begin(), str05.begin() + str05.find('r'));
VERIFY( str05 == "point bolivar, texaspoint boliva" ); VERIFY( str05 == "point bolivar, texaspoint boliva" );
VERIFY( str05 != str01 ); VERIFY( str05 != str01 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -150,10 +150,6 @@ bool test01(void) ...@@ -150,10 +150,6 @@ bool test01(void)
str05.append(str05.begin(), str05.begin() + str05.find(L'r')); str05.append(str05.begin(), str05.begin() + str05.find(L'r'));
VERIFY( str05 == L"point bolivar, texaspoint boliva" ); VERIFY( str05 == L"point bolivar, texaspoint boliva" );
VERIFY( str05 != str01 ); VERIFY( str05 != str01 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -59,11 +59,7 @@ test_value(int result, want_value expected) ...@@ -59,11 +59,7 @@ test_value(int result, want_value expected)
default: default:
pass = false; //should not get here pass = false; //should not get here
} }
VERIFY(pass);
#ifdef DEBUG_ASSERT
assert(pass);
#endif
return 0; return 0;
} }
......
...@@ -60,10 +60,7 @@ test_value(int result, want_value expected) ...@@ -60,10 +60,7 @@ test_value(int result, want_value expected)
pass = false; //should not get here pass = false; //should not get here
} }
#ifdef DEBUG_ASSERT VERIFY(pass);
assert(pass);
#endif
return 0; return 0;
} }
......
...@@ -80,10 +80,6 @@ bool test01(void) ...@@ -80,10 +80,6 @@ bool test01(void)
catch(...) { catch(...) {
VERIFY( false ); VERIFY( false );
} }
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -102,9 +102,6 @@ bool test01(void) ...@@ -102,9 +102,6 @@ bool test01(void)
VERIFY( str03[0] == 'x' ); VERIFY( str03[0] == 'x' );
// need to also test for const begin/const end // need to also test for const begin/const end
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -76,10 +76,6 @@ bool test02(void) ...@@ -76,10 +76,6 @@ bool test02(void)
std::string str13 = str12; std::string str13 = str12;
*p2 = 'e'; *p2 = 'e';
VERIFY( str12 != str13 ); VERIFY( str12 != str13 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -80,10 +80,6 @@ bool test01(void) ...@@ -80,10 +80,6 @@ bool test01(void)
catch(...) { catch(...) {
VERIFY( false ); VERIFY( false );
} }
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -102,9 +102,7 @@ bool test01(void) ...@@ -102,9 +102,7 @@ bool test01(void)
VERIFY( str03[0] == L'x' ); VERIFY( str03[0] == L'x' );
// need to also test for const begin/const end // need to also test for const begin/const end
#ifdef DEBUG_ASSERT VERIFY(test);
assert(test);
#endif
return test; return test;
} }
......
...@@ -76,10 +76,6 @@ bool test02(void) ...@@ -76,10 +76,6 @@ bool test02(void)
std::wstring str13 = str12; std::wstring str13 = str12;
*p2 = L'e'; *p2 = L'e';
VERIFY( str12 != str13 ); VERIFY( str12 != str13 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -84,10 +84,6 @@ bool test01(void) ...@@ -84,10 +84,6 @@ bool test01(void)
VERIFY( csz01 == csz02 ); VERIFY( csz01 == csz02 );
csz01 = str01.find('/'); csz01 = str01.find('/');
VERIFY( csz01 == npos ); VERIFY( csz01 == npos );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -83,10 +83,6 @@ bool test02(void) ...@@ -83,10 +83,6 @@ bool test02(void)
csz01 = str01.find_first_of('z'); csz01 = str01.find_first_of('z');
csz02 = str01.size() - 1; csz02 = str01.size() - 1;
VERIFY( csz01 == csz02 ); VERIFY( csz01 == csz02 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -83,10 +83,6 @@ bool test03(void) ...@@ -83,10 +83,6 @@ bool test03(void)
VERIFY( csz01 == 0 ); VERIFY( csz01 == 0 );
csz01 = str04.find_first_not_of('S'); csz01 = str04.find_first_not_of('S');
VERIFY( csz01 == npos ); VERIFY( csz01 == npos );
#ifdef DEBUG_ASSERT
VERIFY(test);
#endif
return test; return test;
} }
......
...@@ -84,10 +84,6 @@ bool test01(void) ...@@ -84,10 +84,6 @@ bool test01(void)
VERIFY( csz01 == csz02 ); VERIFY( csz01 == csz02 );
csz01 = str01.find(L'/'); csz01 = str01.find(L'/');
VERIFY( csz01 == npos ); VERIFY( csz01 == npos );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -83,10 +83,6 @@ bool test02(void) ...@@ -83,10 +83,6 @@ bool test02(void)
csz01 = str01.find_first_of(L'z'); csz01 = str01.find_first_of(L'z');
csz02 = str01.size() - 1; csz02 = str01.size() - 1;
VERIFY( csz01 == csz02 ); VERIFY( csz01 == csz02 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -83,10 +83,6 @@ bool test03(void) ...@@ -83,10 +83,6 @@ bool test03(void)
VERIFY( csz01 == 0 ); VERIFY( csz01 == 0 );
csz01 = str04.find_first_not_of(L'S'); csz01 = str04.find_first_not_of(L'S');
VERIFY( csz01 == npos ); VERIFY( csz01 == npos );
#ifdef DEBUG_ASSERT
VERIFY(test);
#endif
return test; return test;
} }
......
...@@ -180,10 +180,6 @@ int test01(void) ...@@ -180,10 +180,6 @@ int test01(void)
csz01 = str03.size(); csz01 = str03.size();
str03.insert(str03.end(), str01.begin(), str01.end()); str03.insert(str03.end(), str01.begin(), str01.end());
VERIFY( str03 == "baker beach, san franciscorodeo beach, marin" ); VERIFY( str03 == "baker beach, san franciscorodeo beach, marin" );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -73,10 +73,6 @@ int test02(void) ...@@ -73,10 +73,6 @@ int test02(void)
str01.insert(0, str01.c_str()); str01.insert(0, str01.c_str());
VERIFY( str01 == "Everything was beautiful, and nothing hurt" VERIFY( str01 == "Everything was beautiful, and nothing hurt"
"Everything was beautiful, and nothing hurt"); "Everything was beautiful, and nothing hurt");
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -180,10 +180,6 @@ int test01(void) ...@@ -180,10 +180,6 @@ int test01(void)
csz01 = str03.size(); csz01 = str03.size();
str03.insert(str03.end(), str01.begin(), str01.end()); str03.insert(str03.end(), str01.begin(), str01.end());
VERIFY( str03 == L"baker beach, san franciscorodeo beach, marin" ); VERIFY( str03 == L"baker beach, san franciscorodeo beach, marin" );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -73,10 +73,6 @@ int test02(void) ...@@ -73,10 +73,6 @@ int test02(void)
str01.insert(0, str01.c_str()); str01.insert(0, str01.c_str());
VERIFY( str01 == L"Everything was beautiful, and nothing hurt" VERIFY( str01 == L"Everything was beautiful, and nothing hurt"
L"Everything was beautiful, and nothing hurt"); L"Everything was beautiful, and nothing hurt");
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -157,10 +157,6 @@ bool test01(void) ...@@ -157,10 +157,6 @@ bool test01(void)
std::string hello_world; std::string hello_world;
std::cout << hello_world; std::cout << hello_world;
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -54,10 +54,6 @@ void test04(int size) ...@@ -54,10 +54,6 @@ void test04(int size)
VERIFY( oss.good() ); VERIFY( oss.good() );
std::string str_tmp = oss.str(); std::string str_tmp = oss.str();
VERIFY( str_tmp.size() == expected_size ); VERIFY( str_tmp.size() == expected_size );
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -75,10 +75,6 @@ void test05(int size) ...@@ -75,10 +75,6 @@ void test05(int size)
} }
VERIFY( count == 2 * size ); VERIFY( count == 2 * size );
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -52,10 +52,6 @@ void test06(void) ...@@ -52,10 +52,6 @@ void test06(void)
size_type i06 = str02.capacity(); size_type i06 = str02.capacity();
VERIFY( i05 == i03 ); VERIFY( i05 == i03 );
VERIFY( i06 <= i04 ); VERIFY( i06 <= i04 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -44,10 +44,6 @@ void test07(void) ...@@ -44,10 +44,6 @@ void test07(void)
VERIFY( i < 3 ); VERIFY( i < 3 );
VERIFY( static_cast<bool>(iss.rdstate() & std::ios_base::failbit) ); VERIFY( static_cast<bool>(iss.rdstate() & std::ios_base::failbit) );
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -157,10 +157,6 @@ bool test01(void) ...@@ -157,10 +157,6 @@ bool test01(void)
std::wstring hello_world; std::wstring hello_world;
std::wcout << hello_world; std::wcout << hello_world;
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -54,10 +54,6 @@ void test04(int size) ...@@ -54,10 +54,6 @@ void test04(int size)
VERIFY( oss.good() ); VERIFY( oss.good() );
std::wstring str_tmp = oss.str(); std::wstring str_tmp = oss.str();
VERIFY( str_tmp.size() == expected_size ); VERIFY( str_tmp.size() == expected_size );
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -75,10 +75,6 @@ void test05(int size) ...@@ -75,10 +75,6 @@ void test05(int size)
} }
VERIFY( count == 2 * size ); VERIFY( count == 2 * size );
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -52,10 +52,6 @@ void test06(void) ...@@ -52,10 +52,6 @@ void test06(void)
size_type i06 = str02.capacity(); size_type i06 = str02.capacity();
VERIFY( i05 == i03 ); VERIFY( i05 == i03 );
VERIFY( i06 <= i04 ); VERIFY( i06 <= i04 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -44,10 +44,6 @@ void test07(void) ...@@ -44,10 +44,6 @@ void test07(void)
VERIFY( i < 3 ); VERIFY( i < 3 );
VERIFY( static_cast<bool>(iss.rdstate() & std::ios_base::failbit) ); VERIFY( static_cast<bool>(iss.rdstate() & std::ios_base::failbit) );
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -41,12 +41,6 @@ int test01(void) ...@@ -41,12 +41,6 @@ int test01(void)
// printf("2:%s\n", str1.c_str()); //str1 is gone // printf("2:%s\n", str1.c_str()); //str1 is gone
const char* p2 = str1.c_str(); const char* p2 = str1.c_str();
return 0; return 0;
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test;
} }
int main() int main()
......
...@@ -285,11 +285,6 @@ template<class charT, class traits, class Allocator> ...@@ -285,11 +285,6 @@ template<class charT, class traits, class Allocator>
str_4 = 'o' + str_4; str_4 = 'o' + str_4;
str_4 = 'c' + str_4; str_4 = 'c' + str_4;
VERIFY( str_4 == str_3 ); VERIFY( str_4 == str_3 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return 0; return 0;
} }
......
...@@ -41,12 +41,6 @@ int test01(void) ...@@ -41,12 +41,6 @@ int test01(void)
// wprintf("2:%s\n", str1.c_str()); //str1 is gone // wprintf("2:%s\n", str1.c_str()); //str1 is gone
const wchar_t* p2 = str1.c_str(); const wchar_t* p2 = str1.c_str();
return 0; return 0;
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test;
} }
int main() int main()
......
...@@ -285,11 +285,6 @@ template<class charT, class traits, class Allocator> ...@@ -285,11 +285,6 @@ template<class charT, class traits, class Allocator>
str_4 = L'o' + str_4; str_4 = L'o' + str_4;
str_4 = L'c' + str_4; str_4 = L'c' + str_4;
VERIFY( str_4 == str_3 ); VERIFY( str_4 == str_3 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return 0; return 0;
} }
......
...@@ -73,10 +73,6 @@ bool test01(void) ...@@ -73,10 +73,6 @@ bool test01(void)
std::find(x.rbegin(), x.rend(), 'l').base(), ar, std::find(x.rbegin(), x.rend(), 'l').base(), ar,
ar + sizeof(ar) / sizeof(ar[0])); ar + sizeof(ar) / sizeof(ar[0]));
VERIFY( x == "jeHelloo" ); VERIFY( x == "jeHelloo" );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -73,10 +73,6 @@ bool test01(void) ...@@ -73,10 +73,6 @@ bool test01(void)
std::find(x.rbegin(), x.rend(), L'l').base(), ar, std::find(x.rbegin(), x.rend(), L'l').base(), ar,
ar + sizeof(ar) / sizeof(ar[0])); ar + sizeof(ar) / sizeof(ar[0]));
VERIFY( x == L"jeHelloo" ); VERIFY( x == L"jeHelloo" );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -83,10 +83,6 @@ bool test01(void) ...@@ -83,10 +83,6 @@ bool test01(void)
VERIFY( csz01 == csz02 ); VERIFY( csz01 == csz02 );
csz01 = str01.rfind('/'); csz01 = str01.rfind('/');
VERIFY( csz01 == npos ); VERIFY( csz01 == npos );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -41,10 +41,6 @@ bool test02() ...@@ -41,10 +41,6 @@ bool test02()
VERIFY( pos == 1 ); VERIFY( pos == 1 );
pos = z.find_last_of('X'); pos = z.find_last_of('X');
VERIFY( pos == std::string::npos ); VERIFY( pos == std::string::npos );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -56,10 +56,6 @@ bool test03() ...@@ -56,10 +56,6 @@ bool test03()
VERIFY( pos == 0 ); VERIFY( pos == 0 );
pos = z.find_last_not_of("Xa"); pos = z.find_last_not_of("Xa");
VERIFY( pos == 1 ); VERIFY( pos == 1 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
int main() int main()
......
...@@ -83,10 +83,6 @@ bool test01(void) ...@@ -83,10 +83,6 @@ bool test01(void)
VERIFY( csz01 == csz02 ); VERIFY( csz01 == csz02 );
csz01 = str01.rfind(L'/'); csz01 = str01.rfind(L'/');
VERIFY( csz01 == npos ); VERIFY( csz01 == npos );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -41,10 +41,6 @@ bool test02() ...@@ -41,10 +41,6 @@ bool test02()
VERIFY( pos == 1 ); VERIFY( pos == 1 );
pos = z.find_last_of(L'X'); pos = z.find_last_of(L'X');
VERIFY( pos == std::wstring::npos ); VERIFY( pos == std::wstring::npos );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -56,10 +56,6 @@ bool test03() ...@@ -56,10 +56,6 @@ bool test03()
VERIFY( pos == 0 ); VERIFY( pos == 0 );
pos = z.find_last_not_of(L"Xa"); pos = z.find_last_not_of(L"Xa");
VERIFY( pos == 1 ); VERIFY( pos == 1 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
int main() int main()
......
...@@ -66,10 +66,6 @@ bool test01(void) ...@@ -66,10 +66,6 @@ bool test01(void)
catch(...) { catch(...) {
VERIFY( false ); VERIFY( false );
} }
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -66,10 +66,6 @@ bool test01(void) ...@@ -66,10 +66,6 @@ bool test01(void)
catch(...) { catch(...) {
VERIFY( false ); VERIFY( false );
} }
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
// 1999-06-08 bkoz // 1999-06-08 bkoz
// Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. // Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -73,11 +73,6 @@ bool test01(void) ...@@ -73,11 +73,6 @@ bool test01(void)
catch(...) { catch(...) {
VERIFY( false ); VERIFY( false );
} }
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
...@@ -109,11 +104,7 @@ bool test02(void) ...@@ -109,11 +104,7 @@ bool test02(void)
} }
VERIFY( z1.to_ulong() == 0 ); VERIFY( z1.to_ulong() == 0 );
VERIFY( ( z1.to_string<char,char_traits<char>,allocator<char> >().empty() ) ); VERIFY( (z1.to_string<char,char_traits<char>,allocator<char> >().empty() ));
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
// 2000-01-15 Anders Widell <awl@hem.passagen.se> // 2000-01-15 Anders Widell <awl@hem.passagen.se>
// Copyright (C) 2000 Free Software Foundation, Inc. // Copyright (C) 2000, 2003 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -99,10 +99,6 @@ test01() { ...@@ -99,10 +99,6 @@ test01() {
VERIFY( do_test<511>() ); VERIFY( do_test<511>() );
VERIFY( do_test<513>() ); VERIFY( do_test<513>() );
VERIFY( do_test<997>() ); VERIFY( do_test<997>() );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
...@@ -114,10 +110,6 @@ test02() ...@@ -114,10 +110,6 @@ test02()
std::bitset<66> b; std::bitset<66> b;
b <<= 400; b <<= 400;
VERIFY( b.count() == 0 ); VERIFY( b.count() == 0 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -39,16 +39,11 @@ struct B { }; ...@@ -39,16 +39,11 @@ struct B { };
void test01() void test01()
{ {
// 1 // 1
bool test = true;
std::vector< A<B> > vec01; std::vector< A<B> > vec01;
std::vector< A<B> > vec02(5); std::vector< A<B> > vec02(5);
typedef std::vector< A<B> >::size_type size_type; typedef std::vector< A<B> >::size_type size_type;
vec01 = vec02; vec01 = vec02;
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
// 2 // 2
...@@ -82,22 +77,13 @@ test03() ...@@ -82,22 +77,13 @@ test03()
std::vector<int> v5(M, 7); std::vector<int> v5(M, 7);
VERIFY(std::equal(v5.begin(), v5.end(), B)); VERIFY(std::equal(v5.begin(), v5.end(), B));
VERIFY(std::equal(B, B + M, v5.begin())); VERIFY(std::equal(B, B + M, v5.begin()));
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
// libstdc++/6513 // libstdc++/6513
void test04() void test04()
{ {
bool test = true;
const char* c_strings[5] = { "1", "2", "3", "4", "5" }; const char* c_strings[5] = { "1", "2", "3", "4", "5" };
std::vector<std::string> strings(c_strings, c_strings + 5); std::vector<std::string> strings(c_strings, c_strings + 5);
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
......
// 2000-09-06 // 2000-09-06
// bkoz // bkoz
// Copyright (C) 2000 Free Software Foundation, Inc. // Copyright (C) 2000, 2003 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -52,11 +52,6 @@ bool test01() ...@@ -52,11 +52,6 @@ bool test01()
{ {
VERIFY( false ); VERIFY( false );
} }
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
// 1999-06-28 bkoz // 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 // 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 // software; you can redistribute it and/or modify it under the
...@@ -133,11 +133,6 @@ bool test02(void) ...@@ -133,11 +133,6 @@ bool test02(void)
c = *++istrb_it28; c = *++istrb_it28;
VERIFY( c == slit01[++i] ); VERIFY( c == slit01[++i] );
} }
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 24.3.1 Iterator traits // 24.3.1 Iterator traits
// (basic_string and vector implementations) // (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 // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or // the Free Software Foundation; either version 2 of the License, or
...@@ -603,9 +603,6 @@ main(int argc, char **argv) ...@@ -603,9 +603,6 @@ main(int argc, char **argv)
failures += test6642(); failures += test6642();
#ifdef DEBUG_ASSERT VERIFY(failures == 0);
assert (failures == 0);
#endif
return 0; return 0;
} }
// 2001-04-30 Benjamin Kosnik <bkoz@redhat.com> // 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 // 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 // software; you can redistribute it and/or modify it under the
...@@ -106,11 +106,6 @@ bool test02(void) ...@@ -106,11 +106,6 @@ bool test02(void)
tmp = ostrs00.str(); tmp = ostrs00.str();
VERIFY ( tmp != str01 ); VERIFY ( tmp != str01 );
VERIFY ( tmp != str02 ); VERIFY ( tmp != str02 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
// 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 // 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 // software; you can redistribute it and/or modify it under the
...@@ -29,17 +30,3 @@ void bar(foo* a, foo* b, foo& x) ...@@ -29,17 +30,3 @@ void bar(foo* a, foo* b, foo& x)
{ {
foo* c = std::lower_bound(a, b, x); foo* c = std::lower_bound(a, b, x);
} }
void test01()
{
bool test = true;
#ifdef DEBUG_ASSERT
assert(test);
#endif
}
int main()
{
return 0;
}
// 2000-02-10 // 2000-02-10
// Petter Urkedal <petter@matfys.lth.se> // 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 // 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 // software; you can redistribute it and/or modify it under the
...@@ -47,10 +47,6 @@ test_good(std::string str, R x, R y) ...@@ -47,10 +47,6 @@ test_good(std::string str, R x, R y)
VERIFY( flteq(z.real(), x) ); VERIFY( flteq(z.real(), x) );
VERIFY( flteq(z.imag(), y) ); VERIFY( flteq(z.imag(), y) );
VERIFY( ch == '#' ); VERIFY( ch == '#' );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return 0; return 0;
} }
...@@ -58,12 +54,11 @@ template<typename R> ...@@ -58,12 +54,11 @@ template<typename R>
int int
test_fail(std::string str) test_fail(std::string str)
{ {
bool test = true;
std::complex<R> z; std::complex<R> z;
std::istringstream iss(str); std::istringstream iss(str);
iss >> z; iss >> z;
#ifdef DEBUG_ASSERT VERIFY( iss.fail() && !iss.bad() );
assert(iss.fail() && !iss.bad());
#endif
return 0; return 0;
} }
......
...@@ -119,11 +119,6 @@ bool test01() { ...@@ -119,11 +119,6 @@ bool test01() {
ss_01 >> pi; ss_01 >> pi;
std::printf ("%x %x\n", pi, po); std::printf ("%x %x\n", pi, po);
VERIFY( po == pi ); VERIFY( po == pi );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -56,11 +56,6 @@ bool test02() { ...@@ -56,11 +56,6 @@ bool test02() {
VERIFY( n == 20000 ); VERIFY( n == 20000 );
char c = is.peek(); char c = is.peek();
VERIFY( c == 65 ); VERIFY( c == 65 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -55,11 +55,6 @@ bool test03() ...@@ -55,11 +55,6 @@ bool test03()
istr >> l01; // _M_in_end set completely incorrectly here. istr >> l01; // _M_in_end set completely incorrectly here.
VERIFY( l01 == 12220101 ); VERIFY( l01 == 12220101 );
VERIFY( istr.rdstate() == std::ios_base::eofbit ); VERIFY( istr.rdstate() == std::ios_base::eofbit );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -70,10 +70,6 @@ void test06() ...@@ -70,10 +70,6 @@ void test06()
is >> c; // EOF is >> c; // EOF
VERIFY( c == ',' ); VERIFY( c == ',' );
VERIFY( static_cast<bool>(is.rdstate() & std::ios_base::failbit) ); VERIFY( static_cast<bool>(is.rdstate() & std::ios_base::failbit) );
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -156,10 +156,6 @@ void test07() ...@@ -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::failbit) );
VERIFY( static_cast<bool>(is.rdstate() & std::ios_base::eofbit) ); VERIFY( static_cast<bool>(is.rdstate() & std::ios_base::eofbit) );
is.clear(); is.clear();
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -79,11 +79,6 @@ void test08() ...@@ -79,11 +79,6 @@ void test08()
is >> h2; is >> h2;
VERIFY( h2 == 2212322 ); VERIFY( h2 == 2212322 );
VERIFY( static_cast<bool>(is.rdstate() & std::ios_base::eofbit) ); VERIFY( static_cast<bool>(is.rdstate() & std::ios_base::eofbit) );
#ifdef DEBUG_ASSERT
assert(test);
#endif
} }
int main() int main()
......
...@@ -58,10 +58,6 @@ bool test09() ...@@ -58,10 +58,6 @@ bool test09()
test = f1 == 2456; test = f1 == 2456;
VERIFY( f2 == 0.00567 ); VERIFY( f2 == 0.00567 );
VERIFY( c == '-' ); VERIFY( c == '-' );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -139,11 +139,6 @@ bool test10() { ...@@ -139,11 +139,6 @@ bool test10() {
is_05.ignore(); is_05.ignore();
is_05 >> n; is_05 >> n;
VERIFY( n == 16 ); VERIFY( n == 16 );
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test; return test;
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
using namespace std; using namespace std;
#ifndef DEBUG_ASSERT #ifndef _GLIBCXX_ASSERT
# define TEST_NUMPUT_VERBOSE 1 # define TEST_NUMPUT_VERBOSE 1
#endif #endif
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
using namespace std; using namespace std;
#ifndef DEBUG_ASSERT #ifndef _GLIBCXX_ASSERT
# define TEST_NUMPUT_VERBOSE 1 # define TEST_NUMPUT_VERBOSE 1
#endif #endif
......
...@@ -107,7 +107,7 @@ proc libstdc++-v3-init { args } { ...@@ -107,7 +107,7 @@ proc libstdc++-v3-init { args } {
return "untested" return "untested"
} }
set cxx [transform "g++"] set cxx [transform "g++"]
set cxxflags "-ggdb3 -DDEBUG_ASSERT" set cxxflags "-ggdb3 -D_GLIBCXX_ASSERT"
set includes "-I./" set includes "-I./"
} else { } else {
# If we find a testsuite_flags file, we're testing in the build dir. # If we find a testsuite_flags file, we're testing in the build dir.
...@@ -118,7 +118,7 @@ proc libstdc++-v3-init { args } { ...@@ -118,7 +118,7 @@ proc libstdc++-v3-init { args } {
set includes [exec sh $flags_file --build-includes] set includes [exec sh $flags_file --build-includes]
} else { } else {
set cxx [transform "g++"] set cxx [transform "g++"]
set cxxflags "-ggdb3 -DDEBUG_ASSERT" set cxxflags "-ggdb3 -D_GLIBCXX_ASSERT"
set includes "-I${srcdir}" set includes "-I${srcdir}"
} }
} }
......
...@@ -22,7 +22,7 @@ load_lib libstdc++-v3-dg.exp ...@@ -22,7 +22,7 @@ load_lib libstdc++-v3-dg.exp
# If a testcase doesn't have special options, use these. # If a testcase doesn't have special options, use these.
global DEFAULT_CXXFLAGS global DEFAULT_CXXFLAGS
if ![info exists DEFAULT_CXXFLAGS] then { if ![info exists DEFAULT_CXXFLAGS] then {
set DEFAULT_CXXFLAGS "-DDEBUG_ASSERT" set DEFAULT_CXXFLAGS "-D_GLIBCXX_ASSERT"
} }
# Initialize 'dg' last or dejagnu exits with an error... # Initialize 'dg' last or dejagnu exits with an error...
......
...@@ -155,8 +155,9 @@ namespace __gnu_test ...@@ -155,8 +155,9 @@ namespace __gnu_test
if (res != NULL) if (res != NULL)
{ {
string preLC_ALL = res; string preLC_ALL = res;
for (func_callback::const_iterator i = l.begin(); i != l.end(); ++i) const func_callback::test_type* tests = l.tests();
(*i)(); for (int i = 0; i < l.size(); ++i)
(*tests[i])();
string postLC_ALL= setlocale(LC_ALL, NULL); string postLC_ALL= setlocale(LC_ALL, NULL);
VERIFY( preLC_ALL == postLC_ALL ); VERIFY( preLC_ALL == postLC_ALL );
} }
...@@ -180,8 +181,9 @@ namespace __gnu_test ...@@ -180,8 +181,9 @@ namespace __gnu_test
const char* oldENV = getenv(env); const char* oldENV = getenv(env);
if (!setenv(env, name, 1)) if (!setenv(env, name, 1))
{ {
for (func_callback::const_iterator i = l.begin(); i != l.end(); ++i) const func_callback::test_type* tests = l.tests();
(*i)(); for (int i = 0; i < l.size(); ++i)
(*tests[i])();
setenv(env, oldENV ? oldENV : "", 1); setenv(env, oldENV ? oldENV : "", 1);
} }
else else
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
// This file provides the following: // 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 // This file is included in the various testsuite programs to provide
// #define(able) assert() behavior for debugging/testing. It may be // #define(able) assert() behavior for debugging/testing. It may be
// a suitable location for other furry woodland creatures as well. // a suitable location for other furry woodland creatures as well.
...@@ -61,13 +61,12 @@ ...@@ -61,13 +61,12 @@
#include <bits/c++config.h> #include <bits/c++config.h>
#include <bits/functexcept.h> #include <bits/functexcept.h>
#include <cstddef> #include <cstddef>
#ifdef DEBUG_ASSERT #ifdef _GLIBCXX_ASSERT
# include <cassert> # include <cassert>
# define VERIFY(fn) assert(fn) # define VERIFY(fn) assert(fn)
#else #else
# define VERIFY(fn) test &= (fn) # define VERIFY(fn) test &= (fn)
#endif #endif
#include <list>
#include <locale> #include <locale>
#ifdef _GLIBCXX_HAVE_UNISTD_H #ifdef _GLIBCXX_HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
...@@ -100,8 +99,32 @@ namespace __gnu_test ...@@ -100,8 +99,32 @@ namespace __gnu_test
// Simple callback structure for variable numbers of tests (all with // Simple callback structure for variable numbers of tests (all with
// same signature). Assume all unit tests are of the signature // same signature). Assume all unit tests are of the signature
// void test01(); // void test01();
typedef void (*test_func) (void); class func_callback
typedef std::list<test_func> 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. // Run select unit tests after setting global locale.
void void
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
// USA. // USA.
// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } } // { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* } }
// { dg-options "-DDEBUG_ASSERT -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* } } // { dg-options "-D_GLIBCXX_ASSERT -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* } }
// { dg-options "-DDEBUG_ASSERT -pthreads" { target *-*-solaris* } } // { dg-options "-D_GLIBCXX_ASSERT -pthreads" { target *-*-solaris* } }
#include <ext/rope> #include <ext/rope>
#include <cstring> #include <cstring>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment