Commit 3dd50c74 by Benjamin Kosnik Committed by Benjamin Kosnik

9555-ic.cc: Clarify assertion, set test variable to false before assert.


2004-04-19  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
	Clarify assertion, set test variable to false before assert.
	* testsuite/27_io/basic_istringstream/str/char/1.cc: Same.
	* testsuite/27_io/basic_stringstream/str/char/1.cc: Same.
	* testsuite/27_io/ios_base/storage/2.cc: Same.

	* testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Fix
	function returns.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Same.
	* testsuite/27_io/fpos/14320-3.cc: Same.

	* testsuite/27_io/basic_filebuf/2.cc: Instantiate in namespace std.
	* testsuite/27_io/fpos/1.cc: Same.
	* testsuite/27_io/basic_stringstream/2.cc: Same.
	* testsuite/27_io/basic_stringbuf/4.cc: Same.
	* testsuite/27_io/basic_stringbuf/1.cc: Same.
	* testsuite/27_io/basic_stringbuf/2.cc: Same.
	* testsuite/27_io/basic_streambuf/2.cc: Same.
	* testsuite/27_io/basic_ostringstream/2.cc: Same.
	* testsuite/27_io/basic_ostream/2.cc: Same.
	* testsuite/27_io/basic_ofstream/2.cc: Same.
	* testsuite/27_io/basic_istringstream/2.cc: Same.
	* testsuite/27_io/basic_istream/2.cc: Same.
	* testsuite/27_io/basic_iostream/2.cc: Same.
	* testsuite/27_io/basic_ios/2.cc: Same.
	* testsuite/27_io/basic_ifstream/2.cc: Same.
	* testsuite/27_io/basic_fstream/2.cc: Same.
	* testsuite/ext/stdio_filebuf/char/1.cc: Same, in namespace __gnu_cxx.

	* testsuite/21_strings/basic_string/capacity/1.cc: Don't compare
	unsigned against zero.
	* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/capacity/char/1.cc: Same.

	* testsuite/18_support/new_delete_placement.cc: Initialize
	variables before first use.
	* testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Same.
	* testsuite/21_strings/char_traits/requirements/char/1.cc: Same.
	* testsuite/21_strings/char_traits/requirements/short/1.cc: Same.
	* testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc:
	Same.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc: Same.
	* testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
	Same.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc: Same.
	* testsuite/27_io/types/2.cc: Same.

	* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Fix temporary
	file name.
	* testsuite/27_io/fpos/14775.cc: Same.

