diff options
Diffstat (limited to 'libstdc++-v3/testsuite')
145 files changed, 6166 insertions, 3984 deletions
diff --git a/libstdc++-v3/testsuite/17_intro/header_cassert.cc b/libstdc++-v3/testsuite/17_intro/header_cassert.cc new file mode 100644 index 00000000000..f232bacc65e --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/header_cassert.cc @@ -0,0 +1,40 @@ +// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 17.4.1.2 Headers, cassert + +#include <cassert> + +namespace gnu +{ + void test01() + { + assert (true); +#ifndef assert + #error "assert_must_be_a_macro" +#endif + } +} + +int main() +{ + gnu::test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/17_intro/header_cerrno.cc b/libstdc++-v3/testsuite/17_intro/header_cerrno.cc new file mode 100644 index 00000000000..bfd869e8685 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/header_cerrno.cc @@ -0,0 +1,40 @@ +// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 17.4.1.2 Headers, cerrno + +#include <cerrno> + +namespace gnu +{ + void test01() + { + int i = errno; +#ifndef errno + #error "errno_must_be_a_macro" +#endif + } +} + +int main() +{ + gnu::test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc b/libstdc++-v3/testsuite/17_intro/header_ciso646.cc index 30a8982fa39..8513b0864ef 100644 --- a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc +++ b/libstdc++-v3/testsuite/17_intro/header_ciso646.cc @@ -23,7 +23,7 @@ // { dg-do link } #include <ciso646> -#include <debug_assert.h> +#include <testsuite_hooks.h> // 2.11 Keywords @@ -125,11 +125,3 @@ int main(void) return 0; } - - - - - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc b/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc new file mode 100644 index 00000000000..4e2610de4f2 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc @@ -0,0 +1,41 @@ +// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 17.4.1.2 Headers, csetjmp + +#include <csetjmp> + +namespace gnu +{ + void test01() + { + std::jmp_buf env; + int i = setjmp(env); +#ifndef setjmp + #error "setjmp_must_be_a_macro" +#endif + } +} + +int main() +{ + gnu::test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc b/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc new file mode 100644 index 00000000000..260e92905cb --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc @@ -0,0 +1,46 @@ +// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 17.4.1.2 Headers, cstdarg + +#include <cstdarg> + +namespace gnu +{ + void test01() + { + std::va_list list; +#ifndef va_arg + #error "va_arg_must_be_a_macro" +#endif +#ifndef va_end + #error "va_end_must_be_a_macro" +#endif +#ifndef va_start + #error "va_start_must_be_a_macro" +#endif + } +} + +int main() +{ + gnu::test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/17_intro/header_cstddef.cc b/libstdc++-v3/testsuite/17_intro/header_cstddef.cc new file mode 100644 index 00000000000..eab1c75386a --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/header_cstddef.cc @@ -0,0 +1,46 @@ +// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 17.4.1.2 Headers, cstddef + +#include <cstddef> + +namespace gnu +{ + struct test_type + { + int i; + int j; + }; + + void test01() + { + std::size_t i = offsetof(struct test_type, i); +#ifndef offsetof + #error "offsetof_must_be_a_macro" +#endif + } +} + +int main() +{ + gnu::test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdio.cc b/libstdc++-v3/testsuite/17_intro/header_cstdio.cc index 38d7cd565a3..383cc0a5293 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cstdio.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cstdio.cc @@ -22,14 +22,9 @@ #include <cstdio> - int main(void) { // Make sure size_t is in namespace std - std::size_t i = 5; // { dg-do compile } + std::size_t i = 5; return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc b/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc index 3a4664e6779..32827cfbca0 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc @@ -22,14 +22,22 @@ #include <cstdlib> +// libstdc++/2190 +void test01() +{ + long a = std::abs(1L); + ldiv_t b = std::div(2L, 1L); +} -int main(void) +void test02() { // Make sure size_t is in namespace std - std::size_t i = 5; // { dg-do compile } - return 0; + std::size_t i = 5; } - - - +int main() +{ + test01(); + test02(); + return 0; +} diff --git a/libstdc++-v3/testsuite/17_intro/header_cstring.cc b/libstdc++-v3/testsuite/17_intro/header_cstring.cc index 02d51eae697..ae8852a43e0 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cstring.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cstring.cc @@ -26,11 +26,6 @@ int main(void) { // Make sure size_t is in namespace std - // { dg-do compile } std::size_t i = std::strlen("tibet shop/san francisco (415) 982-0326"); return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_ctime.cc b/libstdc++-v3/testsuite/17_intro/header_ctime.cc index 98f48b7e879..03f8294cda6 100644 --- a/libstdc++-v3/testsuite/17_intro/header_ctime.cc +++ b/libstdc++-v3/testsuite/17_intro/header_ctime.cc @@ -26,10 +26,6 @@ int main(void) { // Make sure size_t is in namespace std - std::size_t i = 5; // { dg-do compile } + std::size_t i = 5; return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_cwchar.cc b/libstdc++-v3/testsuite/17_intro/header_cwchar.cc index 0b421ee1d2a..0f9974ddb13 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cwchar.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cwchar.cc @@ -26,6 +26,9 @@ int main(void) { // Make sure size_t is in namespace std - std::size_t i = 5; // { dg-do compile } + std::size_t i = 5; + + std::tm mytime; + return 0; } diff --git a/libstdc++-v3/testsuite/17_intro/header_cwctype.cc b/libstdc++-v3/testsuite/17_intro/header_cwctype.cc index e5db1b53756..ba315b49ce0 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cwctype.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cwctype.cc @@ -22,8 +22,29 @@ #if _GLIBCPP_USE_WCHAR_T #include <cwctype> - // Make sure wint_t is in namespace std - std::wint_t i = 5; // { dg-do compile } +// Make sure wint_t is in namespace std +std::wint_t i = 5; + +// Make sure table 46 is in namespace std. +using std::wctype_t; +using std::wctrans_t; +using std::iswalpha; +using std::iswupper; +using std::iswlower; +using std::iswdigit; +using std::iswxdigit; +using std::iswalnum; +using std::iswspace; +using std::iswpunct; +using std::iswprint; +using std::iswgraph; +using std::iswcntrl; +using std::iswctype; +using std::towctrans; +using std::towlower; +using std::towupper; +using std::wctrans; +using std::wctype; #endif int main(void) @@ -31,6 +52,3 @@ int main(void) return 0; } - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_fstream.cc b/libstdc++-v3/testsuite/17_intro/header_fstream.cc index 1163fd11944..9f41f505719 100644 --- a/libstdc++-v3/testsuite/17_intro/header_fstream.cc +++ b/libstdc++-v3/testsuite/17_intro/header_fstream.cc @@ -20,15 +20,11 @@ // 17.4.1.2 Headers, fstream -#include <fstream> // { dg-do compile } -#include <debug_assert.h> +#include <fstream> +#include <testsuite_hooks.h> int main(void) { return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_iomanip.cc b/libstdc++-v3/testsuite/17_intro/header_iomanip.cc index d9929f4d671..130e9767753 100644 --- a/libstdc++-v3/testsuite/17_intro/header_iomanip.cc +++ b/libstdc++-v3/testsuite/17_intro/header_iomanip.cc @@ -20,15 +20,11 @@ // 17.4.1.2 Headers, iomanip -#include <iomanip> // { dg-do compile } -#include <debug_assert.h> +#include <iomanip> +#include <testsuite_hooks.h> int main(void) { return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_ios.cc b/libstdc++-v3/testsuite/17_intro/header_ios.cc index facbecba65b..bde8a85c6f4 100644 --- a/libstdc++-v3/testsuite/17_intro/header_ios.cc +++ b/libstdc++-v3/testsuite/17_intro/header_ios.cc @@ -20,15 +20,11 @@ // 17.4.1.2 Headers, ios -#include <ios> // { dg-do compile } -#include <debug_assert.h> +#include <ios> +#include <testsuite_hooks.h> int main(void) { return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_iosfwd.cc b/libstdc++-v3/testsuite/17_intro/header_iosfwd.cc index 695b832df55..d9846702774 100644 --- a/libstdc++-v3/testsuite/17_intro/header_iosfwd.cc +++ b/libstdc++-v3/testsuite/17_intro/header_iosfwd.cc @@ -20,15 +20,11 @@ // 17.4.1.2 Headers, iosfwd -#include <iosfwd> // { dg-do compile } -#include <debug_assert.h> +#include <iosfwd> +#include <testsuite_hooks.h> int main(void) { return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_iostream.cc b/libstdc++-v3/testsuite/17_intro/header_iostream.cc index 790846f188e..59b72fcce7b 100644 --- a/libstdc++-v3/testsuite/17_intro/header_iostream.cc +++ b/libstdc++-v3/testsuite/17_intro/header_iostream.cc @@ -20,15 +20,11 @@ // 17.4.1.2 Headers, iostream -#include <iostream> // { dg-do compile } -#include <debug_assert.h> +#include <iostream> +#include <testsuite_hooks.h> int main(void) { return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_istream.cc b/libstdc++-v3/testsuite/17_intro/header_istream.cc index 72eb2243600..daa7f16d1aa 100644 --- a/libstdc++-v3/testsuite/17_intro/header_istream.cc +++ b/libstdc++-v3/testsuite/17_intro/header_istream.cc @@ -20,15 +20,11 @@ // 17.4.1.2 Headers, istream -#include <istream> // { dg-do compile } -#include <debug_assert.h> +#include <istream> +#include <testsuite_hooks.h> int main(void) { return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_ostream.cc b/libstdc++-v3/testsuite/17_intro/header_ostream.cc index d365105b78b..7af23d55800 100644 --- a/libstdc++-v3/testsuite/17_intro/header_ostream.cc +++ b/libstdc++-v3/testsuite/17_intro/header_ostream.cc @@ -20,15 +20,11 @@ // 17.4.1.2 Headers, ostream -#include <ostream> // { dg-do compile } -#include <debug_assert.h> +#include <ostream> +#include <testsuite_hooks.h> int main(void) { return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_sstream.cc b/libstdc++-v3/testsuite/17_intro/header_sstream.cc index bdbf0c46197..b546c5498ce 100644 --- a/libstdc++-v3/testsuite/17_intro/header_sstream.cc +++ b/libstdc++-v3/testsuite/17_intro/header_sstream.cc @@ -20,15 +20,11 @@ // 17.4.1.2 Headers, sstream -#include <sstream> // { dg-do compile } -#include <debug_assert.h> +#include <sstream> +#include <testsuite_hooks.h> int main(void) { return 0; } - - - - diff --git a/libstdc++-v3/testsuite/17_intro/header_streambuf.cc b/libstdc++-v3/testsuite/17_intro/header_streambuf.cc index 50234a65443..de5b8abfd86 100644 --- a/libstdc++-v3/testsuite/17_intro/header_streambuf.cc +++ b/libstdc++-v3/testsuite/17_intro/header_streambuf.cc @@ -20,8 +20,8 @@ // 17.4.1.2 Headers, streambuf -#include <streambuf> // { dg-do compile } -#include <debug_assert.h> +#include <streambuf> +#include <testsuite_hooks.h> int main(void) diff --git a/libstdc++-v3/testsuite/17_intro/headers.cc b/libstdc++-v3/testsuite/17_intro/headers.cc index 2ec4041dd10..eb930f1ff00 100644 --- a/libstdc++-v3/testsuite/17_intro/headers.cc +++ b/libstdc++-v3/testsuite/17_intro/headers.cc @@ -80,4 +80,4 @@ #include <cwctype> #endif -int main() { } // { dg-do compile } +int main() { return 0; } diff --git a/libstdc++-v3/testsuite/17_intro/headers_c++.cc b/libstdc++-v3/testsuite/17_intro/headers_c++.cc index d5c01a83d58..cb6a71d9e13 100644 --- a/libstdc++-v3/testsuite/17_intro/headers_c++.cc +++ b/libstdc++-v3/testsuite/17_intro/headers_c++.cc @@ -67,4 +67,18 @@ #include <wctype.h> #endif -int main() { } // { dg-do compile } +// libstdc++/2992 +namespace bar +{ + int foo(const char *x) + { return strlen(x); } +}; + + +int main() { return 0; } + + + + + + diff --git a/libstdc++-v3/testsuite/17_intro/headers_c.cc b/libstdc++-v3/testsuite/17_intro/headers_c.cc index 406bc9802e4..b4fe65895d9 100644 --- a/libstdc++-v3/testsuite/17_intro/headers_c.cc +++ b/libstdc++-v3/testsuite/17_intro/headers_c.cc @@ -67,4 +67,12 @@ #include <cwctype> #endif -int main() { } // { dg-do compile } +// libstdc++/2992 +namespace bar +{ + int foo(const char *x) + { return strlen(x); } +}; + + +int main() { return 0; } diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits.cc b/libstdc++-v3/testsuite/18_support/numeric_limits.cc index fce32abb2b0..6252f507e02 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits.cc @@ -21,7 +21,7 @@ // 18.2.1.1 template class numeric_limits #include <limits> -#include <debug_assert.h> +#include <testsuite_hooks.h> template<typename T> @@ -86,8 +86,3 @@ int main() return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc b/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc new file mode 100644 index 00000000000..c118580ce50 --- /dev/null +++ b/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc @@ -0,0 +1,116 @@ +// 2001-02-26 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 19.1 Exception classes + +#include <string> +#include <stdexcept> +#include <testsuite_hooks.h> + +// libstdc++/1972 +void test01() +{ + bool test = true; + std::string s("lack of sunlight, no water error"); + // XXX work around long-standing, pathalogical, hostility-inducing parser bug + // std::logic_error obj(std::string(strlit)); + + // 1 + std::logic_error obj = std::logic_error(s); + + // 2 + // std::logic_error obj((std::string)strlit); + + VERIFY( std::strcmp(obj.what(), s.data()) == 0 ); +} + +void test02() +{ + bool test = true; + std::string s("lack of sunlight error"); + std::domain_error x(s); + + VERIFY( std::strcmp(x.what(), s.data()) == 0 ); +} + +// libstdc++/2089 +class fuzzy_logic : public std::logic_error +{ +public: + fuzzy_logic() : std::logic_error("whoa") { } +}; + +void test03() +{ + bool test = true; + + try + { throw fuzzy_logic(); } + catch(const fuzzy_logic& obj) + { VERIFY( std::strcmp("whoa", obj.what()) == 0 ); } + catch(...) + { VERIFY( false ); } +} + +// test copy ctors and assignment operators +// libstdc++/1972 +// via Greg Bumgardner <bumgard@roguewave.com> +void allocate_on_stack(void) +{ + const size_t num = 512; + __extension__ char array[num]; + for (size_t i = 0; i < num; i++) + array[i]=0; +} +void test04() +{ + const std::string s("CA ISO emergency once again:immediate power down"); + const char* strlit1 = "wish I lived in Palo Alto"; + const char* strlit2 = "...or Santa Barbara"; + std::runtime_error obj1(s); + + // block 01 + { + const std::string s2(strlit1); + std::runtime_error obj2(s2); + obj1 = obj2; + } + allocate_on_stack(); + VERIFY( std::strcmp(strlit1, obj1.what()) == 0 ); + + // block 02 + { + const std::string s3(strlit2); + std::runtime_error obj3 = std::runtime_error(s3); + obj1 = obj3; + } + allocate_on_stack(); + VERIFY( std::strcmp(strlit2, obj1.what()) == 0 ); +} + +int main(void) +{ + test01(); + test02(); + test03(); + test04(); + + return 0; +} diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr.cc b/libstdc++-v3/testsuite/20_util/auto_ptr.cc index 95d8fd0ee1c..a1c3de2374e 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr.cc @@ -19,7 +19,7 @@ // 20.4.5 Template class auto_ptr [lib.auto.ptr] #include <memory> -#include <debug_assert.h> +#include <testsuite_hooks.h> struct A { diff --git a/libstdc++-v3/testsuite/20_util/binders.cc b/libstdc++-v3/testsuite/20_util/binders.cc new file mode 100644 index 00000000000..6dd45e3ff96 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/binders.cc @@ -0,0 +1,51 @@ +// 2001-06-11 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 20.3.6 Binders + +#include <vector> +#include <algorithm> // for_each +#include <functional> + +class Elem +{ +public: + void print(int i) const { } + void modify(int i) { } +}; + +// libstdc++/3113 +void test01() +{ + std::vector<Elem> coll(2); + // OK + std::for_each(coll.begin(), coll.end(), + std::bind2nd(std::mem_fun_ref(&Elem::print), 42)); + // OK + std::for_each(coll.begin(), coll.end(), + std::bind2nd(std::mem_fun_ref(&Elem::modify), 42)); +} + + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/21_strings/append.cc b/libstdc++-v3/testsuite/21_strings/append.cc index 07b170674a4..c518e952671 100644 --- a/libstdc++-v3/testsuite/21_strings/append.cc +++ b/libstdc++-v3/testsuite/21_strings/append.cc @@ -22,7 +22,7 @@ #include <string> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01(void) { @@ -160,9 +160,5 @@ bool test01(void) int main() { test01(); + return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/c_strings.cc b/libstdc++-v3/testsuite/21_strings/c_strings.cc new file mode 100644 index 00000000000..63041779a83 --- /dev/null +++ b/libstdc++-v3/testsuite/21_strings/c_strings.cc @@ -0,0 +1,91 @@ +// 2001-04-02 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 21.4: null-terminiated sequence utilities + +#include <string> +#include <cstring> +#include <cwchar> + +void test01() +{ + bool test = true; + char c = 'a'; + const char cc = 'b'; + char* c1 = &c; + const char* cc1 = &cc; + const char* ccarray1 = "san francisco roof garden inspectors"; + const char* ccarray2 = "san francisco sunny-day park inspectors"; + char carray[50]; + std::strcpy(carray, ccarray1); + void* v = carray; + const void* cv = ccarray1; + + // const char* strchr(const char* s, int c); + // char* strchr(char* s, int c); + cc1 = std::strchr(ccarray1, 'c'); + c1 = std::strchr(carray, 'c'); + + // const char* strpbrk(const char* s1, const char* s2); + // char* strpbrk(char* s1, const char* s2); + cc1 = std::strpbrk(ccarray1, ccarray2); + c1 = std::strpbrk(carray, ccarray2); + + // const char* strrchr(const char* s, int c); + // char* strrchr(char* s, int c); + cc1 = std::strrchr(ccarray1, 'c'); + c1 = std::strrchr(carray, 'c'); + + // const char* strstr(const char* s1, const char* s2); + // char* strstr(char* s1, const char* s2); + cc1 = std::strstr(ccarray1, ccarray2); + c1 = std::strstr(carray, carray); + + // const void* memchr(const void* s, int c, size_t n); + // void* memchr( void* s, int c, size_t n); + cv = std::memchr(cv, 'a', 3); + v = std::memchr(v, 'a', 3); +} + +void test02() +{ + using namespace std; + + const char* ccarray1 = "san francisco roof garden inspectors"; + const char* ccarray2 = "san francisco sunny-day park inspectors"; + char carray[50]; + strcpy(carray, ccarray1); + void* v = carray; + const void* cv = ccarray1; + + memchr(cv, '/', 3); + strchr(ccarray1, '/'); + strpbrk(ccarray1, ccarray2); + strrchr(ccarray1, 'c'); + strstr(carray, carray); +} + +int main() +{ + test01(); + test02(); + + return 0; +} diff --git a/libstdc++-v3/testsuite/21_strings/capacity.cc b/libstdc++-v3/testsuite/21_strings/capacity.cc index b93e6fe64c8..8239f1b6488 100644 --- a/libstdc++-v3/testsuite/21_strings/capacity.cc +++ b/libstdc++-v3/testsuite/21_strings/capacity.cc @@ -22,7 +22,7 @@ #include <string> #include <cstdio> -#include <debug_assert.h> +#include <testsuite_hooks.h> template<typename T> struct A { }; @@ -169,11 +169,30 @@ bool test01() return test; } +// libstdc++/4548 +// http://gcc.gnu.org/ml/libstdc++/2001-11/msg00150.html +bool test02() +{ + bool test = true; + + std::string str01 = "twelve chars"; + // str01 becomes shared + std::string str02 = str01; + str01.reserve(1); + VERIFY( str01.capacity() == 12 ); + +#ifdef DEBUG_ASSERT + assert(test); +#endif + + return test; +} + + int main() { test01(); + test02(); return 0; } - - diff --git a/libstdc++-v3/testsuite/21_strings/char_traits.cc b/libstdc++-v3/testsuite/21_strings/char_traits_requirements.cc index 1978bda41b3..d2406ed3599 100644 --- a/libstdc++-v3/testsuite/21_strings/char_traits.cc +++ b/libstdc++-v3/testsuite/21_strings/char_traits_requirements.cc @@ -1,6 +1,6 @@ // 1999-06-03 bkoz -// Copyright (C) 1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -18,10 +18,10 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// 21.1 Characher traits +// 21.1.1 Characher traits requirements #include <string> -#include <debug_assert.h> +#include <testsuite_hooks.h> int test01(void) { @@ -200,9 +200,5 @@ int main() #if _GLIBCPP_USE_WCHAR_T test02(); #endif + return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/char_traits-int_type.C b/libstdc++-v3/testsuite/21_strings/char_traits_typedefs.cc index 40b05a9c36c..699a479fa83 100644 --- a/libstdc++-v3/testsuite/21_strings/char_traits-int_type.C +++ b/libstdc++-v3/testsuite/21_strings/char_traits_typedefs.cc @@ -1,7 +1,7 @@ // 2001-02-11 gdr // Origin: Craig Rodrigues <rodrigc@mediaone.net> -// Copyright (C) 1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -19,13 +19,14 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// 21.1.3.1/2: char_traits<char>::int_type == int +// 21.1.2: char_traits typedefs #include <string> int main() { - // dg-options -ansi -pedantic-errors + // 21.1.3: char_traits<char>::int_type == int + // dg-options -ansi -pedantic-err std::char_traits<char>::int_type* p = 0; int* q = p; // dg-do compile diff --git a/libstdc++-v3/testsuite/21_strings/compare.cc b/libstdc++-v3/testsuite/21_strings/compare.cc index ba10e61f5cf..d06dbfda4f9 100644 --- a/libstdc++-v3/testsuite/21_strings/compare.cc +++ b/libstdc++-v3/testsuite/21_strings/compare.cc @@ -31,7 +31,7 @@ // things would be sorted in a dictionary. #include <string> -#include <debug_assert.h> +#include <testsuite_hooks.h> enum want_value {lt=0, z=1, gt=2}; @@ -135,9 +135,3 @@ main() return 0; } - - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc b/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc index f38c42df944..355ce4d5dcd 100644 --- a/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc +++ b/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc @@ -1,6 +1,6 @@ // 1999-06-04 bkoz -// Copyright (C) 1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -23,7 +23,7 @@ #include <new> #include <string> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> int test01(void) { @@ -176,16 +176,29 @@ void test02() #endif } +void test03() +{ + bool test = true; + const char* with_nulls = "This contains \0 a zero byte."; + + // These are tests to see how basic_string handles data with NUL + // bytes. Obviously basic_string(char*) will halt at the first one, but + // nothing else should. + std::string s1 (with_nulls, 28); + VERIFY( s1.size() == 28 ); + std::string s2 (s1); + VERIFY( s2.size() == 28 ); + +#ifdef DEBUG_ASSERT + assert(test); +#endif +} + int main() { + __set_testsuite_memlimit(); test01(); test02(); + test03(); + return 0; } - - - - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/element_access.cc b/libstdc++-v3/testsuite/21_strings/element_access.cc index 34d63923a94..072f5ac85e7 100644 --- a/libstdc++-v3/testsuite/21_strings/element_access.cc +++ b/libstdc++-v3/testsuite/21_strings/element_access.cc @@ -22,7 +22,7 @@ #include <string> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01(void) { @@ -89,12 +89,6 @@ bool test01(void) int main() { - - test01(); + return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/find.cc b/libstdc++-v3/testsuite/21_strings/find.cc index 8bafeb4ab10..c6a4c1cbac8 100644 --- a/libstdc++-v3/testsuite/21_strings/find.cc +++ b/libstdc++-v3/testsuite/21_strings/find.cc @@ -22,7 +22,7 @@ #include <string> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01(void) { @@ -194,9 +194,5 @@ bool test01(void) int main() { test01(); + return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/insert.cc b/libstdc++-v3/testsuite/21_strings/insert.cc index da51000bd08..3c8dff0d5dc 100644 --- a/libstdc++-v3/testsuite/21_strings/insert.cc +++ b/libstdc++-v3/testsuite/21_strings/insert.cc @@ -22,7 +22,7 @@ #include <string> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> int test01(void) { @@ -189,10 +189,7 @@ int test01(void) int main() { + __set_testsuite_memlimit(); test01(); + return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/inserters_extractors.cc b/libstdc++-v3/testsuite/21_strings/inserters_extractors.cc index 559598d8e8a..b83e5aa4e60 100644 --- a/libstdc++-v3/testsuite/21_strings/inserters_extractors.cc +++ b/libstdc++-v3/testsuite/21_strings/inserters_extractors.cc @@ -30,7 +30,7 @@ #include <fstream> #include <iostream> #include <iomanip> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01(void) { @@ -41,9 +41,8 @@ bool test01(void) csize_type npos = std::string::npos; csize_type csz01, csz02; - const char str_lit01[] = "sailing grand traverse bay - from Elk Rapids to the point reminds me of miles"; - const std::string str01(str_lit01); + const std::string str01("sailing grand traverse bay\n" + "\t\t\t from Elk Rapids to the point reminds me of miles"); const std::string str02("sailing"); const std::string str03("grand"); const std::string str04("traverse"); @@ -124,7 +123,7 @@ bool test01(void) getline(istrs02, str10); VERIFY( istrs02.fail() ); VERIFY( istrs02.eof() ); - VERIFY( str10 == "\t from Elk Rapids to the point reminds me of miles" ); + VERIFY( str10 =="\t from Elk Rapids to the point reminds me of miles" ); } catch(std::exception& fail) { VERIFY( false ); // shouldn't throw @@ -305,6 +304,26 @@ void test08() VERIFY( year == 2001 ); } +// libstdc++/2830 +void test09() +{ + bool test = true; + std::string blanks( 3, '\0'); + std::string foo = "peace"; + foo += blanks; + foo += "& love"; + + std::ostringstream oss1; + oss1 << foo; + VERIFY( oss1.str() == foo ); + + std::ostringstream oss2; + oss2.width(20); + oss2 << foo; + VERIFY( oss2.str() != foo ); + VERIFY( oss2.str().size() == 20 ); +} + int main() { test01(); @@ -321,12 +340,7 @@ int main() test07(); test08(); + + test09(); return 0; } - - - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/invariants.cc b/libstdc++-v3/testsuite/21_strings/invariants.cc index 5a00281170f..d6dd05d6831 100644 --- a/libstdc++-v3/testsuite/21_strings/invariants.cc +++ b/libstdc++-v3/testsuite/21_strings/invariants.cc @@ -22,7 +22,7 @@ #include <string> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> // Do a quick sanity check on known problems with element access and // ref-counted strings. These should all pass, regardless of the @@ -171,9 +171,5 @@ int main() { test01(); test02(); + return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/nonmember.cc b/libstdc++-v3/testsuite/21_strings/nonmember.cc index 61704fda6cc..451611e94f0 100644 --- a/libstdc++-v3/testsuite/21_strings/nonmember.cc +++ b/libstdc++-v3/testsuite/21_strings/nonmember.cc @@ -111,7 +111,7 @@ template<class charT, class traits, class Allocator> */ #include <string> -#include <debug_assert.h> +#include <testsuite_hooks.h> int test01(void) { @@ -293,12 +293,8 @@ template<class charT, class traits, class Allocator> return 0; } -int main() { +int main() +{ test01(); + return 0; } - - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/operations.cc b/libstdc++-v3/testsuite/21_strings/operations.cc index 996d7d566ef..b6c68ebcb9e 100644 --- a/libstdc++-v3/testsuite/21_strings/operations.cc +++ b/libstdc++-v3/testsuite/21_strings/operations.cc @@ -22,7 +22,7 @@ #include <string> #include <cstdio> -#include <debug_assert.h> +#include <testsuite_hooks.h> int test01(void) { @@ -52,5 +52,5 @@ int test01(void) int main() { test01(); + return 0; } - diff --git a/libstdc++-v3/testsuite/21_strings/replace.cc b/libstdc++-v3/testsuite/21_strings/replace.cc index 2ad1ab61a65..b4aac625ea1 100644 --- a/libstdc++-v3/testsuite/21_strings/replace.cc +++ b/libstdc++-v3/testsuite/21_strings/replace.cc @@ -22,7 +22,7 @@ #include <string> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01(void) { @@ -86,9 +86,5 @@ bool test01(void) int main() { test01(); + return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/21_strings/rfind.cc b/libstdc++-v3/testsuite/21_strings/rfind.cc index cf826dda52c..af720f3820d 100644 --- a/libstdc++-v3/testsuite/21_strings/rfind.cc +++ b/libstdc++-v3/testsuite/21_strings/rfind.cc @@ -20,7 +20,7 @@ #include <string> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> // 21.3.6.2 basic_string rfind bool test01(void) @@ -121,4 +121,5 @@ int main() test01(); test02(); test03(); + return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/substr.cc b/libstdc++-v3/testsuite/21_strings/substr.cc index 5c643576276..0ec6ee35453 100644 --- a/libstdc++-v3/testsuite/21_strings/substr.cc +++ b/libstdc++-v3/testsuite/21_strings/substr.cc @@ -22,7 +22,7 @@ #include <string> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01(void) { @@ -76,9 +76,5 @@ bool test01(void) int main() { test01(); + return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_char_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_char_char.cc index a86e7ff9ef8..01542666ebe 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt_char_char.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt_char_char.cc @@ -21,7 +21,7 @@ // 22.2.1.5 - Template class codecvt [lib.locale.codecvt] #include <locale> -#include <debug_assert.h> +#include <testsuite_hooks.h> // Required instantiation, degenerate conversion. // codecvt<char, char, mbstate_t> @@ -85,6 +85,3 @@ int main () return 0; } - - - diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_unicode_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_unicode_char.cc index 86fbc69376a..8118c176a0b 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt_unicode_char.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt_unicode_char.cc @@ -21,7 +21,7 @@ // 22.2.1.5 - Template class codecvt [lib.locale.codecvt] #include <locale> -#include <debug_assert.h> +#include <testsuite_hooks.h> using namespace std; @@ -237,6 +237,3 @@ int main () return 0; } - - - diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_unicode_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/codecvt_unicode_wchar_t.cc index 606c7168b57..4547e01cee5 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt_unicode_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt_unicode_wchar_t.cc @@ -21,7 +21,7 @@ // 22.2.1.5 - Template class codecvt [lib.locale.codecvt] #include <locale> -#include <debug_assert.h> +#include <testsuite_hooks.h> using namespace std; @@ -130,6 +130,3 @@ int main () return 0; } - - - diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_wchar_t_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_wchar_t_char.cc index 8ea65743a1f..92235e8486f 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt_wchar_t_char.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt_wchar_t_char.cc @@ -22,7 +22,7 @@ #include <cwchar> // for mbstate_t #include <locale> -#include <debug_assert.h> +#include <testsuite_hooks.h> // Need to explicitly set the state(mbstate_t) to zero. @@ -121,6 +121,3 @@ int main () return 0; } - - - diff --git a/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc b/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc index cbac8843187..21e1f26b1e5 100644 --- a/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc +++ b/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc @@ -23,7 +23,7 @@ #include <cwchar> // for mbstate_t #include <locale> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> #if _GLIBCPP_USE_WCHAR_T typedef std::codecvt<char, char, std::mbstate_t> c_codecvt; diff --git a/libstdc++-v3/testsuite/22_locale/ctype.cc b/libstdc++-v3/testsuite/22_locale/ctype.cc index b51ee70932b..54a6a4e2e03 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype.cc @@ -153,8 +153,21 @@ test01() m01 ^= m02; } +class gnu_obj +{ }; + +class gnu_ctype2: public std::ctype<gnu_obj> +{ }; + +// libstdc++/3017 +void test02() +{ + gnu_ctype2 obj; +} + int main() { test01(); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/ctype_char_members.cc b/libstdc++-v3/testsuite/22_locale/ctype_char_members.cc index 93eedd171ce..d13f97e13d9 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype_char_members.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype_char_members.cc @@ -31,7 +31,7 @@ #include <locale> // NB: Don't include any other headers in this file. -#include <debug_assert.h> +#include <testsuite_hooks.h> class gnu_ctype: public std::ctype<char> { }; @@ -172,5 +172,3 @@ int main() { test01(); return 0; } - - diff --git a/libstdc++-v3/testsuite/22_locale/ctype_wchar_t_members.cc b/libstdc++-v3/testsuite/22_locale/ctype_wchar_t_members.cc index f4a104e25ce..107a4d5e3c3 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype_wchar_t_members.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype_wchar_t_members.cc @@ -31,7 +31,7 @@ #include <locale> // NB: Don't include any other headers in this file. -#include <debug_assert.h> +#include <testsuite_hooks.h> #if _GLIBCPP_USE_WCHAR_T class gnu_ctype: public std::ctype<wchar_t> {}; @@ -105,5 +105,3 @@ int main() { #endif /* !defined(_GLIBCPP_USE_WCHAR_T) */ return 0; } - - diff --git a/libstdc++-v3/testsuite/22_locale/facet.cc b/libstdc++-v3/testsuite/22_locale/facet.cc index 1f1a42fa914..7f4d9953da4 100644 --- a/libstdc++-v3/testsuite/22_locale/facet.cc +++ b/libstdc++-v3/testsuite/22_locale/facet.cc @@ -25,7 +25,7 @@ #include <stdexcept> #include <string> #include <iterator> -#include <debug_assert.h> +#include <testsuite_hooks.h> // 1 a class if a facet if it is publicly derived from another facet typedef std::istreambuf_iterator<char> input_iterator; @@ -239,11 +239,3 @@ int main () return 0; } - - - - - - - - diff --git a/libstdc++-v3/testsuite/22_locale/global_templates.cc b/libstdc++-v3/testsuite/22_locale/global_templates.cc index afd00b060b5..49886aa18bf 100644 --- a/libstdc++-v3/testsuite/22_locale/global_templates.cc +++ b/libstdc++-v3/testsuite/22_locale/global_templates.cc @@ -22,7 +22,7 @@ #include <cwchar> // for mbstate_t #include <locale> -#include <debug_assert.h> +#include <testsuite_hooks.h> typedef std::codecvt<char, char, std::mbstate_t> ccodecvt; diff --git a/libstdc++-v3/testsuite/22_locale/members.cc b/libstdc++-v3/testsuite/22_locale/members.cc index c474a17ee87..16bc6c587e9 100644 --- a/libstdc++-v3/testsuite/22_locale/members.cc +++ b/libstdc++-v3/testsuite/22_locale/members.cc @@ -22,7 +22,7 @@ #include <locale> #include <string> -#include <debug_assert.h> +#include <testsuite_hooks.h> // creating unnamed locales 1 using new + combine void @@ -135,6 +135,3 @@ int main() test02(); return 0; } - - - diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname.cc index 444f364a2e5..5fbbcc251be 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct_byname.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname.cc @@ -21,7 +21,7 @@ // 22.2.3.2 Template class numpunct_byname #include <locale> -#include <debug_assert.h> +#include <testsuite_hooks.h> void test01() { @@ -68,6 +68,3 @@ int main() return 0; } - - - diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_char_members.cc b/libstdc++-v3/testsuite/22_locale/numpunct_char_members.cc index 64c329fee19..87409fe583d 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct_char_members.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct_char_members.cc @@ -21,7 +21,7 @@ // 22.2.3.1.1 nunpunct members #include <locale> -#include <debug_assert.h> +#include <testsuite_hooks.h> void test01() { @@ -88,4 +88,3 @@ int main() return 0; } - diff --git a/libstdc++-v3/testsuite/22_locale/operators.cc b/libstdc++-v3/testsuite/22_locale/operators.cc index e876748d302..2b9cd337da7 100644 --- a/libstdc++-v3/testsuite/22_locale/operators.cc +++ b/libstdc++-v3/testsuite/22_locale/operators.cc @@ -22,7 +22,7 @@ #include <cwchar> // for mbstate_t #include <locale> -#include <debug_assert.h> +#include <testsuite_hooks.h> typedef std::codecvt<char, char, std::mbstate_t> ccodecvt; class gnu_codecvt: public ccodecvt { }; diff --git a/libstdc++-v3/testsuite/22_locale/static_members.cc b/libstdc++-v3/testsuite/22_locale/static_members.cc index 7f951d81ff8..16e856a2ee4 100644 --- a/libstdc++-v3/testsuite/22_locale/static_members.cc +++ b/libstdc++-v3/testsuite/22_locale/static_members.cc @@ -22,7 +22,7 @@ #include <cwchar> // for mbstate_t #include <locale> -#include <debug_assert.h> +#include <testsuite_hooks.h> typedef std::codecvt<char, char, std::mbstate_t> ccodecvt; class gnu_codecvt: public ccodecvt { }; diff --git a/libstdc++-v3/testsuite/23_containers/bitset_ctor.cc b/libstdc++-v3/testsuite/23_containers/bitset_ctor.cc index 9741f24b463..8f9008ff058 100644 --- a/libstdc++-v3/testsuite/23_containers/bitset_ctor.cc +++ b/libstdc++-v3/testsuite/23_containers/bitset_ctor.cc @@ -22,7 +22,7 @@ #include <string> #include <bitset> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01(void) { diff --git a/libstdc++-v3/testsuite/23_containers/bitset_members.cc b/libstdc++-v3/testsuite/23_containers/bitset_members.cc new file mode 100644 index 00000000000..cef2cf99e52 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/bitset_members.cc @@ -0,0 +1,59 @@ +// 2001-06-03 pme + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 23.3.5.2 bitset members + +#include <bitset> +#include <testsuite_hooks.h> + +bool test01(void) +{ + bool test = true; + const size_t n1 = 5; + +// the other 22 member functions should be in here too... + + + // test() + try { + std::bitset<n1> five_bits; + bool unused = five_bits.test(n1); // should throw + VERIFY( false ); + } + catch(std::out_of_range& fail) { + VERIFY( true ); + } + catch(...) { + VERIFY( false ); + } + + +#ifdef DEBUG_ASSERT + assert(test); +#endif + return test; +} + +int main() +{ + test01(); + + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/bitset_shift.cc b/libstdc++-v3/testsuite/23_containers/bitset_shift.cc index 3ca2ee3db18..35531bf5b4c 100644 --- a/libstdc++-v3/testsuite/23_containers/bitset_shift.cc +++ b/libstdc++-v3/testsuite/23_containers/bitset_shift.cc @@ -22,7 +22,7 @@ #include <set> #include <bitset> -#include <debug_assert.h> +#include <testsuite_hooks.h> static char original_bits[1024]; static char left_shifted[1024]; diff --git a/libstdc++-v3/testsuite/23_containers/map_insert.cc b/libstdc++-v3/testsuite/23_containers/map_insert.cc new file mode 100644 index 00000000000..d870897a6c7 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/map_insert.cc @@ -0,0 +1,69 @@ +// 2001-08-23 pme & Sylvain.Pion@sophia.inria.fr + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 23.3.1.2, table 69 -- map::insert(p,t) + +#include <map> +#include <testsuite_hooks.h> + +// { dg-do run } + +// libstdc++/3349 and +// http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01375.html +void test01() +{ + typedef std::map<int, int> Map; + Map M; + Map::iterator hint; + + hint = M.insert(Map::value_type(7, 0)).first; + + M.insert(hint, Map::value_type(8, 1)); + M.insert(M.begin(), Map::value_type(9, 2)); + +#if 0 + // The tree's __rb_verify() member must be exposed in map<> before this + // will even compile. It's good test to see that "missing" entries are + // in fact present in the {map,tree}, but in the wrong place. + if (0) + { + Map::iterator i = M.begin(); + while (i != M.end()) { + std::cerr << '(' << i->first << ',' << i->second << ")\n"; + ++i; + } + std::cerr << "tree internal verify: " + << std::boolalpha << M.__rb_verify() << "\n"; + } +#endif + + VERIFY ( M.find(7) != M.end() ); + VERIFY ( M.find(8) != M.end() ); + VERIFY ( M.find(9) != M.end() ); +} + + +int main() +{ + test01(); + + return 0; +} + diff --git a/libstdc++-v3/testsuite/23_containers/map_operators.cc b/libstdc++-v3/testsuite/23_containers/map_operators.cc index 4def7aa79aa..6df8a2b7c01 100644 --- a/libstdc++-v3/testsuite/23_containers/map_operators.cc +++ b/libstdc++-v3/testsuite/23_containers/map_operators.cc @@ -1,6 +1,6 @@ // 2000-09-07 bgarcia@laurelnetworks.com -// Copyright (C) 2000 Free Software Foundation, Inc. +// Copyright (C) 2000, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -24,9 +24,10 @@ #include <string> #include <iostream> -// map and set +// { dg-do compile } +// { dg-excess-errors "" } + // libstdc++/86: map & set iterator comparisons are not type-safe -// XXX this is XFAIL for the time being, ie this should not compile void test01() { bool test = true; @@ -37,28 +38,27 @@ void test01() mapByIndex.insert(std::pair<unsigned, int>(6, 5)); std::map<unsigned, int>::iterator itr(mapByIndex.begin()); - - test &= itr != mapByName.end(); // XXX - notice, it's not mapByIndex!! - test &= itr == mapByName.end(); // XXX - notice, it's not mapByIndex!! - return 0; + // NB: notice, it's not mapByIndex!! + test &= itr != mapByName.end(); // { dg-error "match" "" { xfail *-*-* } } + test &= itr == mapByName.end(); // { dg-error "match" "" { xfail *-*-* } } } // http://gcc.gnu.org/ml/libstdc++/2000-11/msg00093.html void test02() { - typedef std::map<int,const int> MapInt; - - MapInt m; - - for (unsigned i=0;i<10;++i) - m.insert(MapInt::value_type(i,i)); - - for (MapInt::const_iterator i=m.begin();i!=m.end();++i) - std::cerr << i->second << ' '; - - for (MapInt::const_iterator i=m.begin();m.end()!=i;++i) - std::cerr << i->second << ' '; + typedef std::map<int,const int> MapInt; + + MapInt m; + + for (unsigned i=0;i<10;++i) + m.insert(MapInt::value_type(i,i)); + + for (MapInt::const_iterator i=m.begin();i!=m.end();++i) + std::cerr << i->second << ' '; + + for (MapInt::const_iterator i=m.begin();m.end()!=i;++i) + std::cerr << i->second << ' '; } int main() diff --git a/libstdc++-v3/testsuite/23_containers/multiset.cc b/libstdc++-v3/testsuite/23_containers/multiset.cc index 5e9c195c84c..90cd1c6d5df 100644 --- a/libstdc++-v3/testsuite/23_containers/multiset.cc +++ b/libstdc++-v3/testsuite/23_containers/multiset.cc @@ -70,4 +70,3 @@ int main () 69 9 69 4 */ - diff --git a/libstdc++-v3/testsuite/23_containers/set_operators.cc b/libstdc++-v3/testsuite/23_containers/set_operators.cc index 42e01e9de4a..5bf9dba18f9 100644 --- a/libstdc++-v3/testsuite/23_containers/set_operators.cc +++ b/libstdc++-v3/testsuite/23_containers/set_operators.cc @@ -1,6 +1,6 @@ // 2000-09-07 bgarcia@laurelnetworks.com -// Copyright (C) 2000 Free Software Foundation, Inc. +// Copyright (C) 2000, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -22,10 +22,11 @@ #include <set> #include <string> +make +// { dg-do compile } +// { dg-excess-errors "" } -// map and set // libstdc++/86: map & set iterator comparisons are not type-safe -// XXX this is XFAIL for the time being, ie this should not compile int main(void) { bool test = true; @@ -35,8 +36,11 @@ int main(void) std::set<unsigned int>::iterator itr(setByIndex.begin()); - test &= itr != setByName.end(); // XXX - notice, it's not setByIndex!! - test &= itr == setByName.end(); // XXX - notice, it's not setByIndex!! + // NB: it's not setByIndex!! + test &= itr != setByName.end(); + // { dg-error "no match for" "" { xfail *-*-* } 41 } + test &= itr == setByName.end(); + // { dg-error "no match for" "" { xfail *-*-* } 43 } return 0; } diff --git a/libstdc++-v3/testsuite/23_containers/vector_capacity.cc b/libstdc++-v3/testsuite/23_containers/vector_capacity.cc index b69e2abf1bb..a56f2ef40c4 100644 --- a/libstdc++-v3/testsuite/23_containers/vector_capacity.cc +++ b/libstdc++-v3/testsuite/23_containers/vector_capacity.cc @@ -22,7 +22,7 @@ // 23.2.4.2 vector capacity #include <vector> -#include <debug_assert.h> +#include <testsuite_hooks.h> template<typename T> struct A { }; diff --git a/libstdc++-v3/testsuite/23_containers/vector_ctor.cc b/libstdc++-v3/testsuite/23_containers/vector_ctor.cc index 10a244f533b..63f8325a30e 100644 --- a/libstdc++-v3/testsuite/23_containers/vector_ctor.cc +++ b/libstdc++-v3/testsuite/23_containers/vector_ctor.cc @@ -22,7 +22,7 @@ // 23.2.4.1 vector constructors, copy, and assignment #include <vector> -#include <debug_assert.h> +#include <testsuite_hooks.h> template<typename T> struct A { }; @@ -64,6 +64,3 @@ int main() test02(); return 0; } - - - diff --git a/libstdc++-v3/testsuite/23_containers/vector_element_access.cc b/libstdc++-v3/testsuite/23_containers/vector_element_access.cc index 016310b9d3b..5f5b5d231de 100644 --- a/libstdc++-v3/testsuite/23_containers/vector_element_access.cc +++ b/libstdc++-v3/testsuite/23_containers/vector_element_access.cc @@ -23,7 +23,7 @@ #include <vector> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> template<typename T> struct A { }; @@ -66,6 +66,3 @@ int main() return 0; } - - - diff --git a/libstdc++-v3/testsuite/23_containers/vector_modifiers.cc b/libstdc++-v3/testsuite/23_containers/vector_modifiers.cc index f1ba0229d61..5660f54933f 100644 --- a/libstdc++-v3/testsuite/23_containers/vector_modifiers.cc +++ b/libstdc++-v3/testsuite/23_containers/vector_modifiers.cc @@ -21,7 +21,7 @@ // 23.2.4.3 vector modifiers #include <vector> -#include <debug_assert.h> +#include <testsuite_hooks.h> template<typename T> struct A { }; @@ -63,7 +63,3 @@ int main() return 0; } - - - - diff --git a/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc b/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc index 78d36331604..d908e2344ef 100644 --- a/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc @@ -1,6 +1,6 @@ // 1999-06-28 bkoz -// Copyright (C) 1999 Free Software Foundation, Inc. +// Copyright (C) 1999, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -22,7 +22,7 @@ #include <sstream> #include <iterator> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01(void) { @@ -102,7 +102,7 @@ bool test01(void) std::istringstream istrs02(str01); cistreambuf_iter istrb_it28(istrs02); - for (int i = 0; i < sizeof(slit01) - 3;) + for (int i = 0; i < sizeof(slit01) - 2;) { c = *++istrb_it28; VERIFY( c == slit01[++i] ); @@ -115,11 +115,46 @@ bool test01(void) return test; } +// libstdc++/2627 +void test02() +{ + bool test = true; + const std::string s("free the vieques"); + + // 1 + std::string res_postfix; + std::istringstream iss01(s); + std::istreambuf_iterator<char> isbufit01(iss01); + for (int j = 0; j < s.size(); ++j, isbufit01++) + res_postfix += *isbufit01; + + // 2 + std::string res_prefix; + std::istringstream iss02(s); + std::istreambuf_iterator<char> isbufit02(iss02); + for (int j = 0; j < s.size(); ++j, ++isbufit02) + res_prefix += *isbufit02; + + // 3 mixed + std::string res_mixed; + std::istringstream iss03(s); + std::istreambuf_iterator<char> isbufit03(iss03); + for (int j = 0; j < int(s.size() / 2); ++j) + { + res_mixed += *isbufit03; + ++isbufit03; + res_mixed += *isbufit03; + isbufit03++; + } + + VERIFY ( res_postfix == res_prefix ); + VERIFY ( res_mixed == res_prefix ); +} + int main() { test01(); + test02(); return 0; } - - diff --git a/libstdc++-v3/testsuite/24_iterators/iterator.cc b/libstdc++-v3/testsuite/24_iterators/iterator.cc index 4930f149a0b..a5a6974f80a 100644 --- a/libstdc++-v3/testsuite/24_iterators/iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/iterator.cc @@ -21,7 +21,7 @@ #include <string> #include <vector> -#include <debug_assert.h> +#include <testsuite_hooks.h> int string_stuff() @@ -594,6 +594,5 @@ main(int argc, char **argv) assert (failures == 0); #endif - return failures ? 1 : 0; + return 0; } - diff --git a/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc b/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc new file mode 100644 index 00000000000..29bf0d944c2 --- /dev/null +++ b/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc @@ -0,0 +1,98 @@ +// 2001-04-30 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 24.5.4 template class ostreambuf_iterator + +#include <sstream> +#include <iterator> +#include <testsuite_hooks.h> + +bool test01(void) +{ + typedef std::ostreambuf_iterator<char> costreambuf_iter; + typedef costreambuf_iter::streambuf_type cstreambuf_type; + bool test = true; + const char slit01[] = "playa hermosa, liberia, guanacaste"; + const char slit02[] = "bodega bay, lost coast, california"; + std::string str01(slit01); + std::string str02(slit02); + std::string tmp; + std::stringbuf strbuf01; + std::stringbuf strbuf02(str01); + std::ostringstream ostrs00(str01); + std::ostringstream ostrs01(str01); + + // ctor sanity checks + costreambuf_iter ostrb_it01(ostrs00); + VERIFY( !ostrb_it01.failed() ); + ostrb_it01++; + ++ostrb_it01; + VERIFY( !ostrb_it01.failed() ); + ostrb_it01 = 'a'; + VERIFY( !ostrb_it01.failed() ); + *ostrb_it01; + VERIFY( !ostrb_it01.failed() ); + + costreambuf_iter ostrb_it02(NULL); + VERIFY( ostrb_it02.failed() ); + ostrb_it02++; + ++ostrb_it02; + VERIFY( ostrb_it02.failed() ); + *ostrb_it02; + VERIFY( ostrb_it02.failed() ); + ostrb_it02 = 'a'; + VERIFY( ostrb_it02.failed() ); + + // charT operator*() const + // ostreambuf_iterator& operator++(); + // ostreambuf_iterator& operator++(int); + costreambuf_iter ostrb_it27(ostrs01); + VERIFY( !ostrb_it27.failed() ); + int j = str02.size(); + for (int i = 0; i < j; ++i) + ostrb_it27 = str02[i]; + VERIFY( !ostrb_it27.failed() ); + tmp = ostrs01.str(); + VERIFY ( tmp != str01 ); + VERIFY ( tmp == str02 ); + + costreambuf_iter ostrb_it28(ostrs00); + VERIFY( !ostrb_it28.failed() ); + j = ostrs00.str().size(); + for (int i = 0; i < j + 2; ++i) + ostrb_it28 = 'b'; + VERIFY( !ostrb_it28.failed() ); + tmp = ostrs00.str(); + VERIFY ( tmp != str01 ); + VERIFY ( tmp != str02 ); + +#ifdef DEBUG_ASSERT + assert(test); +#endif + + return test; +} + +int main() +{ + test01(); + + return 0; +} diff --git a/libstdc++-v3/testsuite/25_algorithms/equal.cc b/libstdc++-v3/testsuite/25_algorithms/equal.cc new file mode 100644 index 00000000000..b4a322f4dff --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/equal.cc @@ -0,0 +1,41 @@ +// 2001-04-06 gdr + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include <vector> +#include <algorithm> + +// +// 25.1.8 Make sure std::equal doesn't make any extra assumption +// about operator== and operator!= +// + +struct X { }; + +bool operator==(X, X) { return true; } + +// Not implemented on purpose. { dg-do link } +bool operator!=(X, X); + +int main() +{ + std::vector<X> v, w; + + return !std::equal(v.begin(), v.end(), w.begin()); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc index 714d4557f5c..f6bf336597c 100644 --- a/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc +++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc @@ -17,7 +17,7 @@ // USA. #include <algorithm> -#include <debug_assert.h> +#include <testsuite_hooks.h> // http://gcc.gnu.org/ml/libstdc++/2000-06/msg00316.html struct foo { }; @@ -43,6 +43,3 @@ int main() { return 0; } - - - diff --git a/libstdc++-v3/testsuite/25_algorithms/min_max.cc b/libstdc++-v3/testsuite/25_algorithms/min_max.cc index 04cd6302a34..198247b6f9e 100644 --- a/libstdc++-v3/testsuite/25_algorithms/min_max.cc +++ b/libstdc++-v3/testsuite/25_algorithms/min_max.cc @@ -19,7 +19,7 @@ // USA. #include <algorithm> -#include <debug_assert.h> +#include <testsuite_hooks.h> void test01() { @@ -44,6 +44,3 @@ int main() test01(); return 0; } - - - diff --git a/libstdc++-v3/testsuite/26_numerics/binary_closure.cc b/libstdc++-v3/testsuite/26_numerics/binary_closure.cc index f670d4ac3c8..7dbcfbd5228 100644 --- a/libstdc++-v3/testsuite/26_numerics/binary_closure.cc +++ b/libstdc++-v3/testsuite/26_numerics/binary_closure.cc @@ -33,4 +33,5 @@ int main() d = (a + 2.0* b ); std::cout << "d[4] = " << d[4] << std::endl; + return 0; } diff --git a/libstdc++-v3/testsuite/26_numerics/buggy_complex.cc b/libstdc++-v3/testsuite/26_numerics/buggy_complex.cc index ebe8e98bdb8..37930fc5b0b 100644 --- a/libstdc++-v3/testsuite/26_numerics/buggy_complex.cc +++ b/libstdc++-v3/testsuite/26_numerics/buggy_complex.cc @@ -34,4 +34,3 @@ int main() return 0; } - diff --git a/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc b/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc new file mode 100644 index 00000000000..132cebf5ab7 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc @@ -0,0 +1,91 @@ +// 2001-04-06 gdr + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// { dg-do compile } + +#include <cmath> + +void fpclassify() { } + +void isfinite() { } + +void isinf() { } + +void isnan() { } + +void isnormal() { } + +void signbit() { } + +void isgreater() { } + +void isgreaterequal() { } + +void isless() { } + +void islessequal() { } + +void islessgreater() { } + +void isunordered() { } + +#if _GLIBCPP_USE_C99 +template <typename _Tp> + void test_c99_classify() + { + bool test = true; + + typedef _Tp fp_type; + fp_type f1 = 1.0; + fp_type f2 = 3.0; + int res = 0; + + res = std::fpclassify(f1); + res = std::isfinite(f2); + res = std::isinf(f1); + res = std::isnan(f2); + res = std::isnormal(f1); + res = std::signbit(f2); + res = std::isgreater(f1, f2); + res = std::isgreaterequal(f1, f2); + res = std::isless(f1, f2); + res = std::islessequal(f1,f2); + res = std::islessgreater(f1, f2); + res = std::isunordered(f1, f2); + } +#endif + +int main() +{ +#if _GLIBCPP_USE_C99 + test_c99_classify<float>(); + //test_c99_classify<double>(); +#endif + return 0; +} diff --git a/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c.cc b/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c.cc new file mode 100644 index 00000000000..fdd424426cb --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c.cc @@ -0,0 +1,58 @@ +// 2001-04-06 gdr + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// { dg-do compile } +// { dg-excess-errors "" } + +#include <math.h> + +void fpclassify() { } // { dg-error "parse error" "" { xfail *-*-* } } + +void isfinite() { } + +void isinf() { } + +void isnan() { } + +void isnormal() { } + +void signbit() { } + +void isgreater() { } + +void isgreaterequal() { } + +void isless() { } + +void islessequal() { } + +void islessgreater() { } + +void isunordered() { } + diff --git a/libstdc++-v3/testsuite/26_numerics/c_math.cc b/libstdc++-v3/testsuite/26_numerics/c_math.cc index 119c0d37f0a..f01e4868b44 100644 --- a/libstdc++-v3/testsuite/26_numerics/c_math.cc +++ b/libstdc++-v3/testsuite/26_numerics/c_math.cc @@ -20,7 +20,7 @@ // USA. #include <cmath> -#include <debug_assert.h> +#include <testsuite_hooks.h> // test compilation. int @@ -69,4 +69,3 @@ main() test04(); return 0; } - diff --git a/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc b/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc index e195651160f..8161ee1aeb5 100644 --- a/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc +++ b/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc @@ -24,7 +24,7 @@ #include <string> #include <sstream> #include <complex> -#include <debug_assert.h> +#include <testsuite_hooks.h> #include <cmath> template<typename R> @@ -88,12 +88,58 @@ testall() return 0; } +// libstdc++/2970 +void test01() +{ + using namespace std; + bool test = true; + + complex<float> cf01(-1.1, -333.2); + stringstream ss; + ss << cf01; + string str = ss.str(); + VERIFY( str == "(-1.1,-333.2)" ); +} + +// libstdc++/2985 +struct gnu_char_traits : public std::char_traits<char> +{ }; + +typedef std::basic_ostringstream<char, gnu_char_traits> gnu_sstream; + +void test02() +{ + bool test = true; + + // Construct locale with specialized facets. + typedef gnu_sstream::__numput_type numput_type; + typedef gnu_sstream::__numget_type numget_type; + std::locale loc_c = std::locale::classic(); + std::locale loc_1(loc_c, new numput_type); + std::locale loc_2(loc_1, new numget_type); + VERIFY( std::has_facet<numput_type>(loc_2) ); + VERIFY( std::has_facet<numget_type>(loc_2) ); + + gnu_sstream sstr; + std::basic_ios<char, gnu_char_traits>* pios = &sstr; + sstr.imbue(loc_2); + + + std::complex<double> x(3, 4); + sstr << x; + VERIFY( sstr.str() == "(3,4)" ); +} + int main() { testall<float>(); testall<double>(); testall<long double>(); + + test01(); + test02(); + return 0; } diff --git a/libstdc++-v3/testsuite/26_numerics/complex_value.cc b/libstdc++-v3/testsuite/26_numerics/complex_value.cc index c6105c36f6d..99f477a5fa1 100644 --- a/libstdc++-v3/testsuite/26_numerics/complex_value.cc +++ b/libstdc++-v3/testsuite/26_numerics/complex_value.cc @@ -20,7 +20,7 @@ // USA. #include <complex> -#include <debug_assert.h> +#include <testsuite_hooks.h> void test01() { diff --git a/libstdc++-v3/testsuite/26_numerics/fabs_inline.cc b/libstdc++-v3/testsuite/26_numerics/fabs_inline.cc new file mode 100644 index 00000000000..bb84a5809f3 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/fabs_inline.cc @@ -0,0 +1,37 @@ +// Copyright (C) 1999 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// Test to see whether the host provides its own (inline) view of fabs. +// Origin: Kurt Garloff <kurt@garloff.de>, 2001-05-24 +// dg-do link + +#include <cmath> +#include <cstdio> + +typedef double (*realfn) (double); + +using std::fabs; + +int main () +{ + double a = fabs (-2.4); + realfn myfn = fabs; + double b = myfn (-2.5); + printf ("%f, %f, %p\n", a, b, myfn); + return 0; +} diff --git a/libstdc++-v3/testsuite/26_numerics/valarray.cc b/libstdc++-v3/testsuite/26_numerics/valarray.cc index 8702198ca35..f2348f018ab 100644 --- a/libstdc++-v3/testsuite/26_numerics/valarray.cc +++ b/libstdc++-v3/testsuite/26_numerics/valarray.cc @@ -41,6 +41,3 @@ int main() return 0; } - - - diff --git a/libstdc++-v3/testsuite/26_numerics/valarray_const_bracket.cc b/libstdc++-v3/testsuite/26_numerics/valarray_const_bracket.cc new file mode 100644 index 00000000000..53819f43ad1 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/valarray_const_bracket.cc @@ -0,0 +1,48 @@ +// 20010518 gdr + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#include <valarray> + +// dg-do compile + +template<typename P> + void copy(P, std::size_t) { } + +template<typename T> + void test(const std::valarray<T>& v) + { + copy(&v[0], v.size()); + } + +int main() +{ + std::valarray<double> v(190); + test(v); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/filebuf.cc b/libstdc++-v3/testsuite/27_io/filebuf.cc index 4cfd9277b57..87410d01e6d 100644 --- a/libstdc++-v3/testsuite/27_io/filebuf.cc +++ b/libstdc++-v3/testsuite/27_io/filebuf.cc @@ -1,6 +1,6 @@ // 990117 bkoz test functionality of basic_filebuf for char_type == char -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 1997-1999, 2000, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -26,7 +26,7 @@ // @diff@ %-*.tst %*.txt #include <fstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> const char carray_01[] = "santa cruz or sandiego?"; const char carray_02[] = "memphis, new orleans, and savanah"; @@ -524,6 +524,53 @@ bool test04() return test; } +// test05 +// libstdc++/1886 +// should be able to instantiate basic_filebuf for non-standard types. +template class std::basic_filebuf<short, std::char_traits<short> >; + +// test06 +// libstdc++/2020 +// should be able to use custom char_type +class gnu_char_type +{ + unsigned long character; +public: + // operator == + bool + operator==(const gnu_char_type& __lhs) + { return character == __lhs.character; } + + // operator < + bool + operator<(const gnu_char_type& __lhs) + { return character < __lhs.character; } + + // default ctor + gnu_char_type() { } + + // to_char_type + gnu_char_type(const unsigned long& __l) : character(__l) { } + + // to_int_type + operator unsigned long() const { return character; } +}; + +bool test06() +{ + bool test = true; + typedef std::basic_filebuf<gnu_char_type> gnu_filebuf; + + try + { gnu_filebuf obj; } + catch(std::exception& obj) + { + test = false; + VERIFY( test ); + } + return test; +} + int main() { test00(); @@ -532,19 +579,10 @@ int main() test03(); test04(); + test06(); return 0; } // more surf!!! - - - - - - - - - - diff --git a/libstdc++-v3/testsuite/27_io/filebuf_members.cc b/libstdc++-v3/testsuite/27_io/filebuf_members.cc index 3b028a5221a..4d61ec10a23 100644 --- a/libstdc++-v3/testsuite/27_io/filebuf_members.cc +++ b/libstdc++-v3/testsuite/27_io/filebuf_members.cc @@ -27,7 +27,7 @@ #include <cassert> #include <unistd.h> #include <fcntl.h> -#include <debug_assert.h> +#include <testsuite_hooks.h> // verify that std::filebuf doesn't close files that it didn't open // when using the following std::filebuf ctor: @@ -49,28 +49,24 @@ test_01() int close_num; // read (ext) - int fd = open(name_01, O_RDONLY); - VERIFY( fd >= 0 ); - + FILE* f2 = fopen(name_01, "r"); + VERIFY( f2 != NULL ); { - std::filebuf fb(fd, "double_read", std::ios_base::in); + std::filebuf fb(f2, std::ios_base::in, 512); } - - close_num = close(fd); + close_num = fclose(f2); VERIFY( close_num == 0 ); // read (standard) FILE* f = fopen(name_01, "r"); VERIFY( f != NULL ); - { std::ifstream ifstream1(name_01); VERIFY( ifstream1.is_open() ); std::ios_base::iostate st01 = ifstream1.rdstate(); VERIFY( st01 == std::ios_base::goodbit ); } - close_num = fclose(f); VERIFY( close_num == 0 ); @@ -89,7 +85,3 @@ main() test_01(); return 0; } - - - - diff --git a/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc b/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc new file mode 100644 index 00000000000..2b72f56e51e --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc @@ -0,0 +1,62 @@ +// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.8.1.4 Overridden virtual functions + +#include <fstream> +#include <testsuite_hooks.h> + +void test01() +{ + using namespace std; + + bool test = true; + char buf[512]; + const char* strlit = "how to tell a story and other essays: mark twain"; + const size_t strlitsize = strlen(strlit); + filebuf fbuf01; + + fbuf01.pubsetbuf(buf, 512); + fbuf01.sputn(strlit, strlitsize); + VERIFY( strncmp(strlit, buf, strlitsize) != 0 ); +} + +void test02() +{ + using namespace std; + + bool test = true; + char buf[512]; + const char* strlit = "how to tell a story and other essays: mark twain"; + const size_t strlitsize = strlen(strlit); + filebuf fbuf01; + fbuf01.open("tmp", ios_base::out); + + fbuf01.pubsetbuf(buf, strlitsize); + fbuf01.sputn(strlit, strlitsize); + VERIFY( strncmp(strlit, buf, strlitsize) == 0 ); +} + +main() +{ + test01(); + test02(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/fpos.cc b/libstdc++-v3/testsuite/27_io/fpos.cc index ef290bc5d8a..2f52fd3c65e 100644 --- a/libstdc++-v3/testsuite/27_io/fpos.cc +++ b/libstdc++-v3/testsuite/27_io/fpos.cc @@ -1,6 +1,6 @@ // 1999-09-20 bkoz -// Copyright (C) 1999 Free Software Foundation, Inc. +// Copyright (C) 1999, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -31,7 +31,7 @@ #include <cwchar> // for mbstate_t #include <ios> -#include <debug_assert.h> +#include <testsuite_hooks.h> void test01() { @@ -107,12 +107,18 @@ void test02() pos03 = pos03 + off02; pos04 += off02; VERIFY( pos03 == pos04 ); + std::streampos pos05 = pos03; + std::streampos pos06 = pos03 + off02; + VERIFY ( pos05 == pos03 ); // q = p - o // p -= o pos03 = pos03 - off02; pos04 -= off02; VERIFY( pos03 == pos04 ); + std::streampos pos07 = pos03; + std::streampos pos08 = pos03 - off02; + VERIFY ( pos07 == pos03 ); // o = p - q VERIFY( 0 == pos03 - pos04 ); @@ -171,7 +177,3 @@ int main() { test03(); return 0; } - - - - diff --git a/libstdc++-v3/testsuite/27_io/fstream_members.cc b/libstdc++-v3/testsuite/27_io/fstream_members.cc new file mode 100644 index 00000000000..136252b8efb --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/fstream_members.cc @@ -0,0 +1,70 @@ +// 2001-05-24 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.8.1.13 member functions (fstream_members) + +#include <fstream> +#include <testsuite_hooks.h> + +void +redirect_buffer(std::ios& stream, std::streambuf* new_buf) +{ stream.rdbuf(new_buf); } + +std::streambuf* +active_buffer(std::ios& stream) +{ return stream.rdbuf(); } + +// libstdc++/2832 +void test02() +{ + bool test = true; + const char* strlit01 = "fuck war"; + const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; + const std::string str00; + const std::string str01(strlit01); + std::string str02; + std::filebuf fbuf; + std::streambuf* pbasebuf0 = &fbuf; + + std::fstream sstrm1; + // derived rdbuf() always returns original streambuf, even though + // it's no longer associated with the stream. + std::filebuf* const buf1 = sstrm1.rdbuf(); + // base rdbuf() returns the currently associated streambuf + std::streambuf* pbasebuf1 = active_buffer(sstrm1); + redirect_buffer(sstrm1, &fbuf); + std::filebuf* const buf2 = sstrm1.rdbuf(); + std::streambuf* pbasebuf2 = active_buffer(sstrm1); + VERIFY( buf1 == buf2 ); + VERIFY( pbasebuf1 != pbasebuf2 ); + VERIFY( pbasebuf2 == pbasebuf0 ); + + // How confusing and non-intuitive is this? + // These semantics are a joke, a serious defect, and incredibly lame. +} + +int main() +{ + test02(); + return 0; +} + + + diff --git a/libstdc++-v3/testsuite/27_io/ifstream_members.cc b/libstdc++-v3/testsuite/27_io/ifstream_members.cc index 3fb7a6d1156..ad21fe5c8d1 100644 --- a/libstdc++-v3/testsuite/27_io/ifstream_members.cc +++ b/libstdc++-v3/testsuite/27_io/ifstream_members.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2000 Free Software Foundation, Inc. +// Copyright (C) 2000, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -22,7 +22,7 @@ #include <istream> #include <fstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> const char name_01[] = "ifstream_members-1.tst"; const char name_02[] = "ifstream_members-1.txt"; @@ -73,9 +73,51 @@ bool test01() return test; } +void +redirect_buffer(std::ios& stream, std::streambuf* new_buf) +{ stream.rdbuf(new_buf); } + +std::streambuf* +active_buffer(std::ios& stream) +{ return stream.rdbuf(); } + +// libstdc++/2832 +void test02() +{ + bool test = true; + const char* strlit01 = "fuck war"; + const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; + const std::string str00; + const std::string str01(strlit01); + std::string str02; + std::filebuf fbuf; + std::streambuf* pbasebuf0 = &fbuf; + + std::ifstream sstrm1; + // derived rdbuf() always returns original streambuf, even though + // it's no longer associated with the stream. + std::filebuf* const buf1 = sstrm1.rdbuf(); + // base rdbuf() returns the currently associated streambuf + std::streambuf* pbasebuf1 = active_buffer(sstrm1); + redirect_buffer(sstrm1, &fbuf); + std::filebuf* const buf2 = sstrm1.rdbuf(); + std::streambuf* pbasebuf2 = active_buffer(sstrm1); + VERIFY( buf1 == buf2 ); + VERIFY( pbasebuf1 != pbasebuf2 ); + VERIFY( pbasebuf2 == pbasebuf0 ); + + // How confusing and non-intuitive is this? + // These semantics are a joke, a serious defect, and incredibly lame. +} int main() { test00(); test01(); + + test02(); + return 0; } + + + diff --git a/libstdc++-v3/testsuite/27_io/ios_base_callbacks.cc b/libstdc++-v3/testsuite/27_io/ios_base_callbacks.cc index 298574982db..eeed5f4caf4 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base_callbacks.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base_callbacks.cc @@ -22,7 +22,7 @@ #include <string> #include <sstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> const std::string str01("the nubians of plutonia"); std::string str02; @@ -66,7 +66,3 @@ int main(void) return 0; } - - - - diff --git a/libstdc++-v3/testsuite/27_io/ios_base_members_static.cc b/libstdc++-v3/testsuite/27_io/ios_base_members_static.cc index 8a0db0b395f..1e7df6a295f 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base_members_static.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base_members_static.cc @@ -28,7 +28,7 @@ #include <sstream> #include <iostream> -#include <debug_assert.h> +#include <testsuite_hooks.h> // N.B. Once we have called sync_with_stdio(false), we can never go back. @@ -36,23 +36,19 @@ void test01() { std::ios_base::sync_with_stdio(); - std::freopen("ios_base_members_static-1.txt", "w", stdout); for (int i = 0; i < 2; i++) { std::printf("1"); std::cout << "2"; - std::putc('3', stdout); // std::stdout doesn't work here + std::putc('3', stdout); std::cout << '4'; std::fputs("5", stdout); std::cout << 6; std::putchar('7'); std::cout << 8 << '9'; - if (i) - std::printf ("0\n"); - else - std::cout << "0" << std::endl; + std::printf("0\n"); } } @@ -87,5 +83,3 @@ int main(void) test02(); return 0; } - - diff --git a/libstdc++-v3/testsuite/27_io/ios_base_storage.cc b/libstdc++-v3/testsuite/27_io/ios_base_storage.cc index c116383dc8e..d6b6d983b5f 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base_storage.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base_storage.cc @@ -23,7 +23,7 @@ #include <sstream> #include <iostream> -#include <debug_assert.h> +#include <testsuite_hooks.h> // http://gcc.gnu.org/ml/gcc-bugs/2000-12/msg00413.html void test01() @@ -48,7 +48,3 @@ int main(void) return 0; } - - - - diff --git a/libstdc++-v3/testsuite/27_io/ios_ctor.cc b/libstdc++-v3/testsuite/27_io/ios_ctor.cc index acebb87fe93..5736aebaa35 100644 --- a/libstdc++-v3/testsuite/27_io/ios_ctor.cc +++ b/libstdc++-v3/testsuite/27_io/ios_ctor.cc @@ -31,7 +31,7 @@ #include <ios> #include <sstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> void test01() { @@ -89,4 +89,3 @@ int main() { test01(); return 0; } - diff --git a/libstdc++-v3/testsuite/27_io/ios_init.cc b/libstdc++-v3/testsuite/27_io/ios_init.cc new file mode 100644 index 00000000000..ef7cdf49586 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/ios_init.cc @@ -0,0 +1,88 @@ +// 2001-06-05 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// 27.4.2.1.6 class ios_base::init + +#include <fstream> +#include <iostream> +#include <testsuite_hooks.h> + +class gnu_filebuf: public std::filebuf +{ + int i; +public: + gnu_filebuf(int j = 1): i(j) { } + ~gnu_filebuf() { --i; } + int get_i() { return i;} +}; + +const int initial = 4; +gnu_filebuf buf(initial); + +// libstdc++/3045, in a vague way. +void test01() +{ + bool test = true; + int k1; + + // 1 normal + k1 = buf.get_i(); + VERIFY( k1 == initial ); + { + std::cout.rdbuf(&buf); + } + k1 = buf.get_i(); + VERIFY( k1 == initial ); + + // 2 syncd off + k1 = buf.get_i(); + VERIFY( k1 == initial ); + { + std::cout.rdbuf(&buf); + std::ios_base::sync_with_stdio(false); // make sure doesn't clobber buf + } + k1 = buf.get_i(); + VERIFY( k1 == initial ); + + // 3 callling init + k1 = buf.get_i(); + VERIFY( k1 == initial ); + { + std::cout.rdbuf(&buf); + std::ios_base::Init make_sure_initialized; + } + k1 = buf.get_i(); + VERIFY( k1 == initial ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/ios_manip_basefield.cc b/libstdc++-v3/testsuite/27_io/ios_manip_basefield.cc index 717bebb322c..2a3df628873 100644 --- a/libstdc++-v3/testsuite/27_io/ios_manip_basefield.cc +++ b/libstdc++-v3/testsuite/27_io/ios_manip_basefield.cc @@ -31,7 +31,7 @@ #include <sstream> #include <locale> #include <iomanip> -#include <debug_assert.h> +#include <testsuite_hooks.h> struct MyNP : std::numpunct<char> { diff --git a/libstdc++-v3/testsuite/27_io/ios_manip_fmtflags.cc b/libstdc++-v3/testsuite/27_io/ios_manip_fmtflags.cc index 4dcf748f019..5fe1194c481 100644 --- a/libstdc++-v3/testsuite/27_io/ios_manip_fmtflags.cc +++ b/libstdc++-v3/testsuite/27_io/ios_manip_fmtflags.cc @@ -31,7 +31,7 @@ #include <sstream> #include <locale> #include <iomanip> -#include <debug_assert.h> +#include <testsuite_hooks.h> struct MyNP : std::numpunct<char> { diff --git a/libstdc++-v3/testsuite/27_io/ios_members.cc b/libstdc++-v3/testsuite/27_io/ios_members.cc index b096d42cf4e..df00c6a4ce5 100644 --- a/libstdc++-v3/testsuite/27_io/ios_members.cc +++ b/libstdc++-v3/testsuite/27_io/ios_members.cc @@ -31,7 +31,7 @@ #include <ios> // NB: Don't include any other headers in this file. -#include <debug_assert.h> +#include <testsuite_hooks.h> void test01() { @@ -146,5 +146,3 @@ int main() { test02(); return 0; } - - diff --git a/libstdc++-v3/testsuite/27_io/istream.cc b/libstdc++-v3/testsuite/27_io/istream.cc index 0eaa3e0bb8d..c43aebdeb23 100644 --- a/libstdc++-v3/testsuite/27_io/istream.cc +++ b/libstdc++-v3/testsuite/27_io/istream.cc @@ -55,5 +55,3 @@ namespace test { int main() { return 0; } - - diff --git a/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc b/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc index 635e1711ce5..6873dbeee8c 100644 --- a/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc +++ b/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc @@ -25,7 +25,7 @@ #include <ostream> #include <sstream> #include <locale> -#include <debug_assert.h> +#include <testsuite_hooks.h> std::string str_01; std::string str_02("true false 0 1 110001"); @@ -513,6 +513,84 @@ bool test11() return test; } +// libstdc++/3720 +// excess input should not cause a core dump +template<typename T> +bool test12_aux(bool integer_type) +{ + bool test = true; + + int digits_overflow; + if (integer_type) + // This many digits will overflow integer types in base 10. + digits_overflow = std::numeric_limits<T>::digits10 + 1; + else + // This might do it, unsure. + digits_overflow = std::numeric_limits<T>::max_exponent10 + 1; + + std::string st; + std::string part = "1234567890123456789012345678901234567890"; + for (int i = 0; i < digits_overflow / part.size() + 1; ++i) + st += part; + std::stringbuf sb(st); + std::istream is(&sb); + T t; + is >> t; + VERIFY(is.fail()); + return test; +} + +bool test12() +{ + bool test = true; + VERIFY(test12_aux<short>(true)); + VERIFY(test12_aux<int>(true)); + VERIFY(test12_aux<long>(true)); + VERIFY(test12_aux<float>(false)); + VERIFY(test12_aux<double>(false)); + VERIFY(test12_aux<long double>(false)); + return test; +} + +// libstdc++/3720 part two +void test13() +{ + using namespace std; + bool test = true; + const char* l1 = "12345678901234567890123456789012345678901234567890123456"; + const char* l2 = "1.2345678901234567890123456789012345678901234567890123456" + " " + "1246.9"; + + // 1 + // used to core. + double d; + istringstream iss1(l2); + iss1 >> d; + // XXX doesn't work on 3.0 branch + // iss1 >> d; + // VERIFY (d > 1246 && d < 1247); + + // 2 + // quick test for failbit on maximum length extraction. + int i; + int max_digits = numeric_limits<int>::digits10; + string digits; + for (int j = 0; j < max_digits; ++j) + digits += '1'; + istringstream iss2(digits); + iss2 >> i; + VERIFY( !iss2.fail() ); + + digits += '1'; + i = 0; + iss2.str(digits); + iss2.clear(); + iss2 >> i; + VERIFY( i == 0 ); + VERIFY( iss2.fail() ); +} + int main() { test01(); @@ -526,24 +604,9 @@ int main() test10(); test11(); + test12(); + test13(); return 0; } - - - - // paul miller was right on with riddim warfare! - - - - - - - - - - - - - diff --git a/libstdc++-v3/testsuite/27_io/istream_extractor_char.cc b/libstdc++-v3/testsuite/27_io/istream_extractor_char.cc index f70d4fb9492..87ab77d88a0 100644 --- a/libstdc++-v3/testsuite/27_io/istream_extractor_char.cc +++ b/libstdc++-v3/testsuite/27_io/istream_extractor_char.cc @@ -22,7 +22,7 @@ #include <istream> #include <sstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01() { @@ -227,4 +227,3 @@ int main() return 0; } - diff --git a/libstdc++-v3/testsuite/27_io/istream_extractor_other.cc b/libstdc++-v3/testsuite/27_io/istream_extractor_other.cc index 2bd878fabce..fbf8f4293c6 100644 --- a/libstdc++-v3/testsuite/27_io/istream_extractor_other.cc +++ b/libstdc++-v3/testsuite/27_io/istream_extractor_other.cc @@ -1,6 +1,6 @@ // 1999-07-28 bkoz -// Copyright (C) 1999 Free Software Foundation +// Copyright (C) 1999, 2001 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -25,7 +25,7 @@ #include <istream> #include <sstream> #include <fstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> // stringbufs. @@ -55,14 +55,6 @@ bool test01() { statefail = std::ios_base::failbit; stateeof = std::ios_base::eofbit; - // template<_CharT, _Traits> - // basic_istream& operator>>(basic_istream& (*pf) (basic_istream&)) - - // template<_CharT, _Traits> - // basic_istream& operator>>(basic_ios& (*pf) (basic_ios&)) - - // template<_CharT, _Traits> - // basic_istream& operator>>(ios_base& (*pf) (ios_base&)) // template<_CharT, _Traits> // basic_istream& operator>>(basic_streambuf*) @@ -136,9 +128,9 @@ bool test01() { state1 = is_04.rdstate(); is_04 >> &isbuf_03; state2 = is_04.rdstate(); - VERIFY( state1 != state2 ); + VERIFY( state1 == state2 ); VERIFY( !static_cast<bool>(state2 & statefail) ); - VERIFY( state2 == stateeof ); + VERIFY( state2 != stateeof ); strtmp = isbuf_03.str(); VERIFY( strtmp == str_02 ); // as only an "in" buffer VERIFY( isbuf_03.sgetc() == 'a' ); @@ -184,14 +176,33 @@ bool test02() { return test; } -int main() +void test03() { - test01(); - test02(); - return 0; -} + using namespace std; + bool test = true; + // template<_CharT, _Traits> + // basic_istream& operator>>(ios_base& (*pf) (ios_base&)) + { + int i = 0; + std::istringstream iss(" 43"); + iss >> std::noskipws >> i; + std::ios::iostate i3 = iss.rdstate(); + VERIFY ( !iss ); //should set failbit + } + // template<_CharT, _Traits> + // basic_istream& operator>>(basic_ios& (*pf) (basic_ios&)) + // template<_CharT, _Traits> + // basic_istream& operator>>(basic_istream& (*pf) (basic_istream&)) +} +int main() +{ + test01(); + test02(); + test03(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/istream_manip.cc b/libstdc++-v3/testsuite/27_io/istream_manip.cc index ba3826c79bb..75eb79f135a 100644 --- a/libstdc++-v3/testsuite/27_io/istream_manip.cc +++ b/libstdc++-v3/testsuite/27_io/istream_manip.cc @@ -23,7 +23,7 @@ #include <istream> #include <sstream> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01(void) { @@ -70,7 +70,7 @@ bool test01(void) VERIFY( !iss02.eof() ); iss01 >> std::ws; - VERIFY( iss01.fail() ); + VERIFY( !iss01.fail() ); VERIFY( iss01.eof() ); #ifdef DEBUG_ASSERT @@ -83,9 +83,5 @@ bool test01(void) int main() { test01(); + return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/27_io/istream_seeks-1.tst b/libstdc++-v3/testsuite/27_io/istream_seeks-1.tst new file mode 100644 index 00000000000..5d9eafa2a36 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/istream_seeks-1.tst @@ -0,0 +1,7 @@ +bd2 +456x +9mzuv>?@ABCDEFGHIJKLMNOPQRSTUVWXYZracadabras, i wannaz +because because +because. . +of the wonderful things he does!! +ok
\ No newline at end of file diff --git a/libstdc++-v3/testsuite/27_io/istream_seeks-1.txt b/libstdc++-v3/testsuite/27_io/istream_seeks-1.txt new file mode 100644 index 00000000000..5d9eafa2a36 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/istream_seeks-1.txt @@ -0,0 +1,7 @@ +bd2 +456x +9mzuv>?@ABCDEFGHIJKLMNOPQRSTUVWXYZracadabras, i wannaz +because because +because. . +of the wonderful things he does!! +ok
\ No newline at end of file diff --git a/libstdc++-v3/testsuite/27_io/istream_unformatted-2.tst b/libstdc++-v3/testsuite/27_io/istream_seeks-2.tst index e69de29bb2d..e69de29bb2d 100644 --- a/libstdc++-v3/testsuite/27_io/istream_unformatted-2.tst +++ b/libstdc++-v3/testsuite/27_io/istream_seeks-2.tst diff --git a/libstdc++-v3/testsuite/27_io/istream_seeks-3.tst b/libstdc++-v3/testsuite/27_io/istream_seeks-3.tst new file mode 100644 index 00000000000..dc45fc9330a --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/istream_seeks-3.tst @@ -0,0 +1,10 @@ +0-0 lootpack, peanut butter wolf, rob swift, madlib, quasimoto +0-1 lootpack, peanut butter wolf, rob swift, madlib, quasimoto +0-2 lootpack, peanut butter wolf, rob swift, madlib, quasimoto +0-3 lootpack, peanut butter wolf, rob swift, madlib, quasimoto +0-4 lootpack, peanut butter wolf, rob swift, madlib, quasimoto +0-5 lootpack, peanut butter wolf, rob swift, madlib, quasimoto +0-6 lootpack, peanut butter wolf, rob swift, madlib, quasimoto +0-7 lootpack, peanut butter wolf, rob swift, madlib, quasimoto +0-8 lootpack, peanut butter wolf, rob swift, madlib, quasimoto +0-9 lootpack, peanut butter wolf, rob swift, madlib, quasimoto diff --git a/libstdc++-v3/testsuite/27_io/istream_seeks.cc b/libstdc++-v3/testsuite/27_io/istream_seeks.cc index d5fad458af0..dac5f3cf9eb 100644 --- a/libstdc++-v3/testsuite/27_io/istream_seeks.cc +++ b/libstdc++-v3/testsuite/27_io/istream_seeks.cc @@ -1,6 +1,6 @@ // 2000-06-29 bkoz -// Copyright (C) 2000 Free Software Foundation +// Copyright (C) 2000, 2001 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -20,12 +20,13 @@ // 27.6.1.3 unformatted input functions // NB: ostream has a particular "seeks" category. Adopt this for istreams too. +// @require@ %-*.tst %-*.txt +// @diff@ %-*.tst %-*.txt #include <istream> #include <sstream> #include <fstream> -#include <debug_assert.h> - +#include <testsuite_hooks.h> bool test01() { @@ -33,7 +34,7 @@ bool test01() typedef ios::pos_type pos_type; bool test = true; - const char str_lit01[] = "istream_unformatted-1.tst"; + const char str_lit01[] = "istream_seeks-1.tst"; // in // test default ctors leave things in the same positions... @@ -62,14 +63,81 @@ bool test01() return test; } +const char* s = " lootpack, peanut butter wolf, rob swift, madlib, quasimoto"; +const int times = 10; + +void write_rewind(std::iostream& stream) +{ + for (int j = 0; j < times; j++) + { + bool test = true; + std::streampos begin = stream.tellg(); + + for (int i = 0; i < times; ++i) + stream << j << '-' << i << s << '\n'; + + stream.seekg(begin); + std::streampos end = stream.tellg(); + std::streampos badpos = std::streampos(std::streambuf::off_type(-1)); + } +} + +void check_contents(std::iostream& stream) +{ + bool test = true; + + stream.clear(); + stream.seekg(0, std::ios::beg); + int i = 0; + int loop = times * times + 2; + while (i < loop) + { + stream.ignore(80, '\n'); + if (stream.good()) + ++i; + else + break; + } + VERIFY( i == times ); +} + +// fstream +// libstdc++/2346 +void test02() +{ + std::fstream ofstrm; + ofstrm.open("istream_seeks-3.txt", std::ios::out); + if (!ofstrm) + abort(); + write_rewind(ofstrm); + ofstrm.close(); + + std::fstream ifstrm; + ifstrm.open("istream_seeks-3.txt", std::ios::in); + check_contents(ifstrm); + ifstrm.close(); +} + +// stringstream +// libstdc++/2346 +void test03() +{ + std::stringstream sstrm; + + write_rewind(sstrm); + check_contents(sstrm); +} + // fstreams void test04(void) { + typedef std::istream::off_type off_type; + bool test = true; std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06; std::ios_base::iostate state01, state02; - const char str_lit01[] = "istream_unformatted-1.txt"; - const char str_lit02[] = "istream_unformatted-2.txt"; + const char str_lit01[] = "istream_seeks-1.txt"; + const char str_lit02[] = "istream_seeks-2.txt"; std::ifstream if01(str_lit01, std::ios_base::in | std::ios_base::out); std::ifstream if02(str_lit01, std::ios_base::in); std::ifstream if03(str_lit02, std::ios_base::out | std::ios_base::trunc); @@ -112,7 +180,7 @@ void test04(void) is01.seekg(10, std::ios_base::cur); state02 = is01.rdstate(); pos01 = is01.tellg(); - VERIFY( pos01 == pos02 + 10 ); + VERIFY( pos01 == pos02 + off_type(10) ); VERIFY( state01 == state02 ); pos02 = is01.tellg(); VERIFY( pos02 == pos01 ); @@ -121,7 +189,7 @@ void test04(void) is02.seekg(10, std::ios_base::cur); state02 = is02.rdstate(); pos03 = is02.tellg(); - VERIFY( pos03 == pos04 + 10 ); + VERIFY( pos03 == pos04 + off_type(10) ); VERIFY( state01 == state02 ); pos04 = is02.tellg(); VERIFY( pos03 == pos04 ); @@ -130,7 +198,7 @@ void test04(void) is03.seekg(10, std::ios_base::cur); state02 = is03.rdstate(); pos05 = is03.tellg(); - VERIFY( pos05 == pos06 + 10 ); + VERIFY( pos05 == pos06 + off_type(10) ); VERIFY( state01 == state02 ); pos06 = is03.tellg(); VERIFY( pos05 == pos06 ); @@ -140,7 +208,7 @@ void test04(void) is01.seekg(20, std::ios_base::beg); state02 = is01.rdstate(); pos01 = is01.tellg(); - VERIFY( pos01 == pos02 + 10 ); + VERIFY( pos01 == pos02 + off_type(10) ); VERIFY( state01 == state02 ); pos02 = is01.tellg(); VERIFY( pos02 == pos01 ); @@ -149,7 +217,7 @@ void test04(void) is02.seekg(20, std::ios_base::beg); state02 = is02.rdstate(); pos03 = is02.tellg(); - VERIFY( pos03 == pos04 + 10 ); + VERIFY( pos03 == pos04 + off_type(10) ); VERIFY( state01 == state02 ); pos04 = is02.tellg(); VERIFY( pos03 == pos04 ); @@ -158,7 +226,7 @@ void test04(void) is03.seekg(20, std::ios_base::beg); state02 = is03.rdstate(); pos05 = is03.tellg(); - VERIFY( pos05 == pos06 + 10 ); + VERIFY( pos05 == pos06 + off_type(10) ); VERIFY( state01 == state02 ); pos06 = is03.tellg(); VERIFY( pos05 == pos06 ); @@ -171,10 +239,12 @@ void test04(void) // stringstreams void test05(void) { + typedef std::istream::off_type off_type; + bool test = true; std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06; std::ios_base::iostate state01, state02; - const char str_lit01[] = "istream_unformatted-1.tst"; + const char str_lit01[] = "istream_seeks-1.tst"; std::ifstream if01(str_lit01); std::ifstream if02(str_lit01); std::ifstream if03(str_lit01); @@ -224,7 +294,7 @@ void test05(void) is01.seekg(10, std::ios_base::cur); state02 = is01.rdstate(); pos01 = is01.tellg(); - VERIFY( pos01 == pos02 + 10 ); + VERIFY( pos01 == pos02 + off_type(10) ); VERIFY( state01 == state02 ); pos02 = is01.tellg(); VERIFY( pos02 == pos01 ); @@ -233,7 +303,7 @@ void test05(void) is02.seekg(10, std::ios_base::cur); state02 = is02.rdstate(); pos03 = is02.tellg(); - VERIFY( pos03 == pos04 + 10 ); + VERIFY( pos03 == pos04 + off_type(10) ); VERIFY( state01 == state02 ); pos04 = is02.tellg(); VERIFY( pos03 == pos04 ); @@ -243,7 +313,7 @@ void test05(void) state02 = is03.rdstate(); pos05 = is03.tellg(); VERIFY( pos05 == pos06 ); // as only out buffer - VERIFY( state01 == state02 ); + VERIFY( state01 != state02 ); pos06 = is03.tellg(); VERIFY( pos05 == pos06 ); @@ -252,7 +322,7 @@ void test05(void) is01.seekg(20, std::ios_base::beg); state02 = is01.rdstate(); pos01 = is01.tellg(); - VERIFY( pos01 == pos02 + 10 ); + VERIFY( pos01 == pos02 + off_type(10) ); VERIFY( state01 == state02 ); pos02 = is01.tellg(); VERIFY( pos02 == pos01 ); @@ -261,7 +331,7 @@ void test05(void) is02.seekg(20, std::ios_base::beg); state02 = is02.rdstate(); pos03 = is02.tellg(); - VERIFY( pos03 == pos04 + 10 ); + VERIFY( pos03 == pos04 + off_type(10) ); VERIFY( state01 == state02 ); pos04 = is02.tellg(); VERIFY( pos03 == pos04 ); @@ -283,15 +353,13 @@ void test05(void) int main() { test01(); + + test02(); + test03(); + test04(); test05(); return 0; } - - - - - - diff --git a/libstdc++-v3/testsuite/27_io/istream_sentry.cc b/libstdc++-v3/testsuite/27_io/istream_sentry.cc index 4b5634d7078..88dcb91df24 100644 --- a/libstdc++-v3/testsuite/27_io/istream_sentry.cc +++ b/libstdc++-v3/testsuite/27_io/istream_sentry.cc @@ -31,7 +31,7 @@ #include <istream> #include <sstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> void test01() { @@ -85,16 +85,3 @@ int main() test02(); return 0; } - - - - - - - - - - - - - diff --git a/libstdc++-v3/testsuite/27_io/istream_unformatted-1.tst b/libstdc++-v3/testsuite/27_io/istream_unformatted-1.tst index 5d9eafa2a36..9b770a55c3a 100644 --- a/libstdc++-v3/testsuite/27_io/istream_unformatted-1.tst +++ b/libstdc++-v3/testsuite/27_io/istream_unformatted-1.tst @@ -1,7 +1,1500 @@ -bd2 -456x -9mzuv>?@ABCDEFGHIJKLMNOPQRSTUVWXYZracadabras, i wannaz -because because -because. . -of the wonderful things he does!! -ok
\ No newline at end of file +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 diff --git a/libstdc++-v3/testsuite/27_io/istream_unformatted-1.txt b/libstdc++-v3/testsuite/27_io/istream_unformatted-1.txt index 5d9eafa2a36..9b770a55c3a 100644 --- a/libstdc++-v3/testsuite/27_io/istream_unformatted-1.txt +++ b/libstdc++-v3/testsuite/27_io/istream_unformatted-1.txt @@ -1,7 +1,1500 @@ -bd2 -456x -9mzuv>?@ABCDEFGHIJKLMNOPQRSTUVWXYZracadabras, i wannaz -because because -because. . -of the wonderful things he does!! -ok
\ No newline at end of file +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 +1234567890 diff --git a/libstdc++-v3/testsuite/27_io/istream_unformatted-3.tst b/libstdc++-v3/testsuite/27_io/istream_unformatted-3.tst deleted file mode 100644 index 9b770a55c3a..00000000000 --- a/libstdc++-v3/testsuite/27_io/istream_unformatted-3.tst +++ /dev/null @@ -1,1500 +0,0 @@ -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 diff --git a/libstdc++-v3/testsuite/27_io/istream_unformatted-3.txt b/libstdc++-v3/testsuite/27_io/istream_unformatted-3.txt deleted file mode 100644 index 9b770a55c3a..00000000000 --- a/libstdc++-v3/testsuite/27_io/istream_unformatted-3.txt +++ /dev/null @@ -1,1500 +0,0 @@ -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 -1234567890 diff --git a/libstdc++-v3/testsuite/27_io/istream_unformatted.cc b/libstdc++-v3/testsuite/27_io/istream_unformatted.cc index 77560a59095..19c2c9242e6 100644 --- a/libstdc++-v3/testsuite/27_io/istream_unformatted.cc +++ b/libstdc++-v3/testsuite/27_io/istream_unformatted.cc @@ -26,7 +26,7 @@ #include <istream> #include <sstream> #include <fstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> int test01() @@ -142,10 +142,13 @@ test02() typedef std::char_traits<char> traits_type; bool test = true; - const char str_lit01[] = " sun*ra - and his myth science arkestra present - angles and demons @ play - the nubians of plutonia"; + const char str_lit01[] = "\t\t\t sun*ra \n" + " " + "and his myth science arkestra present\n" + " " + "angles and demons @ play\n" + " " + "the nubians of plutonia"; std::string str01(str_lit01); std::string strtmp; @@ -200,7 +203,9 @@ test02() VERIFY( is_04.gcount() == 64 ); VERIFY( state1 != state2 ); VERIFY( state2 == statefail ); - VERIFY( !traits_type::compare(" and his myth science arkestra presen", carray1, 65) ); + VERIFY( !traits_type::compare( + " and his myth science arkestra presen", + carray1, 65) ); is_04.clear(); state1 = is_04.rdstate(); @@ -232,9 +237,11 @@ test03() typedef std::char_traits<char> traits_type; bool test = true; - const char str_lit01[] = " sun*ra - & his arkestra, featuring john gilmore: - jazz in silhouette: images and forecasts of tomorrow"; + const char str_lit01[] = + " sun*ra \n\t\t\t & his arkestra, featuring john gilmore: \n" + " " + "jazz in silhouette: images and forecasts of tomorrow"; + std::string str01(str_lit01); std::string strtmp; @@ -357,22 +364,21 @@ test04() int test05() { - const char* charray = " -a -aa -aaa -aaaa -aaaaa -aaaaaa -aaaaaaa -aaaaaaaa -aaaaaaaaa -aaaaaaaaaa -aaaaaaaaaaa -aaaaaaaaaaaa -aaaaaaaaaaaaa -aaaaaaaaaaaaaa -"; + const char* charray = "\n" +"a\n" +"aa\n" +"aaa\n" +"aaaa\n" +"aaaaa\n" +"aaaaaa\n" +"aaaaaaa\n" +"aaaaaaaa\n" +"aaaaaaaaa\n" +"aaaaaaaaaa\n" +"aaaaaaaaaaa\n" +"aaaaaaaaaaaa\n" +"aaaaaaaaaaaaa\n" +"aaaaaaaaaaaaaa\n"; bool test = true; const std::streamsize it = 5; @@ -461,7 +467,7 @@ int test07() { bool test = true; - const char* tfn = "istream_unformatted-3.txt"; + const char* tfn = "istream_unformatted-1.txt"; std::ifstream infile; infile.open(tfn); VERIFY( !(!infile) ); @@ -491,12 +497,3 @@ main() return 0; } - - - - - - - - - diff --git a/libstdc++-v3/testsuite/27_io/istringstream_members.cc b/libstdc++-v3/testsuite/27_io/istringstream_members.cc index e11b6ab5fff..cfc473621a2 100644 --- a/libstdc++-v3/testsuite/27_io/istringstream_members.cc +++ b/libstdc++-v3/testsuite/27_io/istringstream_members.cc @@ -1,6 +1,6 @@ // 2000-01-10 bkoz -// Copyright (C) 2000 Free Software Foundation, Inc. +// Copyright (C) 2000, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -18,19 +18,16 @@ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. -// 27.7.2 template class basic_istringstream // 27.7.2.2 member functions (istringstream_members) -// stringbuf* rdbuf() const - #include <sstream> -#include <debug_assert.h> - +#include <testsuite_hooks.h> void test01() { bool test = true; std::istringstream is01; + const std::string str00; const std::string str01 = "123"; std::string str02; const int i01 = 123; @@ -39,9 +36,15 @@ void test01() std::ios_base::iostate state1, state2, statefail, stateeof; statefail = std::ios_base::failbit; stateeof = std::ios_base::eofbit; - + + // string str() const + str02 = is01.str(); + VERIFY( str00 == str02 ); + // void str(const basic_string&) is01.str(str01); + str02 = is01.str(); + VERIFY( str01 == str02 ); state1 = is01.rdstate(); is01 >> a; state2 = is01.rdstate(); @@ -66,19 +69,63 @@ void test01() VERIFY( state1 != state2 ); VERIFY( state2 == stateeof ); - // string str() const - str02 = is01.str(); - VERIFY( str01 == str02 ); - #ifdef DEBUG_ASSERT assert(test); #endif } +void +redirect_buffer(std::ios& stream, std::streambuf* new_buf) +{ stream.rdbuf(new_buf); } + +std::streambuf* +active_buffer(std::ios& stream) +{ return stream.rdbuf(); } + +// libstdc++/2832 +void test02() +{ + bool test = true; + const char* strlit01 = "fuck war"; + const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; + const std::string str00; + const std::string str01(strlit01); + std::string str02; + std::stringbuf sbuf(str01); + std::streambuf* pbasebuf0 = &sbuf; + + std::istringstream sstrm1; + VERIFY( sstrm1.str() == str00 ); + // derived rdbuf() always returns original streambuf, even though + // it's no longer associated with the stream. + std::stringbuf* const buf1 = sstrm1.rdbuf(); + // base rdbuf() returns the currently associated streambuf + std::streambuf* pbasebuf1 = active_buffer(sstrm1); + redirect_buffer(sstrm1, &sbuf); + std::stringbuf* const buf2 = sstrm1.rdbuf(); + std::streambuf* pbasebuf2 = active_buffer(sstrm1); + VERIFY( buf1 == buf2 ); + VERIFY( pbasebuf1 != pbasebuf2 ); + VERIFY( pbasebuf2 == pbasebuf0 ); + + // derived rdbuf() returns the original buf, so str() doesn't change. + VERIFY( sstrm1.str() != str01 ); + VERIFY( sstrm1.str() == str00 ); + // however, casting the active streambuf to a stringbuf shows what's up: + std::stringbuf* psbuf = dynamic_cast<std::stringbuf*>(pbasebuf2); + str02 = psbuf->str(); + VERIFY( str02 == str01 ); + + // How confusing and non-intuitive is this? + // These semantics are a joke, a serious defect, and incredibly lame. +} + int main() { test01(); + test02(); return 0; } + diff --git a/libstdc++-v3/testsuite/27_io/narrow_stream_objects.cc b/libstdc++-v3/testsuite/27_io/narrow_stream_objects.cc index 3fbe3dda243..c420449ae04 100644 --- a/libstdc++-v3/testsuite/27_io/narrow_stream_objects.cc +++ b/libstdc++-v3/testsuite/27_io/narrow_stream_objects.cc @@ -1,6 +1,6 @@ // 2000-08-02 bkoz -// Copyright (C) 2000 Free Software Foundation, Inc. +// Copyright (C) 2000, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -66,7 +66,7 @@ #include <cstdlib> #include <cstring> #include <ctime> -#include <debug_assert.h> +#include <testsuite_hooks.h> // Include iostream last, just to make is as difficult as possible to // properly initialize the standard iostream objects. @@ -93,11 +93,32 @@ test01() return 0; } +// libstdc++/2523 +void test02() +{ + using namespace std; + int i; + cin >> i; + cout << "i == " << i << endl; +} + +// libstdc++/2523 +void test03() +{ + using namespace std; + ios_base::sync_with_stdio(false); + + int i; + cin >> i; + cout << "i == " << i << endl; +} int main() { test01(); + + // test02(); + // test03(); return 0; } - diff --git a/libstdc++-v3/testsuite/27_io/ofstream_members.cc b/libstdc++-v3/testsuite/27_io/ofstream_members.cc index d965b3efbfc..79c86e13066 100644 --- a/libstdc++-v3/testsuite/27_io/ofstream_members.cc +++ b/libstdc++-v3/testsuite/27_io/ofstream_members.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2000 Free Software Foundation, Inc. +// Copyright (C) 2000, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -22,7 +22,7 @@ #include <ostream> #include <fstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> const char name_01[] = "ofstream_members-1.tst"; const char name_02[] = "ofstream_members-1.txt"; @@ -74,8 +74,51 @@ bool test01() return test; } +void +redirect_buffer(std::ios& stream, std::streambuf* new_buf) +{ stream.rdbuf(new_buf); } + +std::streambuf* +active_buffer(std::ios& stream) +{ return stream.rdbuf(); } + +// libstdc++/2832 +void test02() +{ + bool test = true; + const char* strlit01 = "fuck war"; + const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; + const std::string str00; + const std::string str01(strlit01); + std::string str02; + std::filebuf fbuf; + std::streambuf* pbasebuf0 = &fbuf; + + std::ofstream sstrm1; + // derived rdbuf() always returns original streambuf, even though + // it's no longer associated with the stream. + std::filebuf* const buf1 = sstrm1.rdbuf(); + // base rdbuf() returns the currently associated streambuf + std::streambuf* pbasebuf1 = active_buffer(sstrm1); + redirect_buffer(sstrm1, &fbuf); + std::filebuf* const buf2 = sstrm1.rdbuf(); + std::streambuf* pbasebuf2 = active_buffer(sstrm1); + VERIFY( buf1 == buf2 ); + VERIFY( pbasebuf1 != pbasebuf2 ); + VERIFY( pbasebuf2 == pbasebuf0 ); + + // How confusing and non-intuitive is this? + // These semantics are a joke, a serious defect, and incredibly lame. +} + int main() { test00(); test01(); + + test02(); + return 0; } + + + diff --git a/libstdc++-v3/testsuite/27_io/ostream.cc b/libstdc++-v3/testsuite/27_io/ostream.cc index 33cc3587644..df77421aeaa 100644 --- a/libstdc++-v3/testsuite/27_io/ostream.cc +++ b/libstdc++-v3/testsuite/27_io/ostream.cc @@ -46,4 +46,3 @@ namespace test { int main() { return 0; } - diff --git a/libstdc++-v3/testsuite/27_io/ostream_inserter_arith.cc b/libstdc++-v3/testsuite/27_io/ostream_inserter_arith.cc index f503ad37f61..af45aaafaf5 100644 --- a/libstdc++-v3/testsuite/27_io/ostream_inserter_arith.cc +++ b/libstdc++-v3/testsuite/27_io/ostream_inserter_arith.cc @@ -25,7 +25,7 @@ #include <locale> #include <sstream> #include <limits> -#include <debug_assert.h> +#include <testsuite_hooks.h> using namespace std; @@ -318,13 +318,3 @@ main() #endif return 0; } - - - - - - - - - - diff --git a/libstdc++-v3/testsuite/27_io/ostream_inserter_char.cc b/libstdc++-v3/testsuite/27_io/ostream_inserter_char.cc index 0c7f18915fc..c8a4a73d4f7 100644 --- a/libstdc++-v3/testsuite/27_io/ostream_inserter_char.cc +++ b/libstdc++-v3/testsuite/27_io/ostream_inserter_char.cc @@ -24,7 +24,7 @@ #include <ostream> #include <sstream> #include <fstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> // ofstream bool test01() @@ -266,4 +266,3 @@ int main() test06(); return 0; } - diff --git a/libstdc++-v3/testsuite/27_io/ostream_inserter_other.cc b/libstdc++-v3/testsuite/27_io/ostream_inserter_other.cc index ec3a028e82f..492999dcf8f 100644 --- a/libstdc++-v3/testsuite/27_io/ostream_inserter_other.cc +++ b/libstdc++-v3/testsuite/27_io/ostream_inserter_other.cc @@ -1,7 +1,7 @@ // 1999-08-16 bkoz // 1999-11-01 bkoz -// Copyright (C) 1999, 2000 Free Software Foundation +// Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -26,7 +26,7 @@ #include <ostream> #include <sstream> #include <fstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> const int size = 1000; const char name_01[] = "ostream_inserter_other-1.tst"; @@ -134,13 +134,28 @@ test03(void) return 0; } +// libstdc++/3272 +void test04() +{ + using namespace std; + bool test = true; + istringstream istr("inside betty carter"); + ostringstream ostr; + ostr << istr.rdbuf() << endl; + + if (ostr.rdstate() & ios_base::eofbit) + test = false; + + VERIFY( test ); +} + int main() { test01(); test02(); test03(); + test04(); return 0; } - diff --git a/libstdc++-v3/testsuite/27_io/ostream_manip.cc b/libstdc++-v3/testsuite/27_io/ostream_manip.cc index ec019e7673d..ee75cad964b 100644 --- a/libstdc++-v3/testsuite/27_io/ostream_manip.cc +++ b/libstdc++-v3/testsuite/27_io/ostream_manip.cc @@ -23,7 +23,7 @@ #include <ostream> #include <sstream> #include <stdexcept> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01(void) { @@ -121,9 +121,5 @@ bool test02() int main() { test01(); + return 0; } - - - - - diff --git a/libstdc++-v3/testsuite/27_io/ostream_seeks.cc b/libstdc++-v3/testsuite/27_io/ostream_seeks.cc index df927562a2b..7022a2f594f 100644 --- a/libstdc++-v3/testsuite/27_io/ostream_seeks.cc +++ b/libstdc++-v3/testsuite/27_io/ostream_seeks.cc @@ -23,7 +23,7 @@ #include <ostream> #include <sstream> #include <fstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> bool test01() @@ -292,11 +292,3 @@ int main() // test05(); return 0; } - - - - - - - - diff --git a/libstdc++-v3/testsuite/27_io/ostream_unformatted.cc b/libstdc++-v3/testsuite/27_io/ostream_unformatted.cc index 657aa79f372..a55ac3ca45b 100644 --- a/libstdc++-v3/testsuite/27_io/ostream_unformatted.cc +++ b/libstdc++-v3/testsuite/27_io/ostream_unformatted.cc @@ -20,7 +20,7 @@ #include <sstream> #include <ostream> -#include <debug_assert.h> +#include <testsuite_hooks.h> void test01() @@ -50,4 +50,5 @@ void test01() int main() { test01(); + return 0; } diff --git a/libstdc++-v3/testsuite/27_io/ostringstream_members.cc b/libstdc++-v3/testsuite/27_io/ostringstream_members.cc new file mode 100644 index 00000000000..4e7f861b516 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/ostringstream_members.cc @@ -0,0 +1,105 @@ +// 2001-05-23 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.7.3.2 member functions (ostringstream_members) + +#include <sstream> +#include <testsuite_hooks.h> + +void test01() +{ + bool test = true; + std::ostringstream os01; + const std::string str00; + const std::string str01 = "123"; + std::string str02; + const int i01 = 123; + int a,b; + + std::ios_base::iostate state1, state2, statefail, stateeof; + statefail = std::ios_base::failbit; + stateeof = std::ios_base::eofbit; + + // string str() const + str02 = os01.str(); + VERIFY( str00 == str02 ); + + // void str(const basic_string&) + os01.str(str01); + str02 = os01.str(); + VERIFY( str01 == str02 ); + + #ifdef DEBUG_ASSERT + assert(test); +#endif +} + +void +redirect_buffer(std::ios& stream, std::streambuf* new_buf) +{ stream.rdbuf(new_buf); } + +std::streambuf* +active_buffer(std::ios& stream) +{ return stream.rdbuf(); } + +// libstdc++/2832 +void test02() +{ + bool test = true; + const char* strlit01 = "fuck war"; + const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; + const std::string str00; + const std::string str01(strlit01); + std::string str02; + std::stringbuf sbuf(str01); + std::streambuf* pbasebuf0 = &sbuf; + + std::ostringstream sstrm1; + VERIFY( sstrm1.str() == str00 ); + // derived rdbuf() always returns original streambuf, even though + // it's no longer associated with the stream. + std::stringbuf* const buf1 = sstrm1.rdbuf(); + // base rdbuf() returns the currently associated streambuf + std::streambuf* pbasebuf1 = active_buffer(sstrm1); + redirect_buffer(sstrm1, &sbuf); + std::stringbuf* const buf2 = sstrm1.rdbuf(); + std::streambuf* pbasebuf2 = active_buffer(sstrm1); + VERIFY( buf1 == buf2 ); + VERIFY( pbasebuf1 != pbasebuf2 ); + VERIFY( pbasebuf2 == pbasebuf0 ); + + // derived rdbuf() returns the original buf, so str() doesn't change. + VERIFY( sstrm1.str() != str01 ); + VERIFY( sstrm1.str() == str00 ); + // however, casting the active streambuf to a stringbuf shows what's up: + std::stringbuf* psbuf = dynamic_cast<std::stringbuf*>(pbasebuf2); + str02 = psbuf->str(); + VERIFY( str02 == str01 ); + + // How confusing and non-intuitive is this? + // These semantics are a joke, a serious defect, and incredibly lame. +} + +int main() +{ + test01(); + test02(); + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/streambuf.cc b/libstdc++-v3/testsuite/27_io/streambuf.cc index 4aaa8958408..b5226108967 100644 --- a/libstdc++-v3/testsuite/27_io/streambuf.cc +++ b/libstdc++-v3/testsuite/27_io/streambuf.cc @@ -33,7 +33,7 @@ #include <streambuf> #include <string> #include <ostream> -#include <debug_assert.h> +#include <testsuite_hooks.h> class testbuf : public std::streambuf { @@ -326,6 +326,17 @@ void test05() nsp.sputc('a'); } +// test06 +// XXX this should work, doesn't due to compiler limitations. +#if 0 +namespace gnu +{ + class something_derived; +} + +class gnu::something_derived : std::streambuf { }; +#endif + int main() { test01(); @@ -336,16 +347,3 @@ int main() test05(); return 0; } - - - - - - - - - - - - - diff --git a/libstdc++-v3/testsuite/27_io/stringbuf.cc b/libstdc++-v3/testsuite/27_io/stringbuf.cc index 556b0c09303..540f0af2735 100644 --- a/libstdc++-v3/testsuite/27_io/stringbuf.cc +++ b/libstdc++-v3/testsuite/27_io/stringbuf.cc @@ -1,6 +1,6 @@ // 981208 bkoz test functionality of basic_stringbuf for char_type == char -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 1997-2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -19,7 +19,7 @@ // USA. #include <sstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> std::string str_01("mykonos. . . or what?"); std::string str_02("paris, or sainte-maxime?"); @@ -54,7 +54,6 @@ bool test02() { // test member functions bool test03() { bool test = true; - std::string str_tmp; //stringbuf::str() VERIFY( strb_01.str() == str_01 ); @@ -72,6 +71,18 @@ bool test03() { VERIFY( str_01.length() == d1 ); VERIFY( strb_01.str() == strb_03.str() ); //ditto + // stringbuf::str(string&) and stringbuf::stringbuf(string&), where the + // string in question contains embedded NUL characters. Note that in this + // embedded-NUL situation, the size must be passed to the string ctor. + std::string str_nulls ("eschew \0 obfuscation", 20); // tested in 21_strings + std::stringbuf strb_normal (str_01); + std::stringbuf strb_nulls (str_nulls); + strb_normal.str(str_nulls); // tried using 'strb_01' rather than declaring + // another variable, but then test04 broke! + VERIFY( strb_nulls.in_avail() == str_nulls.size() ); + VERIFY( strb_nulls.str().size() == 20 ); + VERIFY( strb_normal.in_avail() == str_nulls.size() ); + #ifdef DEBUG_ASSERT assert(test); #endif @@ -441,10 +452,3 @@ int main() { // more candy!!! - - - - - - - diff --git a/libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc b/libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc new file mode 100644 index 00000000000..3e660c35a43 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc @@ -0,0 +1,46 @@ +// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.7.1.3 Overridden virtual functions + +#include <sstream> +#include <testsuite_hooks.h> + +void test01() +{ + using namespace std; + + bool test = true; + char buf[512]; + const char* strlit = "how to tell a story and other essays: mark twain"; + const size_t strlitsize = strlen(strlit); + stringbuf sbuf(ios_base::out); + + sbuf.pubsetbuf(buf, strlitsize); + sbuf.sputn(strlit, strlitsize); + VERIFY( strncmp(strlit, buf, strlitsize) != 0 ); +} + +int main() +{ + test01(); + + return 0; +} diff --git a/libstdc++-v3/testsuite/27_io/stringstream.cc b/libstdc++-v3/testsuite/27_io/stringstream.cc index 2a8f97ea3a1..e66e26749b6 100644 --- a/libstdc++-v3/testsuite/27_io/stringstream.cc +++ b/libstdc++-v3/testsuite/27_io/stringstream.cc @@ -28,11 +28,10 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. - #include <vector> #include <string> #include <sstream> -#include <debug_assert.h> +#include <testsuite_hooks.h> // 01: sanity checks for strings, stringbufs std::string @@ -49,8 +48,8 @@ test01() VERIFY( len == 0 ); // Full string sanity check. - std::string str02("these golden days, i spend waiting for you:\n - Betty Carter on Verve with I'm Yours and You're Mine."); + std::string str02("these golden days, i spend waiting for you:\n" + "Betty Carter on Verve with I'm Yours and You're Mine."); __i_start = str02.begin(); __i_end = str02.end(); len = str02.size(); @@ -159,14 +158,3 @@ main() return 0; } - - - - - - - - - - - diff --git a/libstdc++-v3/testsuite/27_io/stringstream_members.cc b/libstdc++-v3/testsuite/27_io/stringstream_members.cc new file mode 100644 index 00000000000..4de7b8c5241 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/stringstream_members.cc @@ -0,0 +1,131 @@ +// 2001-05-24 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 27.7.6 member functions (stringstream_members) + +#include <sstream> +#include <testsuite_hooks.h> + +void test01() +{ + bool test = true; + std::stringstream is01; + const std::string str00; + const std::string str01 = "123"; + std::string str02; + const int i01 = 123; + int a,b; + + std::ios_base::iostate state1, state2, statefail, stateeof; + statefail = std::ios_base::failbit; + stateeof = std::ios_base::eofbit; + + // string str() const + str02 = is01.str(); + VERIFY( str00 == str02 ); + + // void str(const basic_string&) + is01.str(str01); + str02 = is01.str(); + VERIFY( str01 == str02 ); + state1 = is01.rdstate(); + is01 >> a; + state2 = is01.rdstate(); + VERIFY( a = i01 ); + // 22.2.2.1.2 num_get virtual functions + // p 13 + // in any case, if stage 2 processing was terminated by the test for + // in == end then err != ios_base::eofbit is performed. + VERIFY( state1 != state2 ); + VERIFY( state2 == stateeof ); + + is01.str(str01); + is01 >> b; + VERIFY( b != a ); + // as is01.good() is false, istream::sentry blocks extraction. + + is01.clear(); + state1 = is01.rdstate(); + is01 >> b; + state2 = is01.rdstate(); + VERIFY( b == a ); + VERIFY( state1 != state2 ); + VERIFY( state2 == stateeof ); + + #ifdef DEBUG_ASSERT + assert(test); +#endif +} + +void +redirect_buffer(std::ios& stream, std::streambuf* new_buf) +{ stream.rdbuf(new_buf); } + +std::streambuf* +active_buffer(std::ios& stream) +{ return stream.rdbuf(); } + +// libstdc++/2832 +void test02() +{ + bool test = true; + const char* strlit01 = "fuck war"; + const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; + const std::string str00; + const std::string str01(strlit01); + std::string str02; + std::stringbuf sbuf(str01); + std::streambuf* pbasebuf0 = &sbuf; + + std::stringstream sstrm1; + VERIFY( sstrm1.str() == str00 ); + // derived rdbuf() always returns original streambuf, even though + // it's no longer associated with the stream. + std::stringbuf* const buf1 = sstrm1.rdbuf(); + // base rdbuf() returns the currently associated streambuf + std::streambuf* pbasebuf1 = active_buffer(sstrm1); + redirect_buffer(sstrm1, &sbuf); + std::stringbuf* const buf2 = sstrm1.rdbuf(); + std::streambuf* pbasebuf2 = active_buffer(sstrm1); + VERIFY( buf1 == buf2 ); + VERIFY( pbasebuf1 != pbasebuf2 ); + VERIFY( pbasebuf2 == pbasebuf0 ); + + // derived rdbuf() returns the original buf, so str() doesn't change. + VERIFY( sstrm1.str() != str01 ); + VERIFY( sstrm1.str() == str00 ); + // however, casting the active streambuf to a stringbuf shows what's up: + std::stringbuf* psbuf = dynamic_cast<std::stringbuf*>(pbasebuf2); + str02 = psbuf->str(); + VERIFY( str02 == str01 ); + + // How confusing and non-intuitive is this? + // These semantics are a joke, a serious defect, and incredibly lame. +} + +int main() +{ + test01(); + test02(); + return 0; +} + + + diff --git a/libstdc++-v3/testsuite/27_io/wide_stream_objects.cc b/libstdc++-v3/testsuite/27_io/wide_stream_objects.cc index 91cb21be765..022f6eff327 100644 --- a/libstdc++-v3/testsuite/27_io/wide_stream_objects.cc +++ b/libstdc++-v3/testsuite/27_io/wide_stream_objects.cc @@ -71,7 +71,7 @@ #include <cwchar> #include <cwctype> #endif -#include <debug_assert.h> +#include <testsuite_hooks.h> // Include iostream last, just to make is as difficult as possible to // properly initialize the standard iostream objects. diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am index a6a1a78a261..6aecb39485a 100644 --- a/libstdc++-v3/testsuite/Makefile.am +++ b/libstdc++-v3/testsuite/Makefile.am @@ -21,8 +21,17 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ## USA. -AUTOMAKE_OPTIONS = 1.3 cygnus dejagnu +AUTOMAKE_OPTIONS = foreign dejagnu -DEJATOOL = libstdc++ +DEJATOOL = libstdc++-v3 + +EXPECT = `if [ -f @glibcpp_builddir@/../../expect/expect ] ; then \ + echo @glibcpp_builddir@/../../expect/expect ; \ + else echo expect ; fi` + +RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then \ + echo @glibcpp_srcdir@/../dejagnu/runtest ; \ + else echo runtest; fi` + +RUNTESTFLAGS = -RUNTEST = runtest diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in new file mode 100644 index 00000000000..2cdb3687290 --- /dev/null +++ b/libstdc++-v3/testsuite/Makefile.in @@ -0,0 +1,282 @@ +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = @build_alias@ +build_triplet = @build@ +host_alias = @host_alias@ +host_triplet = @host@ +target_alias = @target_alias@ +target_triplet = @target@ +AR = @AR@ +AS = @AS@ +ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@ +BASIC_FILE_H = @BASIC_FILE_H@ +CC = @CC@ +CCODECVT_C = @CCODECVT_C@ +CLOCALE_H = @CLOCALE_H@ +CPP = @CPP@ +CSHADOW_FLAGS = @CSHADOW_FLAGS@ +CSTDIO_H = @CSTDIO_H@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +C_INCLUDE_DIR = @C_INCLUDE_DIR@ +DEBUG_FLAGS = @DEBUG_FLAGS@ +DLLTOOL = @DLLTOOL@ +EXEEXT = @EXEEXT@ +EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ +GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@ +GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@ +LIBIO_INCLUDES = @LIBIO_INCLUDES@ +LIBMATHOBJS = @LIBMATHOBJS@ +LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ +LIBSTRINGOBJS = @LIBSTRINGOBJS@ +LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ +LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@ +LIBTOOL = @LIBTOOL@ +LIMITS_INC_SRCDIR = @LIMITS_INC_SRCDIR@ +LN_S = @LN_S@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@ +OPT_LDFLAGS = @OPT_LDFLAGS@ +OS_INC_SRCDIR = @OS_INC_SRCDIR@ +PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +SECTION_FLAGS = @SECTION_FLAGS@ +SECTION_LDFLAGS = @SECTION_LDFLAGS@ +STRIP = @STRIP@ +TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ +USE_COMPLEX_LONG_DOUBLE = @USE_COMPLEX_LONG_DOUBLE@ +VERSION = @VERSION@ +WARN_FLAGS = @WARN_FLAGS@ +WERROR = @WERROR@ +enable_shared = @enable_shared@ +enable_static = @enable_static@ +glibcpp_CXX = @glibcpp_CXX@ +glibcpp_basedir = @glibcpp_basedir@ +glibcpp_builddir = @glibcpp_builddir@ +glibcpp_prefixdir = @glibcpp_prefixdir@ +glibcpp_srcdir = @glibcpp_srcdir@ +glibcpp_thread_h = @glibcpp_thread_h@ +glibcpp_toolexecdir = @glibcpp_toolexecdir@ +glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@ +gxx_include_dir = @gxx_include_dir@ +ifGNUmake = @ifGNUmake@ +libio_la = @libio_la@ +toplevel_srcdir = @toplevel_srcdir@ + +AUTOMAKE_OPTIONS = foreign dejagnu + +DEJATOOL = libstdc++-v3 + +EXPECT = `if [ -f @glibcpp_builddir@/../../expect/expect ] ; then \ + echo @glibcpp_builddir@/../../expect/expect ; \ + else echo expect ; fi` + + +RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then \ + echo @glibcpp_srcdir@/../dejagnu/runtest ; \ + else echo runtest; fi` + + +RUNTESTFLAGS = +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +DIST_COMMON = README Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --cygnus testsuite/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = testsuite + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir + +check-DEJAGNU: site.exp + srcdir=`cd $(srcdir) && pwd`; export srcdir; \ + EXPECT=$(EXPECT); export EXPECT; \ + if [ -f $(top_builddir)/../expect/expect ]; then \ + TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \ + export TCL_LIBRARY; \ + fi; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi +site.exp: Makefile + @echo 'Making a new site.exp file...' + @test ! -f site.bak || rm -f site.bak + @echo '## these variables are automatically generated by make ##' > $@-t + @echo '# Do not edit here. If you wish to override these values' >> $@-t + @echo '# edit the last section' >> $@-t + @echo 'set tool $(DEJATOOL)' >> $@-t + @echo 'set srcdir $(srcdir)' >> $@-t + @echo 'set objdir' `pwd` >> $@-t + @echo 'set host_alias $(host_alias)' >> $@-t + @echo 'set host_triplet $(host_triplet)' >> $@-t + @echo 'set target_alias $(target_alias)' >> $@-t + @echo 'set target_triplet $(target_triplet)' >> $@-t + @echo 'set build_alias $(build_alias)' >> $@-t + @echo 'set build_triplet $(build_triplet)' >> $@-t + @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t + @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t + @test ! -f site.exp || mv site.exp site.bak + @mv $@-t site.exp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU +check: check-am +installcheck-am: +installcheck: installcheck-am +install-info-am: +install-info: install-info-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-generic clean-am + -rm -f libtool + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: tags distdir check-DEJAGNU info-am info dvi-am dvi check \ +check-am installcheck-am installcheck install-info-am install-info \ +install-exec-am install-exec install-data-am install-data install-am \ +install uninstall-am uninstall all-redirect all-am all installdirs \ +mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libstdc++-v3/testsuite/README b/libstdc++-v3/testsuite/README index c675e58e907..a52cb312a61 100644 --- a/libstdc++-v3/testsuite/README +++ b/libstdc++-v3/testsuite/README @@ -1,14 +1,134 @@ We're in the process of converting the existing testsuite machinery to use the new style DejaGnu framework. Eventually, we'll abandon -../mkcheck.in in favor of this new testsuite framework. +../mkcheck.in in favor of this new testsuite framework. - Basically, a testcase contains dg-keywords (see dg.exp) indicating + +// 1: How to write a testcase +As per the dejagnu instructions, always return 0 from main to indicate +success. + +Basically, a testcase contains dg-keywords (see dg.exp) indicating what to do and what kinds of behaviour are to be expected. New -testcases should be written with the new style DejaGnu framework in mind. +testcases should be written with the new style DejaGnu framework in +mind. + +To ease transition, here is the list of dg-keyword documentation +lifted from dg.exp -- eventually we should improve DejaGnu +documentation, but getting checkin account currently demands Pyrrhic +effort. + +# The currently supported options are: +# +# dg-prms-id N +# set prms_id to N +# +# dg-options "options ..." [{ target selector }] +# specify special options to pass to the tool (eg: compiler) +# +# dg-do do-what-keyword [{ target/xfail selector }] +# `do-what-keyword' is tool specific and is passed unchanged to +# ${tool}-dg-test. An example is gcc where `keyword' can be any of: +# preprocess|compile|assemble|link|run +# and will do one of: produce a .i, produce a .s, produce a .o, +# produce an a.out, or produce an a.out and run it (the default is +# compile). +# +# dg-error regexp comment [{ target/xfail selector } [{.|0|linenum}]] +# indicate an error message <regexp> is expected on this line +# (the test fails if it doesn't occur) +# Linenum=0 for general tool messages (eg: -V arg missing). +# "." means the current line. +# +# dg-warning regexp comment [{ target/xfail selector } [{.|0|linenum}]] +# indicate a warning message <regexp> is expected on this line +# (the test fails if it doesn't occur) +# +# dg-bogus regexp comment [{ target/xfail selector } [{.|0|linenum}]] +# indicate a bogus error message <regexp> use to occur here +# (the test fails if it does occur) +# +# dg-build regexp comment [{ target/xfail selector }] +# indicate the build use to fail for some reason +# (errors covered here include bad assembler generated, tool crashes, +# and link failures) +# (the test fails if it does occur) +# +# dg-excess-errors comment [{ target/xfail selector }] +# indicate excess errors are expected (any line) +# (this should only be used sparingly and temporarily) +# +# dg-output regexp [{ target selector }] +# indicate the expected output of the program is <regexp> +# (there may be multiple occurrences of this, they are concatenated) +# +# dg-final { tcl code } +# add some tcl code to be run at the end +# (there may be multiple occurrences of this, they are concatenated) +# (unbalanced braces must be \-escaped) +# +# "{ target selector }" is a list of expressions that determine whether the +# test succeeds or fails for a particular target, or in some cases whether the +# option applies for a particular target. If the case of `dg-do' it specifies +# whether the testcase is even attempted on the specified target. +# +# The target selector is always optional. The format is one of: +# +# { xfail *-*-* ... } - the test is expected to fail for the given targets +# { target *-*-* ... } - the option only applies to the given targets +# +# At least one target must be specified, use *-*-* for "all targets". +# At present it is not possible to specify both `xfail' and `target'. +# "native" may be used in place of "*-*-*". + +Example 1: Testing compilation only +(to just have a testcase do compile testing, without linking and executing) +// { dg-do compile } + +Example 2: Testing for expected warings on line 36 +// { dg-warning "string literals" "" { xfail *-*-* } 36 + +Example 3: Testing for compilation errors on line 41 +// { dg-do compile } +// { dg-error "no match for" "" { xfail *-*-* } 41 } + +More examples can be found in the libstdc++-v3/testsuite/*/*.cc files. + + +// 2: Test harness notes, invocation, and debugging. +Configuring the dejagnu harness to work with libstdc++-v3 in a cross +compilation environment has been maddening. However, it does work now, +and on a variety of platforms. Including solaris, linux, and cygwin. + +To debug the test harness during runs, try invoking with - The V3 testing framework supports additional keywords for the purpose -of easing the job of writing testcases. All V3-keywords are of the -form @xxx@. Currently supported keywords include: +make check-target-libstdc++-v3 RUNTESTFLAGS="-v" +or +make check-target-libstdc++-v3 RUNTESTFLAGS="-v -v" + +There are two ways to run on a simulator: set up DEJAGNU to point to a +specially crafted site.exp, or pass down --target_board flags. + +Example flags to pass down for various embedded builds are as follows: + +--target=powerpc-eabism (libgloss/sim) +make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=powerpc-sim" + +--target=calmrisc32 (libgloss/sid) +make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=calmrisc32-sid" + +--target=xscale-elf (newlib/sim) +make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=arm-sim" + + +// 3: Future plans, to be done +Shared runs need to be implemented, for targets that support shared libraries. + +Diffing of expected output to standard streams needs to be finished off. + +The V3 testing framework supports, or will eventually support, +additional keywords for the purpose of easing the job of writing +testcases. All V3-keywords are of the form @xxx@. Currently plans +for supported keywords include: @require@ <files> The existence of <files> is essential for the test to complete @@ -26,4 +146,24 @@ form @xxx@. Currently supported keywords include: same length. The test fails if diff returns non-zero a pair of files. --- Gaby +Current testing problems with cygwin-hosted tools: + +There are two known problems which I have not addressed. The first is +that when testing cygwin hosted tools from the unix build dir, it does +the wrong thing building the wrapper program (testglue.c) because host +and target are the same in site.exp (host and target are the same from +the perspective of the target libraries) + +Problem number two is a little more annoying. In order for me to make +v3 testing work on Windows, I had to tell dejagnu to copy over the +debug_assert.h file to the remote host and then set the includes to +-I./. This is how all the other tests like this are done so I didn't +think much of it. However, this had some unfortunate results due to +gcc having a testcase called "limits" and C++ having an include file +called "limits". The gcc "limits" binary was in the temporary dir +when the v3 tests were being built. As a result, the gcc "limits" +binary was being #included rather than the intended one. The only way +to fix this is to go through the testsuites and make sure binaries are +deleted on the remote host when testing is done with them. That is a +lot more work than I want to do so I worked around it by cleaning out +D:\kermit on compsognathus and rerunning tests. diff --git a/libstdc++-v3/testsuite/config/default.exp b/libstdc++-v3/testsuite/config/default.exp index f2a4554ca3a..dbe227be7a6 100644 --- a/libstdc++-v3/testsuite/config/default.exp +++ b/libstdc++-v3/testsuite/config/default.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-gcc@prep.ai.mit.edu +# libstdc++@gcc.gnu.org + +load_lib "standard.exp" -load_lib "dg.exp" diff --git a/libstdc++-v3/testsuite/debug_assert.h b/libstdc++-v3/testsuite/debug_assert.h deleted file mode 100644 index dbd6e984056..00000000000 --- a/libstdc++-v3/testsuite/debug_assert.h +++ /dev/null @@ -1,51 +0,0 @@ -// 20000810 Brent Verner <brent@rcfile.org> -// -// Copyright (C) 2000 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. -// -// -// Purpose: -// This file is included in the various testsuite programs to provide -// #define(able) assert() behavior for debugging/testing. It may be -// a suitable location for other furry woodland creatures as well. -// -// Notes: -// If you find yourself compiling small test progs as much as I -// do, you can move this file to a location your compiler(s) -// will find, and possibly add more cheap debugging stuff... -// - -#ifndef _CPP_DEBUG_ASSERT_H -#define _CPP_DEBUG_ASSERT_H - -#ifdef DEBUG_ASSERT -# include <cassert> -# define VERIFY(fn) assert(fn) - -#else -# define VERIFY(fn) test &= (fn) -// should we define this here to make sure no 'unexpected' failures -// happen, or do we require that it be defined in any scope where -// the VERIFY macro is used??? -// -// static bool test = true; -#endif - - -#endif // _CPP_DEBUG_ASSERT_H - diff --git a/libstdc++-v3/testsuite/ext/headers.cc b/libstdc++-v3/testsuite/ext/headers.cc index d596bf98b96..297674db1c3 100644 --- a/libstdc++-v3/testsuite/ext/headers.cc +++ b/libstdc++-v3/testsuite/ext/headers.cc @@ -1,6 +1,6 @@ // 1999-06-23 bkoz -// Copyright (C) 1999 Free Software Foundation, Inc. +// Copyright (C) 1999, 2001 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -23,11 +23,9 @@ // This should include a list of all headers in the extension // subdirectory that are meant to be directly included. -#include <ext/bvector> #include <ext/hash_map> #include <ext/hash_set> #include <ext/rope> #include <ext/slist> -#include <ext/tree> int main() { } diff --git a/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp b/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp new file mode 100644 index 00000000000..9821c9bb974 --- /dev/null +++ b/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp @@ -0,0 +1,188 @@ +# Copyright (C) 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Define libstdc++-v3 callbacks for dg.exp. + +load_lib dg.exp +load_lib libgloss.exp + +proc libstdc++-v3-copy-files {srcfiles dstdir} { + foreach f $srcfiles { + if { [catch { set symlink [file readlink $f] } x] } then { + file copy -force $f $dstdir + } else { + if { [regexp "^/" "$symlink"] } then { + file copy -force $symlink $dstdir + } else { + set dirname [file dirname $f] + file copy -force $dirname/$symlink $dstdir + } + } + } +} + +proc libstdc++-v3-init { args } { + global srcdir + global outdir + global blddir + global cxx + global includes + global cxxflags + global objdir + global gluefile wrap_flags + global ld_library_path + global tool_root_dir + + set blddir [lookfor_file [get_multilibs] libstdc++-v3] + + # By default, we assume we want to run program images. + global dg-do-what-default + set dg-do-what-default run + + # Copy any required data files. + libstdc++-v3-copy-files [glob -nocomplain "$srcdir/*/*.tst"] $outdir + libstdc++-v3-copy-files [glob -nocomplain "$srcdir/*/*.txt"] $outdir + + # set LD_LIBRARY_PATH so that libgcc_s, libstdc++ binaries can be found. + # locate libgcc.a so we don't need to account for different values of + # SHLIB_EXT on different platforms + set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] + if {$gccdir != ""} { + set gccdir [file dirname $gccdir] + } + + set ld_library_path "." + append ld_library_path ":${gccdir}" + append ld_library_path ":${blddir}/src/.libs" + + # Do a bunch of handstands and backflips for cross compiling and + # finding simulators... + if [is_remote host] { + set header [remote_download host ${blddir}/testsuite/testsuite_hooks.h] + if { $header == "" } { + verbose -log "Unable to download ${blddir}/testsuite/testsuite_hooks.h to host." + return "untested" + } + set cxx [transform "g++"] + set cxxflags "-ggdb3 -DDEBUG_ASSERT" + set includes "-I./" + } else { + # If we find a testsuite_flags file, we're testing in the build dir. + set flags_file "${blddir}/testsuite_flags" + if { [file exists $flags_file] } { + set cxx [exec sh $flags_file --build-cxx] + set cxxflags [exec sh $flags_file --cxxflags] + set includes [exec sh $flags_file --build-includes] + } else { + set cxx [transform "g++"] + set cxxflags "-ggdb3 -DDEBUG_ASSERT" + set includes "-I${srcdir}" + } + } + + if { [target_info needs_status_wrapper]!="" && ![info exists gluefile] } { + set gluefile ${objdir}/testglue.o; + set result [build_wrapper $gluefile]; + if { $result != "" } { + set gluefile [lindex $result 0]; + set wrap_flags [lindex $result 1]; + } else { + unset gluefile + } + } +} + +proc libstdc++-v3-dg-test { prog do_what extra_tool_flags } { + # Set up the compiler flags, based on what we're going to do. + + switch $do_what { + "preprocess" { + set compile_type "preprocess" + set output_file "[file rootname [file tail $prog]].i" + } + "compile" { + set compile_type "assembly" + set output_file "[file rootname [file tail $prog]].s" + } + "assemble" { + set compile_type "object" + set output_file "[file rootname [file tail $prog]].o" + } + "link" { + set compile_type "executable" + set output_file "./[file rootname [file tail $prog]]" + } + "run" { + set compile_type "executable" + # FIXME: "./" is to cope with "." not being in $PATH. + # Should this be handled elsewhere? + # YES. + set output_file "./[file rootname [file tail $prog]]" + # This is the only place where we care if an executable was + # created or not. If it was, dg.exp will try to run it. + remote_file build delete $output_file; + } + default { + perror "$do_what: not a valid dg-do keyword" + return "" + } + } + set options "" + if { $extra_tool_flags != "" } { + lappend options "additional_flags=$extra_tool_flags" + } + + set comp_output [libstdc++-v3_target_compile "$prog" "$output_file" "$compile_type" $options]; + + return [list $comp_output $output_file] +} + + +proc libstdc++-v3_target_compile { source dest type options } { + global gluefile + global wrap_flags + global cxx + global cxxflags + global includes + + if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } { + lappend options "libs=${gluefile}" + lappend options "ldflags=${wrap_flags}" + } + + set cxx_final $cxx + set cxxlibglossflags [libgloss_link_flags] + set cxx_final [concat $cxx_final $cxxlibglossflags] + set cxx_final [concat $cxx_final $cxxflags] + set cxx_final [concat $cxx_final $includes] + + lappend options "compiler=$cxx_final"; + + return [target_compile $source $dest $type $options] +} + +# On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but +# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH +# (for the 64-bit ABI). The right way to do this would be to modify +# unix.exp -- but that's not an option since it's part of DejaGNU +# proper, so we do it here, by trickery. We really only need to do +# this on IRIX, but it shouldn't hurt to do it anywhere else. +proc libstdc++-v3_set_ld_library_path { name element op } { + setenv LD_LIBRARYN32_PATH [getenv LD_LIBRARY_PATH] + setenv LD_LIBRARY64_PATH [getenv LD_LIBRARY_PATH] +} + +trace variable env(LD_LIBRARY_PATH) w libstdc++-v3_set_ld_library_path diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp deleted file mode 100644 index edd104410f5..00000000000 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ /dev/null @@ -1,304 +0,0 @@ -# Copyright (C) 2001 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# libstdc++@gcc.gnu.org -# -# This file is contributed by Gabriel Dos Reis <gdr@codesourcery.com> - -## This file contains support routines for dg.exp based testsuite -## framework. - -## The global associative array lib_env contains the totality -## of options necessary to run testcases; the meanings of which are -## as follows: -## lib_env(CXX) The compiler used to run testcases. -## lib_env(CXXFLAGS) Special flags passed to the compiler. -## lib_env(INCLUDES) Includes options to pass to the compiler. -## lib_env(LDFLAGS) Additional library flags. -## lib_env(LIBTOOL) Path to the `libtool' script. -## lib_env(SRC_DIR) Where V3 master source lives. -## lib_env(BUILD_DIR) Where V3 is built. -## lib_env(static) Flags to pass to the linker to build a -## statically linked executable. -## lib_env(shared) Flags to pass to the linker to build a -## dynamically linked executable. -## lib_env(testcase_options) Options specified by current testcase. -## These are specified through the @xxx@-keywords. - - -load_lib dg.exp - -## Initialization routine. -proc libstdc++-dg-init { args } { - global lib_env - global srcdir - global outdir - global dg-do-what-default - - # By default, we assume we want to run program images. - set dg-do-what-default run - - # Get out the source and the build directories. - set src-dir [lookfor_file $srcdir libstdc++-v3] - set build-dir [lookfor_file $outdir libstdc++-v3] - - # Set proper environment variables for the framework. - libstdc++-setup-flags ${src-dir} ${build-dir} - - # mkcheck.in used to output these information. - set output [remote_exec host $lib_env(CXX) -v] - if { [lindex $output 0] == 0 } { - set output [lindex $output 1] - regexp "gcc version.*$" $output version - regsub "\n+" $version "" version - clone_output "Compiler: $version" - clone_output "Compiler flags: $lib_env(CXXFLAGS)" - } else { - perror "Cannot determine compiler version: [lindex $output 1]" - } -} - -## dg.exp callback. Called from dg-test to run PROGRAM. -## -## This is the heart of the framework. For the time being, it is -## pretty much baroque, but it will improve as time goes. -proc libstdc++_load { prog } { - global lib_env - set opts $lib_env(testcase_options) - set results [remote_load target $lib_env(LIBTOOL) "--mode=execute $prog"] - - if { [lindex $results 0] == "pass" && [info exists opts(diff)] } { - # FIXME: We should first test for any mentioned @output@ file here - # before taking any other action. - - set firsts [glob -nocomplain [lindex $opts(diff) 0]] - set seconds [glob -nocomplain [lindex $opts(diff) 1]] - foreach f $firsts s $seconds { - if { [diff $f $s] == 0 } { - # FIXME: Well we should report a message. But for the time - # being, just pretend there is nothing much to say. - # Yes, that is silly, I know. But we need, first, to - # to have a working framework. - break - } - } - } - return $results -} - -## Nothing particular to do. -proc libstdc++_exit { } { -} - -## Output the version of the libs tested. -proc libstdc++_version { } { - global lib_env - set version "undeterminated" - - # This file contains the library configuration, built at configure time. - set config-file $lib_env(BUILD_DIR)/include/bits/c++config.h - - set version_pattern "__GLIBCPP__\[ \t\]\+\[0-9\]\+" - if [file exists ${config-file}] { - set version [grep ${config-file} $version_pattern] - regexp "\[0-9\]\+" $version version - } - clone_output "$lib_env(SRC_DIR) version $version" - return 0 -} - -## Main loop. Loop over TEST-DIRECTORIES and run each testcase -## found therein. -proc libstdc++_runtest { testdirs } { - global runtests - global srcdir - global outdir - - set top-tests-dir [pwd] - foreach d $testdirs { - set testfiles [glob -nocomplain $d/*.C $d/*.cc] - if { [llength $testfiles] == 0 } { - continue - } - - # Make the appropriate test-dirs with related .libs/ subdir - # to keep libtool happy. - set td "$outdir/[dg-trim-dirname $srcdir $d]" - maybe-make-directory $td - maybe-make-directory $td/.libs - - cd $td; - foreach testfile $testfiles { - # If we're not supposed to test this file, just skip it. - if ![runtest_file_p $runtests $testfile] { - continue - } - -# verbose "Testing [dg-trim-dirname $srcdir $testfile]" - libstdc++_do_test $testfile static - libstdc++_do_test $testfile shared - } - cd ${top-tests-dir} - } -} - -## dg.exp callback. Main test-running routine. Called from -## dg-test. -## -## TESTCASE is the file-name of the program to test; -## COMPILE_TYPE is the kind of compilation to apply to TESTCASE; -## current compilation kinds are: preprocess, compile, -## assemble, link, run. -proc libstdc++-dg-test { testfile compile_type additional-options } { - global srcdir; global outdir - global lib_env - global which_library - - # Prepare for compilation output - set comp_output "" - - # By default, we want to use libtool to compile and run tests. - set lt $lib_env(LIBTOOL) - set lt_args "--tag=CXX" - - libstdc++-process-options $testfile - set output_file [file rootname [file tail $testfile]] - switch $compile_type { - "preprocess" { - set lt $lib_env(CXX) - set lt_args "-E $lib_env(INCLUDES) $testfile -o $output_file.ii" - } - "compile" { - set lt $lib_env(CXX) - set lt_args "-S $lib_env(INCLUDES) $testfile -o $output_file.s" - } - "assemble" { - append lt_args " --mode=compile $lib_env(FLAGS) $testfile" - } - "run" - - "link" { - # If we're asked to run a testcase, then just do a `link'. - # Later, the framework will load the program image through - # libstdc++_load callback. - if { $which_library == "static" } { - append output_file ".st-exe" - } else { - append output_file ".sh-exe" - } - append lt_args " --mode=link $lib_env(FLAGS) \ - $lib_env($which_library) $testfile \ - -o $output_file $lib_env(LDFLAGS)" - } - default { - perror "$compile_type: option not recognized" - } - } - - set results [remote_exec host $lt "$lt_args ${additional-options}"] - if { [lindex $results 0] != 0 } { - set comp_output [lindex $results 1]; - } - return [list $comp_output $output_file] -} - -## Get options necessary to properly run testcases. -## SRC-DIR is the library top source directory e.g. something like -## /codesourcery/egcs/libstdc++ -## BUILD-DIR is top build directory e.g. something like -## /tmp/egcs/i686-pc-linux-gnu/libstdc++ -proc libstdc++-setup-flags {src-dir build-dir} { - global lib_env - - set tmp [remote_exec host ${build-dir}/tests_flags "--built-library ${build-dir} ${src-dir}"] - set status [lindex $tmp 0] - set output [lindex $tmp 1] - if { $status == 0 } { - set flags [split $output :] - set lib_env(BUILD_DIR) [lindex $flags 0] - set lib_env(SRC_DIR) [lindex $flags 1] - set lib_env(CXX) [lindex $flags 3] - set lib_env(CXXFLAGS) [lindex $flags 4] - set lib_env(INCLUDES) [lindex $flags 5] - set lib_env(LDFLAGS) [lindex $flags 6] - - # This is really really fragile. We should find a better away to - # tell the framework which flags to use for static/shared libraries. - set lib_env(static) "-static" - set lib_env(shared) "" - - set lib_env(LIBTOOL) "$lib_env(BUILD_DIR)/libtool" - set lib_env(FLAGS) "$lib_env(CXX) -B$lib_env(BUILD_DIR)/ \ - $lib_env(INCLUDES) $lib_env(CXXFLAGS)" - } else { - perror "$output" - } -} - -proc maybe-make-directory {dir} { - if {![file isdirectory $dir]} { - file mkdir $dir - } -} - -proc libstdc++_do_test { testfile lib } { - global which_library; set which_library $lib - ## Is it planed to handle -keep-output throught @xxx@-option - dg-test -keep-output $testfile "" "" -} - -## Process @xxx@ options. -proc libstdc++-process-options { testfile } { - global lib_env - - array set opts { diff {} output {} require {} } - set percent [file rootname [file tail $testfile]] - set option-pattern "@.*@.*" - set results [grep $testfile ${option-pattern}] - - if ![string match "" $results] { - foreach o $results { - regexp "@(.*)@(.*)" $o o key value - regsub -all "%" $value "$percent" value - - # Not yet supported: keep-output, output, link-against - switch $key { - "diff" - - "keep-output" - - "link-against" - - "output" - - "require" { } - default { - perror "libstdc++: Invalid option-specification `$o'" - } - } - set opts($key) $value - unset key value - } - } - set lib_env(testcase_options) [array get opts] - - # copy any required data files. - if ![string match "" $opts(require)] { - set src [file dirname $testfile] - set dst [pwd] - foreach f $opts(require) { - foreach t [glob -nocomplain "$src/$f"] { - file copy -force $t $dst - } - } - } -} diff --git a/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp b/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp new file mode 100644 index 00000000000..c5c22c3c287 --- /dev/null +++ b/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp @@ -0,0 +1,47 @@ +# Copyright (C) 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# libstdc++-v3 testsuite that uses the 'dg.exp' driver. + +# Load support procs. +load_lib libstdc++-v3-dg.exp + +# If a testcase doesn't have special options, use these. +global DEFAULT_CXXFLAGS +if ![info exists DEFAULT_CXXFLAGS] then { + set DEFAULT_CXXFLAGS " -DDEBUG_ASSERT" +} + +# Initialize 'dg' last or dejagnu exits with an error... +libstdc++-v3-init +dg-init + + +## Set ulimits. +## This should normally be handled on a per-test basis through @xxx@-keywords. +## The following limit is expressed in kilobytes. For history, have a +## look at http://gcc.gnu.org/ml/libstdc++/2000-10/msg00029.html +set maximum-memory-usage 16384 +set shell-ulimit-command ulimit +remote_exec host ${shell-ulimit-command} "-d ${maximum-memory-usage}" +remote_exec host ${shell-ulimit-command} "-v ${maximum-memory-usage}" + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/*/*.cc]] \ + "" $DEFAULT_CXXFLAGS + +# All done. +dg-finish diff --git a/libstdc++-v3/testsuite/libstdc++.tests/tests.exp b/libstdc++-v3/testsuite/libstdc++.tests/tests.exp deleted file mode 100644 index d811803ad4c..00000000000 --- a/libstdc++-v3/testsuite/libstdc++.tests/tests.exp +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2001 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# libstdc++@gcc.gnu.org -# -# This file is contributed by Gabriel Dos Reis <gdr@codesourcery.com> - -load_lib libstdc++.exp - -libstdc++-dg-init -libstdc++_runtest [glob -nocomplain $srcdir/*] -dg-finish - diff --git a/libstdc++-v3/testsuite/testsuite_hooks.h b/libstdc++-v3/testsuite/testsuite_hooks.h new file mode 100644 index 00000000000..f8bb87b175e --- /dev/null +++ b/libstdc++-v3/testsuite/testsuite_hooks.h @@ -0,0 +1,104 @@ +// Utility subroutines for the C++ library testsuite. +// +// Copyright (C) 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. +// +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// This file provides the following: +// +// 1) VERIFY(), via DEBUG_ASSERT, from Brent Verner <brent@rcfile.org>. +// This file is included in the various testsuite programs to provide +// #define(able) assert() behavior for debugging/testing. It may be +// a suitable location for other furry woodland creatures as well. +// +// 2) __set_testsuite_memlimit() +// __set_testsuite_memlimit() uses setrlimit() to restrict dynamic memory +// allocation. We provide a default memory limit if none is passed by the +// calling application. The argument to __set_testsuite_memlimit() is the +// limit in megabytes (a floating-point number). If _GLIBCPP_MEM_LIMITS is +// #defined before including this header, then no limiting is attempted. + +#ifndef _GLIBCPP_TESTSUITE_HOOKS_H +#define _GLIBCPP_TESTSUITE_HOOKS_H + +#ifdef DEBUG_ASSERT +# include <cassert> +# define VERIFY(fn) assert(fn) +#else +# define VERIFY(fn) test &= (fn) +# define VERIFY(fn) fn +#endif + +#include <bits/c++config.h> + +// Defined in GLIBCPP_CONFIGURE_TESTSUITE. +#ifndef _GLIBCPP_MEM_LIMITS + +// Don't do memory limits. +void +__set_testsuite_memlimit(float x = 0) +{ } + +#else + +// Do memory limits. +#include <sys/resource.h> +#include <unistd.h> + +#ifndef MEMLIMIT_MB +#define MEMLIMIT_MB 16.0 +#endif + +void +__set_testsuite_memlimit(float __size = MEMLIMIT_MB) +{ + struct rlimit r; + r.rlim_cur = (rlim_t)(__size * 1048576); + + // Heap size, seems to be common. +#if _GLIBCPP_HAVE_MEMLIMIT_DATA + setrlimit(RLIMIT_DATA, &r); +#endif + + // Resident set size. +#if _GLIBCPP_HAVE_MEMLIMIT_RSS + setrlimit(RLIMIT_RSS, &r); +#endif + + // Mapped memory (brk + mmap). +#if _GLIBCPP_HAVE_MEMLIMIT_VMEM + setrlimit(RLIMIT_VMEM, &r); +#endif + + // Virtual memory. +#if _GLIBCPP_HAVE_MEMLIMIT_AS + setrlimit(RLIMIT_AS, &r); +#endif +} +#endif + +#endif // _GLIBCPP_TESTSUITE_HOOKS_H + |