diff options
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/basic_stringbuf')
20 files changed, 118 insertions, 132 deletions
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc index 2763a01c3fc..f60911bdc43 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc @@ -1,7 +1,7 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == char // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2009 +// 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,14 +33,13 @@ std::stringbuf strb_03(str_03, std::ios_base::out); void test04() { bool test __attribute__((unused)) = true; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; // GET - strmof_1 = strb_01.in_avail(); - strmof_2 = strb_02.in_avail(); - strmof_1 = strb_03.in_avail(); + strb_01.in_avail(); + strb_02.in_avail(); + strb_03.in_avail(); // int_type sbumpc() // if read_cur not avail, return uflow(), else return *read_cur & increment diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc index 5b0f9862bfd..3ec279a19ef 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,14 +32,13 @@ std::wstringbuf strb_03(str_03, std::ios_base::out); void test04() { bool test __attribute__((unused)) = true; - std::streamoff strmof_1(-1), strmof_2; typedef std::wstringbuf::int_type int_type; typedef std::wstringbuf::traits_type traits_type; // GET - strmof_1 = strb_01.in_avail(); - strmof_2 = strb_02.in_avail(); - strmof_1 = strb_03.in_avail(); + strb_01.in_avail(); + strb_02.in_avail(); + strb_03.in_avail(); // int_type sbumpc() // if read_cur not avail, return uflow(), else return *read_cur & increment diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc index ee983c256cc..142cde9c7f2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == char -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -36,7 +36,7 @@ void test04() typedef std::stringbuf::off_type off_type; int_type c1 = strb_01.sbumpc(); - int_type c2, c3; + int_type c2; // BUFFER MANAGEMENT & POSITIONING @@ -84,7 +84,7 @@ void test04() c1 = strb_01.sgetc(); c2 = strb_01.sungetc(); strmsz_2 = strb_01.in_avail(); // 1 - c3 = strb_01.sgetc(); + strb_01.sgetc(); VERIFY( c1 != c2 ); VERIFY( strmsz_2 != strmsz_1 ); VERIFY( strmsz_2 == 1 ); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc index 288e76cae8a..1b0ee5fe58f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -36,7 +36,7 @@ void test04() typedef std::wstringbuf::off_type off_type; int_type c1 = strb_01.sbumpc(); - int_type c2, c3; + int_type c2; // BUFFER MANAGEMENT & POSITIONING @@ -84,7 +84,7 @@ void test04() c1 = strb_01.sgetc(); c2 = strb_01.sungetc(); strmsz_2 = strb_01.in_avail(); // 1 - c3 = strb_01.sgetc(); + strb_01.sgetc(); VERIFY( c1 != c2 ); VERIFY( strmsz_2 != strmsz_1 ); VERIFY( strmsz_2 == 1 ); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc index 4cdca1afc6e..53f98bf98c3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == char -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -34,7 +34,6 @@ void test04() typedef std::stringbuf::off_type off_type; int_type c1 = strb_01.sbumpc(); - int_type c2; int_type c3 = strb_01.sbumpc(); pos_type pt_1(off_type(-1)); @@ -58,7 +57,7 @@ void test04() off_1 = off_type(pt_1); c1 = strb_01.snextc(); //current in pointer +1 VERIFY( c1 == 'o' ); - c2 = strb_01.sputc('x'); //test current out pointer + strb_01.sputc('x'); //test current out pointer str_tmp = std::string("myxonos. . . or what?"); VERIFY( strb_01.str() == str_tmp ); strb_01.pubsync(); //resets pointers @@ -67,7 +66,7 @@ void test04() VERIFY( off_1 == off_2 ); c3 = strb_01.snextc(); //current in pointer +1 VERIFY( c1 == c3 ); - c2 = strb_01.sputc('x'); //test current out pointer + strb_01.sputc('x'); //test current out pointer str_tmp = std::string("myxonos. . . or what?"); VERIFY( strb_01.str() == str_tmp ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/wchar_t/1.cc index 47414b9d0fd..bc01ea64064 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/wchar_t/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -34,7 +34,6 @@ void test04() typedef std::wstringbuf::off_type off_type; int_type c1 = strb_01.sbumpc(); - int_type c2; int_type c3 = strb_01.sbumpc(); pos_type pt_1(off_type(-1)); @@ -58,7 +57,7 @@ void test04() off_1 = off_type(pt_1); c1 = strb_01.snextc(); //current in pointer +1 VERIFY( c1 == L'o' ); - c2 = strb_01.sputc(L'x'); //test current out pointer + strb_01.sputc(L'x'); //test current out pointer str_tmp = std::wstring(L"myxonos. . . or what?"); VERIFY( strb_01.str() == str_tmp ); strb_01.pubsync(); //resets pointers @@ -67,7 +66,7 @@ void test04() VERIFY( off_1 == off_2 ); c3 = strb_01.snextc(); //current in pointer +1 VERIFY( c1 == c3 ); - c2 = strb_01.sputc(L'x'); //test current out pointer + strb_01.sputc(L'x'); //test current out pointer str_tmp = std::wstring(L"myxonos. . . or what?"); VERIFY( strb_01.str() == str_tmp ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc index e686ba24960..f26ec85c565 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == char -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,14 +32,13 @@ std::stringbuf strb_03(str_03, std::ios_base::out); void test04() { bool test __attribute__((unused)) = true; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; // GET - strmof_1 = strb_01.in_avail(); - strmof_2 = strb_02.in_avail(); - strmof_1 = strb_03.in_avail(); + strb_01.in_avail(); + strb_02.in_avail(); + strb_03.in_avail(); int_type c3 = strb_01.sbumpc(); int_type c4 = strb_02.sbumpc(); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/wchar_t/1.cc index 181dba9fe56..98ca73d75fa 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/wchar_t/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,14 +32,13 @@ std::wstringbuf strb_03(str_03, std::ios_base::out); void test04() { bool test __attribute__((unused)) = true; - std::streamoff strmof_1(-1), strmof_2; typedef std::wstringbuf::int_type int_type; typedef std::wstringbuf::traits_type traits_type; // GET - strmof_1 = strb_01.in_avail(); - strmof_2 = strb_02.in_avail(); - strmof_1 = strb_03.in_avail(); + strb_01.in_avail(); + strb_02.in_avail(); + strb_03.in_avail(); int_type c3 = strb_01.sbumpc(); int_type c4 = strb_02.sbumpc(); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc index 4348f74692f..2f077a508a9 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc @@ -1,7 +1,7 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == char // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -// 2006, 2007, 2009 +// 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -34,20 +34,19 @@ void test04() { bool test __attribute__((unused)) = true; std::streamsize strmsz_1, strmsz_2; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; // GET - strmof_1 = strb_01.in_avail(); - strmof_2 = strb_02.in_avail(); - strmof_1 = strb_03.in_avail(); + strb_01.in_avail(); + strb_02.in_avail(); + strb_03.in_avail(); int_type c1 = strb_01.sbumpc(); int_type c2 = strb_02.sbumpc(); strb_01.sbumpc(); int_type c4 = strb_02.sbumpc(); - int_type c5 = strb_03.sbumpc(); + strb_03.sbumpc(); // int_type sgetc() // if read_cur not avail, return uflow(), else return *read_cur @@ -55,13 +54,13 @@ void test04() int_type c7 = strb_02.sgetc(); strb_01.sgetc(); strb_02.sgetc(); - c5 = strb_03.sgetc(); + strb_03.sgetc(); // int_type snextc() // calls sbumpc and if sbumpc != eof, return sgetc c6 = strb_01.snextc(); c7 = strb_02.snextc(); - c5 = strb_03.snextc(); + strb_03.snextc(); // streamsize sgetn(char_type *s, streamsize n) // streamsize xsgetn(char_type *s, streamsize n) diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc index 01a149eda45..5c917e10950 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc @@ -1,7 +1,7 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2009 +// 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -34,20 +34,19 @@ void test04() { bool test __attribute__((unused)) = true; std::streamsize strmsz_1, strmsz_2; - std::streamoff strmof_1(-1), strmof_2; typedef std::wstringbuf::int_type int_type; typedef std::wstringbuf::traits_type traits_type; // GET - strmof_1 = strb_01.in_avail(); - strmof_2 = strb_02.in_avail(); - strmof_1 = strb_03.in_avail(); + strb_01.in_avail(); + strb_02.in_avail(); + strb_03.in_avail(); int_type c1 = strb_01.sbumpc(); int_type c2 = strb_02.sbumpc(); strb_01.sbumpc(); int_type c4 = strb_02.sbumpc(); - int_type c5 = strb_03.sbumpc(); + strb_03.sbumpc(); // int_type sgetc() // if read_cur not avail, return uflow(), else return *read_cur @@ -55,13 +54,13 @@ void test04() int_type c7 = strb_02.sgetc(); strb_01.sgetc(); strb_02.sgetc(); - c5 = strb_03.sgetc(); + strb_03.sgetc(); // int_type snextc() // calls sbumpc and if sbumpc != eof, return sgetc c6 = strb_01.snextc(); c7 = strb_02.snextc(); - c5 = strb_03.snextc(); + strb_03.snextc(); // streamsize sgetn(char_type *s, streamsize n) // streamsize xsgetn(char_type *s, streamsize n) diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc index 960e6e9b17f..afe1dfa5750 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc @@ -1,7 +1,7 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == char // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2009 +// 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,14 +33,13 @@ std::stringbuf strb_03(str_03, std::ios_base::out); void test04() { bool test __attribute__((unused)) = true; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; // GET - strmof_1 = strb_01.in_avail(); - strmof_2 = strb_02.in_avail(); - strmof_1 = strb_03.in_avail(); + strb_01.in_avail(); + strb_02.in_avail(); + strb_03.in_avail(); strb_01.sbumpc(); strb_02.sbumpc(); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc index 62d21a7dc81..0154594b689 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc @@ -1,7 +1,7 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -// 2006, 2007, 2009 +// 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,14 +33,13 @@ std::wstringbuf strb_03(str_03, std::ios_base::out); void test04() { bool test __attribute__((unused)) = true; - std::streamoff strmof_1(-1), strmof_2; typedef std::wstringbuf::int_type int_type; typedef std::wstringbuf::traits_type traits_type; // GET - strmof_1 = strb_01.in_avail(); - strmof_2 = strb_02.in_avail(); - strmof_1 = strb_03.in_avail(); + strb_01.in_avail(); + strb_02.in_avail(); + strb_03.in_avail(); strb_01.sbumpc(); strb_02.sbumpc(); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc index c99c2aa1283..67358a3b911 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == char -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,7 +33,6 @@ void test04() { bool test __attribute__((unused)) = true; std::string str_tmp, str_tmp2; - std::streamsize strmsz_1, strmsz_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; @@ -44,27 +43,27 @@ void test04() // PUT strb_03.str(str_01); //reset - std::string::size_type sz1 = strb_03.str().length(); - std::string::size_type sz2 = strb_03.str().length(); + strb_03.str().length(); + strb_03.str().length(); // streamsize sputn(const char_typs* s, streamsize n) // write up to n chars to out_cur from s, returning number assigned // NB *sputn will happily put '\0' into your stream if you give it a chance* str_tmp = strb_03.str(); - sz1 = str_tmp.length(); - strmsz_1 = strb_03.sputn("racadabras", 10);//"abracadabras or what?" - sz2 = strb_03.str().length(); - strmsz_2 = strb_03.sputn(", i wanna reach out and", 10); - sz2 = strb_03.str().length(); + str_tmp.length(); + strb_03.sputn("racadabras", 10);//"abracadabras or what?" + strb_03.str().length(); + strb_03.sputn(", i wanna reach out and", 10); + strb_03.str().length(); str_tmp = strb_02.str(); - strmsz_1 = strb_02.sputn("racadabra", 10); + strb_02.sputn("racadabra", 10); // PUTBACK // int_type sputbackc(char_type c) // if in_cur not avail || ! traits::eq(c, gptr() [-1]), return pbfail // otherwise decrements in_cur and returns *gptr() - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); str_tmp = strb_01.str(); c1 = strb_01.sgetc(); //"mykonos. . . 'o'r what?" c2 = strb_01.sputbackc('z');//"mykonos. . .zor what?" @@ -76,7 +75,7 @@ void test04() VERIFY( str_tmp.size() == str_tmp2.size() ); //test for _in_cur == _in_beg strb_01.str(str_tmp); - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); c1 = strb_01.sgetc(); //"'m'ykonos. . . or what?" c2 = strb_01.sputbackc('z');//"mykonos. . . or what?" c3 = strb_01.sgetc(); @@ -88,7 +87,7 @@ void test04() VERIFY( str_tmp.size() == strb_01.str().size() ); // test for replacing char with identical one strb_01.str(str_01); //reset - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); strb_01.sbumpc(); strb_01.sbumpc(); c1 = strb_01.sgetc(); //"my'k'onos. . . or what?" @@ -100,7 +99,7 @@ void test04() VERIFY( strb_01.str() == str_01 ); VERIFY( str_01.size() == strb_01.str().size() ); //test for ios_base::out - strmsz_2 = strb_03.in_avail(); + strb_03.in_avail(); c4 = strb_03.sputbackc('x'); VERIFY( c4 == traits_type::eof() ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc index f95a695dd00..e0c91a3b2c0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,7 +33,6 @@ void test04() { bool test __attribute__((unused)) = true; std::wstring str_tmp, str_tmp2; - std::streamsize strmsz_1, strmsz_2; typedef std::wstringbuf::int_type int_type; typedef std::wstringbuf::traits_type traits_type; @@ -44,27 +43,27 @@ void test04() // PUT strb_03.str(str_01); //reset - std::wstring::size_type sz1 = strb_03.str().length(); - std::wstring::size_type sz2 = strb_03.str().length(); + strb_03.str().length(); + strb_03.str().length(); // streamsize sputn(const char_typs* s, streamsize n) // write up to n chars to out_cur from s, returning number assigned // NB *sputn will happily put '\0' into your stream if you give it a chance* str_tmp = strb_03.str(); - sz1 = str_tmp.length(); - strmsz_1 = strb_03.sputn(L"racadabras", 10);//"abracadabras or what?" - sz2 = strb_03.str().length(); - strmsz_2 = strb_03.sputn(L", i wanna reach out and", 10); - sz2 = strb_03.str().length(); + str_tmp.length(); + strb_03.sputn(L"racadabras", 10);//"abracadabras or what?" + strb_03.str().length(); + strb_03.sputn(L", i wanna reach out and", 10); + strb_03.str().length(); str_tmp = strb_02.str(); - strmsz_1 = strb_02.sputn(L"racadabra", 10); + strb_02.sputn(L"racadabra", 10); // PUTBACK // int_type sputbackc(char_type c) // if in_cur not avail || ! traits::eq(c, gptr() [-1]), return pbfail // otherwise decrements in_cur and returns *gptr() - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); str_tmp = strb_01.str(); c1 = strb_01.sgetc(); //"mykonos. . . 'o'r what?" c2 = strb_01.sputbackc(L'z');//"mykonos. . .zor what?" @@ -76,7 +75,7 @@ void test04() VERIFY( str_tmp.size() == str_tmp2.size() ); //test for _in_cur == _in_beg strb_01.str(str_tmp); - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); c1 = strb_01.sgetc(); //"'m'ykonos. . . or what?" c2 = strb_01.sputbackc(L'z');//"mykonos. . . or what?" c3 = strb_01.sgetc(); @@ -88,7 +87,7 @@ void test04() VERIFY( str_tmp.size() == strb_01.str().size() ); // test for replacing char with identical one strb_01.str(str_01); //reset - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); strb_01.sbumpc(); strb_01.sbumpc(); c1 = strb_01.sgetc(); //"my'k'onos. . . or what?" @@ -100,7 +99,7 @@ void test04() VERIFY( strb_01.str() == str_01 ); VERIFY( str_01.size() == strb_01.str().size() ); //test for ios_base::out - strmsz_2 = strb_03.in_avail(); + strb_03.in_avail(); c4 = strb_03.sputbackc(L'x'); VERIFY( c4 == traits_type::eof() ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1057.cc index 06957dd1926..f88f28e39a1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/wchar_t/1057.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/wchar_t/1057.cc index 4b4216b883d..ae07ebf30ed 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/wchar_t/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/wchar_t/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1057.cc index c05d289846d..c51f47a8d34 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/wchar_t/1057.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/wchar_t/1057.cc index 33d1ad79afe..99f7a550993 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/wchar_t/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/wchar_t/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc index 5b1fcfca1d1..ae038e518c3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == char -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,7 +33,6 @@ void test04() { bool test __attribute__((unused)) = true; std::string str_tmp; - std::streamsize strmsz_1, strmsz_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; @@ -44,47 +43,47 @@ void test04() // PUT strb_03.str(str_01); //reset - std::string::size_type sz1 = strb_03.str().length(); - std::string::size_type sz2 = strb_03.str().length(); + strb_03.str().length(); + strb_03.str().length(); // streamsize sputn(const char_typs* s, streamsize n) // write up to n chars to out_cur from s, returning number assigned // NB *sputn will happily put '\0' into your stream if you give it a chance* str_tmp = strb_03.str(); - sz1 = str_tmp.length(); - strmsz_1 = strb_03.sputn("racadabras", 10);//"abracadabras or what?" - sz2 = strb_03.str().length(); - strmsz_2 = strb_03.sputn(", i wanna reach out and", 10); - sz2 = strb_03.str().length(); + str_tmp.length(); + strb_03.sputn("racadabras", 10);//"abracadabras or what?" + strb_03.str().length(); + strb_03.sputn(", i wanna reach out and", 10); + strb_03.str().length(); str_tmp = strb_02.str(); - strmsz_1 = strb_02.sputn("racadabra", 10); + strb_02.sputn("racadabra", 10); // PUTBACK // int_type sputbackc(char_type c) // if in_cur not avail || ! traits::eq(c, gptr() [-1]), return pbfail // otherwise decrements in_cur and returns *gptr() - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); str_tmp = strb_01.str(); c1 = strb_01.sgetc(); //"mykonos. . . 'o'r what?" c2 = strb_01.sputbackc('z');//"mykonos. . .zor what?" c3 = strb_01.sgetc(); //test for _in_cur == _in_beg strb_01.str(str_tmp); - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); c1 = strb_01.sgetc(); //"'m'ykonos. . . or what?" c2 = strb_01.sputbackc('z');//"mykonos. . . or what?" c3 = strb_01.sgetc(); // test for replacing char with identical one strb_01.str(str_01); //reset - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); strb_01.sbumpc(); strb_01.sbumpc(); c1 = strb_01.sgetc(); //"my'k'onos. . . or what?" c2 = strb_01.sputbackc('y');//"mykonos. . . or what?" c3 = strb_01.sgetc(); //test for ios_base::out - strmsz_2 = strb_03.in_avail(); + strb_03.in_avail(); c4 = strb_03.sputbackc('x'); // int_type sungetc() @@ -92,7 +91,7 @@ void test04() // return to_int_type(*gptr()) for (int i = 0; i<12; ++i) strb_01.sbumpc(); - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); str_tmp = strb_01.str(); c1 = strb_01.sgetc(); //"mykonos. . . 'o'r what?" c2 = strb_01.sungetc();//"mykonos. . . or what?" @@ -105,7 +104,7 @@ void test04() VERIFY( str_01.size() == strb_01.str().size() ); //test for _in_cur == _in_beg strb_01.str(str_tmp); - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); c1 = strb_01.sgetc(); //"'m'ykonos. . . or what?" c2 = strb_01.sungetc();//"mykonos. . . or what?" c3 = strb_01.sgetc(); @@ -117,7 +116,7 @@ void test04() VERIFY( str_01.size() == strb_01.str().size() ); // test for replacing char with identical one strb_01.str(str_01); //reset - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); strb_01.sbumpc(); strb_01.sbumpc(); c1 = strb_01.sgetc(); //"my'k'onos. . . or what?" @@ -129,7 +128,7 @@ void test04() VERIFY( strb_01.str() == str_01 ); VERIFY( str_01.size() == strb_01.str().size() ); //test for ios_base::out - strmsz_2 = strb_03.in_avail(); + strb_03.in_avail(); c4 = strb_03.sungetc(); VERIFY( c4 == traits_type::eof() ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc index 360a1abb2d0..767b7eac50d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,7 +33,6 @@ void test04() { bool test __attribute__((unused)) = true; std::wstring str_tmp; - std::streamsize strmsz_1, strmsz_2; typedef std::wstringbuf::int_type int_type; typedef std::wstringbuf::traits_type traits_type; @@ -44,47 +43,47 @@ void test04() // PUT strb_03.str(str_01); //reset - std::wstring::size_type sz1 = strb_03.str().length(); - std::wstring::size_type sz2 = strb_03.str().length(); + strb_03.str().length(); + strb_03.str().length(); // streamsize sputn(const char_typs* s, streamsize n) // write up to n chars to out_cur from s, returning number assigned // NB *sputn will happily put '\0' into your stream if you give it a chance* str_tmp = strb_03.str(); - sz1 = str_tmp.length(); - strmsz_1 = strb_03.sputn(L"racadabras", 10);//"abracadabras or what?" - sz2 = strb_03.str().length(); - strmsz_2 = strb_03.sputn(L", i wanna reach out and", 10); - sz2 = strb_03.str().length(); + str_tmp.length(); + strb_03.sputn(L"racadabras", 10);//"abracadabras or what?" + strb_03.str().length(); + strb_03.sputn(L", i wanna reach out and", 10); + strb_03.str().length(); str_tmp = strb_02.str(); - strmsz_1 = strb_02.sputn(L"racadabra", 10); + strb_02.sputn(L"racadabra", 10); // PUTBACK // int_type sputbackc(char_type c) // if in_cur not avail || ! traits::eq(c, gptr() [-1]), return pbfail // otherwise decrements in_cur and returns *gptr() - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); str_tmp = strb_01.str(); c1 = strb_01.sgetc(); //"mykonos. . . 'o'r what?" c2 = strb_01.sputbackc('z');//"mykonos. . .zor what?" c3 = strb_01.sgetc(); //test for _in_cur == _in_beg strb_01.str(str_tmp); - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); c1 = strb_01.sgetc(); //"'m'ykonos. . . or what?" c2 = strb_01.sputbackc(L'z');//"mykonos. . . or what?" c3 = strb_01.sgetc(); // test for replacing char with identical one strb_01.str(str_01); //reset - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); strb_01.sbumpc(); strb_01.sbumpc(); c1 = strb_01.sgetc(); //"my'k'onos. . . or what?" c2 = strb_01.sputbackc(L'y');//"mykonos. . . or what?" c3 = strb_01.sgetc(); //test for ios_base::out - strmsz_2 = strb_03.in_avail(); + strb_03.in_avail(); c4 = strb_03.sputbackc(L'x'); // int_type sungetc() @@ -92,7 +91,7 @@ void test04() // return to_int_type(*gptr()) for (int i = 0; i<12; ++i) strb_01.sbumpc(); - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); str_tmp = strb_01.str(); c1 = strb_01.sgetc(); //"mykonos. . . 'o'r what?" c2 = strb_01.sungetc();//"mykonos. . . or what?" @@ -105,7 +104,7 @@ void test04() VERIFY( str_01.size() == strb_01.str().size() ); //test for _in_cur == _in_beg strb_01.str(str_tmp); - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); c1 = strb_01.sgetc(); //"'m'ykonos. . . or what?" c2 = strb_01.sungetc();//"mykonos. . . or what?" c3 = strb_01.sgetc(); @@ -117,7 +116,7 @@ void test04() VERIFY( str_01.size() == strb_01.str().size() ); // test for replacing char with identical one strb_01.str(str_01); //reset - strmsz_1 = strb_01.in_avail(); + strb_01.in_avail(); strb_01.sbumpc(); strb_01.sbumpc(); c1 = strb_01.sgetc(); //"my'k'onos. . . or what?" @@ -129,7 +128,7 @@ void test04() VERIFY( strb_01.str() == str_01 ); VERIFY( str_01.size() == strb_01.str().size() ); //test for ios_base::out - strmsz_2 = strb_03.in_avail(); + strb_03.in_avail(); c4 = strb_03.sungetc(); VERIFY( c4 == traits_type::eof() ); } |