From-SVN: r80861
parent 9ca75f15
2004-04-19 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
Clarify assertion, set test variable to false before assert.
* testsuite/27_io/basic_istringstream/str/char/1.cc: Same.
* testsuite/27_io/basic_stringstream/str/char/1.cc: Same.
* testsuite/27_io/ios_base/storage/2.cc: Same.
* testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Fix
function returns.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Same.
* testsuite/27_io/fpos/14320-3.cc: Same.
* testsuite/27_io/basic_filebuf/2.cc: Instantiate in namespace std.
* testsuite/27_io/fpos/1.cc: Same.
* testsuite/27_io/basic_stringstream/2.cc: Same.
* testsuite/27_io/basic_stringbuf/4.cc: Same.
* testsuite/27_io/basic_stringbuf/1.cc: Same.
* testsuite/27_io/basic_stringbuf/2.cc: Same.
* testsuite/27_io/basic_streambuf/2.cc: Same.
* testsuite/27_io/basic_ostringstream/2.cc: Same.
* testsuite/27_io/basic_ostream/2.cc: Same.
* testsuite/27_io/basic_ofstream/2.cc: Same.
* testsuite/27_io/basic_istringstream/2.cc: Same.
* testsuite/27_io/basic_istream/2.cc: Same.
* testsuite/27_io/basic_iostream/2.cc: Same.
* testsuite/27_io/basic_ios/2.cc: Same.
* testsuite/27_io/basic_ifstream/2.cc: Same.
* testsuite/27_io/basic_fstream/2.cc: Same.
* testsuite/ext/stdio_filebuf/char/1.cc: Same, in namespace __gnu_cxx.
* testsuite/21_strings/basic_string/capacity/1.cc: Don't compare
unsigned against zero.
* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/capacity/char/1.cc: Same.
* testsuite/18_support/new_delete_placement.cc: Initialize
variables before first use.
* testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Same.
* testsuite/21_strings/char_traits/requirements/char/1.cc: Same.
* testsuite/21_strings/char_traits/requirements/short/1.cc: Same.
* testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc:
Same.
* testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc: Same.
* testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
Same.
* testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc: Same.
* testsuite/27_io/types/2.cc: Same.
* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Fix temporary
file name.
* testsuite/27_io/fpos/14775.cc: Same.
2004-04-19 Paolo Carlini <pcarlini@suse.de> 2004-04-19 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/15002 (partial) PR libstdc++/15002 (partial)
......
// 2002-07-24 Benjamin Kosnik // 2002-07-24 Benjamin Kosnik
// Copyright (C) 2002 Free Software Foundation // Copyright (C) 2002, 2004 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
...@@ -28,7 +28,7 @@ void test01() ...@@ -28,7 +28,7 @@ void test01()
{ {
void* pc = new char; void* pc = new char;
void* pa = new char[10]; void* pa = new char[10];
void* tmp; void* tmp = NULL;
operator delete(pc, tmp); operator delete(pc, tmp);
operator delete[](pa, tmp); operator delete[](pa, tmp);
} }
......
// 1999-05-11 bkoz // 1999-05-11 bkoz
// Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. // Copyright (C) 1999, 2002, 2003, 2004 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
...@@ -140,7 +140,7 @@ void test01() ...@@ -140,7 +140,7 @@ void test01()
VERIFY( sz04 >= 100 ); VERIFY( sz04 >= 100 );
str02.reserve(); str02.reserve();
sz03 = str02.capacity(); sz03 = str02.capacity();
VERIFY( sz03 >= 0 ); VERIFY( sz03 == 0 );
sz03 = str02.size() + 5; sz03 = str02.size() + 5;
str02.resize(sz03); str02.resize(sz03);
......
// 1999-05-11 bkoz // 1999-05-11 bkoz
// Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. // Copyright (C) 1999, 2002, 2003, 2004 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
...@@ -37,7 +37,7 @@ void test01() ...@@ -37,7 +37,7 @@ void test01()
VERIFY( sz02 >= 100 ); VERIFY( sz02 >= 100 );
str01.reserve(); str01.reserve();
sz01 = str01.capacity(); sz01 = str01.capacity();
VERIFY( sz01 >= 0 ); VERIFY( sz01 == 0 );
sz01 = str01.size() + 5; sz01 = str01.size() + 5;
str01.resize(sz01); str01.resize(sz01);
......
// 1999-05-11 bkoz // 1999-05-11 bkoz
// Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. // Copyright (C) 1999, 2002, 2003, 2004 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
...@@ -37,7 +37,7 @@ void test01() ...@@ -37,7 +37,7 @@ void test01()
VERIFY( sz02 >= 100 ); VERIFY( sz02 >= 100 );
str01.reserve(); str01.reserve();
sz01 = str01.capacity(); sz01 = str01.capacity();
VERIFY( sz01 >= 0 ); VERIFY( sz01 == 0 );
sz01 = str01.size() + 5; sz01 = str01.size() + 5;
str01.resize(sz01); str01.resize(sz01);
......
// 1999-06-03 bkoz // 1999-06-03 bkoz
// Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. // Copyright (C) 1999, 2000, 2001, 2003, 2004 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
...@@ -56,6 +56,7 @@ void test01(void) ...@@ -56,6 +56,7 @@ void test01(void)
const char str_lit1[] = "montara and ocean beach"; const char str_lit1[] = "montara and ocean beach";
int len = sizeof(str_lit1) + sizeof(array1) - 1; // two terminating chars int len = sizeof(str_lit1) + sizeof(array1) - 1; // two terminating chars
char array2[len]; char array2[len];
std::char_traits<char>::copy(array2, "boracay, philippines", len);
VERIFY( str_lit1[0] == 'm' ); VERIFY( str_lit1[0] == 'm' );
c1 = array2[0]; c1 = array2[0];
......
// 1999-06-03 bkoz // 1999-06-03 bkoz
// 2003-07-22 Matt Austern // 2003-07-22 Matt Austern
// Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. // Copyright (C) 1999, 2000, 2001, 2003, 2004 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
...@@ -76,7 +76,9 @@ void test02(void) ...@@ -76,7 +76,9 @@ void test02(void)
int len = sizeof(str_lit1)/sizeof(short) + sizeof(array1)/sizeof(short) - 1; int len = sizeof(str_lit1)/sizeof(short) + sizeof(array1)/sizeof(short) - 1;
// two terminating chars // two terminating chars
short array3[] = {'b', 'o', 'r', 'a', 'c', 'a', 'y', ',', ' ', 'p', 'h', 'i', 'l', 'i', 'p', 'p', 'i', 'n', 'e', 's', 0};
short array2[len]; short array2[len];
std::char_traits<short>::copy(array2, array3, len);
VERIFY( str_lit1[0] == 'm' ); VERIFY( str_lit1[0] == 'm' );
c1 = array2[0]; c1 = array2[0];
......
// 1999-06-03 bkoz // 1999-06-03 bkoz
// Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. // Copyright (C) 1999, 2000, 2001, 2003, 2004 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
...@@ -56,6 +56,7 @@ void test02(void) ...@@ -56,6 +56,7 @@ void test02(void)
const wchar_t str_lit1[] = L"montara and ocean beach"; const wchar_t str_lit1[] = L"montara and ocean beach";
int len = sizeof(str_lit1) + sizeof(array1) - 1; // two terminating chars int len = sizeof(str_lit1) + sizeof(array1) - 1; // two terminating chars
wchar_t array2[len]; wchar_t array2[len];
std::char_traits<wchar_t>::copy(array2, L"boracay, philippines", len);
VERIFY( str_lit1[0] == 'm' ); VERIFY( str_lit1[0] == 'm' );
c1 = array2[0]; c1 = array2[0];
......
// 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc. // 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
...@@ -30,9 +30,8 @@ ...@@ -30,9 +30,8 @@
// test05 // test05
// libstdc++/1886 // libstdc++/1886
// should be able to instantiate basic_filebuf for non-standard types. // should be able to instantiate basic_filebuf for non-standard types.
namespace test namespace std
{ {
using namespace std;
using __gnu_test::pod_char; using __gnu_test::pod_char;
typedef short type_t; typedef short type_t;
template class basic_filebuf<type_t, char_traits<type_t> >; template class basic_filebuf<type_t, char_traits<type_t> >;
......
...@@ -33,7 +33,7 @@ protected: ...@@ -33,7 +33,7 @@ protected:
}; };
// libstdc++/13171 // libstdc++/13171
int test01() void test01()
{ {
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
using namespace std; using namespace std;
...@@ -51,4 +51,5 @@ int test01() ...@@ -51,4 +51,5 @@ int test01()
int main() int main()
{ {
test01(); test01();
return 0;
} }
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
// libstdc++/13582 // libstdc++/13582
int test01() void test01()
{ {
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
using namespace std; using namespace std;
......
// 2002-07-25 Benjamin Kosnik <bkoz@redhat.com> // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2002, 2003 Free Software Foundation, Inc. // Copyright (C) 2002, 2003, 2004 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
...@@ -35,9 +35,8 @@ ...@@ -35,9 +35,8 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
using __gnu_test::pod_char; using __gnu_test::pod_char;
typedef short type_t; typedef short type_t;
template class basic_fstream<type_t, char_traits<type_t> >; template class basic_fstream<type_t, char_traits<type_t> >;
......
// 2002-07-25 Benjamin Kosnik <bkoz@redhat.com> // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2002 Free Software Foundation, Inc. // Copyright (C) 2002, 2004 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
...@@ -34,9 +34,8 @@ ...@@ -34,9 +34,8 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
typedef short type_t; typedef short type_t;
template class basic_ifstream<type_t, char_traits<type_t> >; template class basic_ifstream<type_t, char_traits<type_t> >;
} // test } // test
// 2002-07-25 Benjamin Kosnik <bkoz@redhat.com> // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2002 Free Software Foundation, Inc. // Copyright (C) 2002, 2004 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
...@@ -34,9 +34,8 @@ ...@@ -34,9 +34,8 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
typedef short type_t; typedef short type_t;
template class basic_ios<type_t, char_traits<type_t> >; template class basic_ios<type_t, char_traits<type_t> >;
} // test } // test
// 2002-01-08 bkoz // 2002-01-08 bkoz
// Copyright (C) 2002 Free Software Foundation, Inc. // Copyright (C) 2002, 2004 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
...@@ -34,9 +34,8 @@ ...@@ -34,9 +34,8 @@
#include <istream> #include <istream>
namespace test namespace std
{ {
using namespace std;
typedef short type_t; typedef short type_t;
template class basic_iostream<type_t, char_traits<type_t> >; template class basic_iostream<type_t, char_traits<type_t> >;
} // test } // test
// 1999-09-20 bkoz // 1999-09-20 bkoz
// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
// 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
...@@ -35,9 +36,8 @@ ...@@ -35,9 +36,8 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
using __gnu_test::pod_char; using __gnu_test::pod_char;
typedef short type_t; typedef short type_t;
template class basic_istream<type_t, char_traits<type_t> >; template class basic_istream<type_t, char_traits<type_t> >;
......
// Copyright (C) 2003 Free Software Foundation, Inc. // Copyright (C) 2003, 2004 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
...@@ -54,7 +54,8 @@ void testthrow(T arg) ...@@ -54,7 +54,8 @@ void testthrow(T arg)
} }
catch(...) catch(...)
{ {
VERIFY( test = false ); test = false;
VERIFY( test );
} }
} }
......
// Copyright (C) 2003 Free Software Foundation, Inc. // Copyright (C) 2003, 2004 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
...@@ -67,7 +67,7 @@ void test02() ...@@ -67,7 +67,7 @@ void test02()
istream stream(&bib); istream stream(&bib);
stream.exceptions(ios_base::badbit); stream.exceptions(ios_base::badbit);
istream::off_type off; istream::off_type off(5);
try try
{ {
......
// 2002-07-25 Benjamin Kosnik <bkoz@redhat.com> // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2002 Free Software Foundation, Inc. // Copyright (C) 2002, 2004 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
...@@ -34,9 +34,8 @@ ...@@ -34,9 +34,8 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
typedef short type_t; typedef short type_t;
template class basic_istringstream<type_t, char_traits<type_t> >; template class basic_istringstream<type_t, char_traits<type_t> >;
} // test } // test
// 2000-01-10 bkoz // 2000-01-10 bkoz
// Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. // Copyright (C) 2000, 2001, 2003, 2004 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
...@@ -48,7 +48,7 @@ void test01() ...@@ -48,7 +48,7 @@ void test01()
state1 = is01.rdstate(); state1 = is01.rdstate();
is01 >> a; is01 >> a;
state2 = is01.rdstate(); state2 = is01.rdstate();
VERIFY( a = i01 ); VERIFY( a == i01 );
// 22.2.2.1.2 num_get virtual functions // 22.2.2.1.2 num_get virtual functions
// p 13 // p 13
// in any case, if stage 2 processing was terminated by the test for // in any case, if stage 2 processing was terminated by the test for
......
// 2002-07-25 Benjamin Kosnik <bkoz@redhat.com> // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2002 Free Software Foundation, Inc. // Copyright (C) 2002, 2004 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
...@@ -34,9 +34,8 @@ ...@@ -34,9 +34,8 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
typedef short type_t; typedef short type_t;
template class basic_ifstream<type_t, char_traits<type_t> >; template class basic_ifstream<type_t, char_traits<type_t> >;
} // test } // test
// 1999-09-20 bkoz // 1999-09-20 bkoz
// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
// 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
...@@ -35,9 +36,8 @@ ...@@ -35,9 +36,8 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
using __gnu_test::pod_char; using __gnu_test::pod_char;
typedef short type_t; typedef short type_t;
template class basic_ostream<type_t, char_traits<type_t> >; template class basic_ostream<type_t, char_traits<type_t> >;
......
// 2003-03-08 Jerry Quinn <jlquinn@optonline.net> // 2003-03-08 Jerry Quinn <jlquinn@optonline.net>
// Copyright (C) 2003 Free Software Foundation, Inc. // Copyright (C) 2003, 2004 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
...@@ -39,7 +39,7 @@ void test_badbit() ...@@ -39,7 +39,7 @@ void test_badbit()
try try
{ {
T i; T i = T();
stream << i; stream << i;
VERIFY( false ); VERIFY( false );
} }
......
// Copyright (C) 2003 // Copyright (C) 2003, 2004
// Free Software Foundation, Inc. // 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
...@@ -45,7 +45,7 @@ void test_failbit() ...@@ -45,7 +45,7 @@ void test_failbit()
try try
{ {
T i; T i = T();
stream << i; stream << i;
} }
catch (const ios_base::failure&) catch (const ios_base::failure&)
......
// Copyright (C) 2003 Free Software Foundation, Inc. // Copyright (C) 2003, 2004 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
...@@ -40,7 +40,7 @@ void test01() ...@@ -40,7 +40,7 @@ void test01()
ostream stream(&bib); ostream stream(&bib);
stream.exceptions(ios_base::badbit); stream.exceptions(ios_base::badbit);
ostream::pos_type pos; ostream::pos_type pos = ostream::pos_type();
try try
{ {
...@@ -67,7 +67,7 @@ void test02() ...@@ -67,7 +67,7 @@ void test02()
ostream stream(&bib); ostream stream(&bib);
stream.exceptions(ios_base::badbit); stream.exceptions(ios_base::badbit);
ostream::off_type off; ostream::off_type off(5);
try try
{ {
......
// 2002-07-25 Benjamin Kosnik <bkoz@redhat.com> // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2002 Free Software Foundation, Inc. // Copyright (C) 2002, 2004 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
...@@ -34,9 +34,8 @@ ...@@ -34,9 +34,8 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
typedef short type_t; typedef short type_t;
template class basic_ostringstream<type_t, char_traits<type_t> >; template class basic_ostringstream<type_t, char_traits<type_t> >;
} // test } // test
// 2002-07-25 Benjamin Kosnik <bkoz@redhat.com> // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2002, 2003 Free Software Foundation, Inc. // Copyright (C) 2002, 2003, 2004 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
...@@ -35,9 +35,8 @@ ...@@ -35,9 +35,8 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
using __gnu_test::pod_char; using __gnu_test::pod_char;
typedef short type_t; typedef short type_t;
template class basic_streambuf<type_t, char_traits<type_t> >; template class basic_streambuf<type_t, char_traits<type_t> >;
......
...@@ -47,15 +47,6 @@ void test01() ...@@ -47,15 +47,6 @@ void test01()
typedef test_type::off_type off_type; typedef test_type::off_type off_type;
} }
namespace test
{
using namespace std;
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> >;
} // test
int main() int main()
{ {
test01(); test01();
......
// 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc. // 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
...@@ -30,14 +30,13 @@ ...@@ -30,14 +30,13 @@
// test05 // test05
// libstdc++/1886 // libstdc++/1886
// should be able to instantiate basic_stringbuf for non-standard types. // should be able to instantiate basic_stringbuf for non-standard types.
namespace test namespace std
{ {
using namespace std;
using __gnu_test::pod_char; using __gnu_test::pod_char;
typedef short type_t; typedef short type_t;
template class basic_stringbuf<type_t, char_traits<type_t> >; template class basic_stringbuf<type_t, char_traits<type_t> >;
template class basic_stringbuf<pod_char, char_traits<pod_char> >; template class basic_stringbuf<pod_char, char_traits<pod_char> >;
} // test } // std
// more surf!!! // more surf!!!
......
// 2003-04-07 bkoz // 2003-04-07 bkoz
// Copyright (C) 2003 Free Software Foundation, Inc. // Copyright (C) 2003, 2004 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
...@@ -27,9 +27,8 @@ ...@@ -27,9 +27,8 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
using __gnu_test::pod_char; using __gnu_test::pod_char;
typedef __gnu_test::tracker_alloc<char> alloc_type; typedef __gnu_test::tracker_alloc<char> alloc_type;
template class basic_stringbuf<char, char_traits<char>, alloc_type>; template class basic_stringbuf<char, char_traits<char>, alloc_type>;
......
// 2002-07-25 Benjamin Kosnik <bkoz@redhat.com> // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2002, 2003 Free Software Foundation, Inc. // Copyright (C) 2002, 2003, 2004 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
...@@ -35,11 +35,10 @@ ...@@ -35,11 +35,10 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
using __gnu_test::pod_char; using __gnu_test::pod_char;
typedef short type_t; typedef short type_t;
template class basic_stringstream<type_t, char_traits<type_t> >; template class basic_stringstream<type_t, char_traits<type_t> >;
template class basic_stringstream<pod_char, char_traits<pod_char> >; template class basic_stringstream<pod_char, char_traits<pod_char> >;
} // test } // std
// 2001-05-24 Benjamin Kosnik <bkoz@redhat.com> // 2001-05-24 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2004 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
...@@ -48,7 +48,7 @@ void test01() ...@@ -48,7 +48,7 @@ void test01()
state1 = is01.rdstate(); state1 = is01.rdstate();
is01 >> a; is01 >> a;
state2 = is01.rdstate(); state2 = is01.rdstate();
VERIFY( a = i01 ); VERIFY( a == i01 );
// 22.2.2.1.2 num_get virtual functions // 22.2.2.1.2 num_get virtual functions
// p 13 // p 13
// in any case, if stage 2 processing was terminated by the test for // in any case, if stage 2 processing was terminated by the test for
......
// Copyright (C) 2003 // Copyright (C) 2003, 2004
// Free Software Foundation, Inc. // 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
...@@ -25,14 +25,13 @@ ...@@ -25,14 +25,13 @@
// { dg-do compile } // { dg-do compile }
namespace test namespace std
{ {
using namespace std;
using __gnu_test::pod_char; using __gnu_test::pod_char;
typedef short type_t; typedef short type_t;
template class fpos<type_t>; template class fpos<type_t>;
template class fpos<pod_char>; template class fpos<pod_char>;
} // test } // std
// more surf!!! // more surf!!!
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
// libstdc++/14320 // libstdc++/14320
int test01() void test01()
{ {
using namespace std; using namespace std;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
......
...@@ -38,7 +38,7 @@ void test01() ...@@ -38,7 +38,7 @@ void test01()
__gnu_test::set_file_limit(TWO_GB + 200); __gnu_test::set_file_limit(TWO_GB + 200);
basic_filebuf<char> fb; basic_filebuf<char> fb;
fb.open("14775_tmp", ios_base::out | ios_base::in | ios_base::trunc); fb.open("tmp_14775", ios_base::out | ios_base::in | ios_base::trunc);
pos_type ret = fb.pubseekoff(TWO_GB + 100, ios_base::beg); pos_type ret = fb.pubseekoff(TWO_GB + 100, ios_base::beg);
VERIFY( ret != pos_type(off_type(-1)) ); VERIFY( ret != pos_type(off_type(-1)) );
......
...@@ -58,7 +58,8 @@ void test02() ...@@ -58,7 +58,8 @@ void test02()
} }
catch(...) catch(...)
{ {
VERIFY( test = false ); test = false;
VERIFY( test );
} }
VERIFY( v == 0 ); VERIFY( v == 0 );
...@@ -77,7 +78,8 @@ void test02() ...@@ -77,7 +78,8 @@ void test02()
} }
catch(...) catch(...)
{ {
VERIFY( test = false ); test = false;
VERIFY( test );
} }
VERIFY( v == &test ); VERIFY( v == &test );
...@@ -96,7 +98,8 @@ void test02() ...@@ -96,7 +98,8 @@ void test02()
} }
catch(...) catch(...)
{ {
VERIFY( test = false ); test = false;
VERIFY( test );
} }
VERIFY( l == 0 ); VERIFY( l == 0 );
...@@ -115,7 +118,8 @@ void test02() ...@@ -115,7 +118,8 @@ void test02()
} }
catch(...) catch(...)
{ {
VERIFY( test = false ); test = false;
VERIFY( test );
} }
VERIFY( l == 1 ); VERIFY( l == 1 );
......
// Copyright (C) 2003 Free Software Foundation // Copyright (C) 2003, 2004 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
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
void test01() void test01()
{ {
std::streamsize ssize; std::streamsize ssize = 0;
std::streamoff soff; std::streamoff soff;
// No signed/unsigned warnings. // No signed/unsigned warnings.
......
// 2003-02-11 Paolo Carlini <pcarlini@unitus.it> // 2003-02-11 Paolo Carlini <pcarlini@unitus.it>
// Copyright (C) 2003 Free Software Foundation, Inc. // Copyright (C) 2003, 2004 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
...@@ -26,11 +26,9 @@ ...@@ -26,11 +26,9 @@
// { dg-do compile } // { dg-do compile }
// libstdc++/9320 // libstdc++/9320
namespace test namespace __gnu_cxx
{ {
using namespace std;
using __gnu_test::pod_char;
typedef short type_t; typedef short type_t;
template class __gnu_cxx::stdio_filebuf<type_t, char_traits<type_t> >; template class stdio_filebuf<type_t, std::char_traits<type_t> >;
template class __gnu_cxx::stdio_filebuf<pod_char, char_traits<pod_char> >; template class stdio_filebuf<__gnu_test::pod_char, std::char_traits<__gnu_test::pod_char> >;
} // test } // __gnu_cxx
...@@ -26,7 +26,7 @@ void test01() ...@@ -26,7 +26,7 @@ void test01()
using namespace std; using namespace std;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
const char* name = "12077_tmp"; const char* name = "tmp_12077";
locale loc = __gnu_test::try_named_locale("is_IS.UTF-8"); locale loc = __gnu_test::try_named_locale("is_IS.UTF-8");
locale::global(loc); locale::global(loc);
......
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