diff options
Diffstat (limited to 'gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics')
44 files changed, 0 insertions, 2021 deletions
diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc deleted file mode 100644 index a874814f4..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc +++ /dev/null @@ -1,38 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-do compile } -// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_error.h> - -int main() -{ - bool test __attribute__((unused)) = true; - - __gnu_test::test_category c1; - __gnu_test::test_category c2(c1); - - return 0; -} - -// { dg-error "deleted function" "" { target *-*-* } 72 } -// { dg-error "used here" "" { target *-*-* } 31 } -// { dg-error "first required here" "" { target *-*-* } 30 } -// { dg-excess-errors "copy constructor" } diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc deleted file mode 100644 index cc9209265..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_error.h> - -int main() -{ - bool test __attribute__((unused)) = true; - - // 1 - __gnu_test::test_category c1; - __gnu_test::test_derived_category c2; - - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc deleted file mode 100644 index b9cb78886..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc +++ /dev/null @@ -1,34 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_error.h> - -int main() -{ - bool test __attribute__((unused)) = true; - - __gnu_test::test_category c1; - __gnu_test::test_derived_category c2; - VERIFY( c1 == c1 ); - VERIFY( !(c1 == c2) ); - - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc deleted file mode 100644 index 405cebd75..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc +++ /dev/null @@ -1,34 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_error.h> - -int main() -{ - bool test __attribute__((unused)) = true; - - __gnu_test::test_category c1; - __gnu_test::test_derived_category c2; - VERIFY( !(c1 != c1) ); - VERIFY( c1 != c2 ); - - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc deleted file mode 100644 index 7cd280aae..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc +++ /dev/null @@ -1,45 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_error.h> - -int main() -{ - bool test __attribute__((unused)) = true; - - // 1 - std::error_code e1; - VERIFY( e1.value() == 0 ); - VERIFY( e1.category() == std::system_category() ); - - // 2 - const __gnu_test::test_category cat; - std::error_code e2(e1.value(), cat); - VERIFY( e2.value() == e1.value() ); - VERIFY( e2.category() == cat ); - - // 3 - std::error_code e3(std::make_error_code(std::errc::operation_not_supported)); - VERIFY( e3.value() == int(std::errc::operation_not_supported) ); - VERIFY( e3.category() == std::generic_category() ); - - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/39882.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/39882.cc deleted file mode 100644 index 9d5c2e333..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/39882.cc +++ /dev/null @@ -1,60 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_hooks.h> - -enum my_errc { my_err = 0 }; - -class my_error_category_impl -: public std::error_category -{ -public: - const char* name() const { return ""; } - std::string message(int) const { return ""; } -} my_error_category_instance; - -std::error_code -make_error_code(my_errc e) -{ - return std::error_code(static_cast<int>(e), - my_error_category_instance); -} - -namespace std -{ - template<> - struct is_error_code_enum<my_errc> - : public true_type {}; -} - -// libstdc++/39882 -void test01() -{ - bool test __attribute__((unused)) = true; - - std::error_code ec1(my_err); - VERIFY( ec1 == make_error_code(my_err) ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/modifiers/39882.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/modifiers/39882.cc deleted file mode 100644 index 880a93655..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/modifiers/39882.cc +++ /dev/null @@ -1,61 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_hooks.h> - -enum my_errc { my_err = 0 }; - -class my_error_category_impl -: public std::error_category -{ -public: - const char* name() const { return ""; } - std::string message(int) const { return ""; } -} my_error_category_instance; - -std::error_code -make_error_code(my_errc e) -{ - return std::error_code(static_cast<int>(e), - my_error_category_instance); -} - -namespace std -{ - template<> - struct is_error_code_enum<my_errc> - : public true_type {}; -} - -// libstdc++/39882 -void test01() -{ - bool test __attribute__((unused)) = true; - - std::error_code ec2; - ec2 = my_err; - VERIFY( ec2 == make_error_code(my_err) ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc deleted file mode 100644 index 515360327..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc +++ /dev/null @@ -1,44 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_hooks.h> - -// unspecified bool operator positive tests -int main() -{ - bool test __attribute__((unused)) = true; - - // 1 - std::error_code e1; - if (e1) - { - VERIFY( false ); - } - - // 2 - std::error_code e2(std::make_error_code(std::errc::operation_not_supported)); - if (e2) - { - VERIFY( true ); - } - - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc deleted file mode 100644 index fed1cdcb1..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-do compile } -// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_hooks.h> - -int main() -{ - std::error_code e; - int i = e; - - return i; -} - -// { dg-error "invalid conversion" "" { target *-*-* } 28 } diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc deleted file mode 100644 index 880434c75..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc +++ /dev/null @@ -1,40 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_error.h> - -// unspecified bool operator positive tests -int main() -{ - bool test __attribute__((unused)) = true; - - std::error_code e1; - std::error_code e2(std::make_error_code(std::errc::operation_not_supported)); - - VERIFY( e1 == e1 ); - VERIFY( !(e1 == e2) ); - - const __gnu_test::test_category cat; - std::error_code e3(e2.value(), cat); - VERIFY( !(e2 == e3) ); - - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc deleted file mode 100644 index bda2ee30e..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc +++ /dev/null @@ -1,40 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_error.h> - -// unspecified bool operator positive tests -int main() -{ - bool test __attribute__((unused)) = true; - - std::error_code e1; - std::error_code e2(std::make_error_code(std::errc::operation_not_supported)); - - VERIFY( !(e1 != e1) ); - VERIFY( e1 != e2 ); - - const __gnu_test::test_category cat; - std::error_code e3(e2.value(), cat); - VERIFY( e2 != e3 ); - - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc deleted file mode 100644 index f42949778..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc +++ /dev/null @@ -1,48 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_error.h> - -void test01() -{ - bool test __attribute__((unused)) = true; - - // 1 - std::error_condition e1; - VERIFY( e1.value() == 0 ); - VERIFY( e1.category() == std::generic_category() ); - - // 2 - const __gnu_test::test_category cat; - std::error_condition e2(e1.value(), cat); - VERIFY( e2.value() == e1.value() ); - VERIFY( e2.category() == cat ); - - // 3 - std::error_condition e3(std::errc::operation_not_supported); - VERIFY( e3.value() == int(std::errc::operation_not_supported) ); - VERIFY( e3.category() == std::generic_category() ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/39881.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/39881.cc deleted file mode 100644 index 7931f1740..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/39881.cc +++ /dev/null @@ -1,60 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_hooks.h> - -enum my_errc { my_err = 0 }; - -class my_error_category_impl -: public std::error_category -{ -public: - const char* name() const { return ""; } - std::string message(int) const { return ""; } -} my_error_category_instance; - -std::error_condition -make_error_condition(my_errc e) -{ - return std::error_condition(static_cast<int>(e), - my_error_category_instance); -} - -namespace std -{ - template<> - struct is_error_condition_enum<my_errc> - : public true_type { }; -} - -// libstdc++/39881 -void test01() -{ - bool test __attribute__((unused)) = true; - - std::error_condition ec1(my_err); - VERIFY( ec1 == make_error_condition(my_err) ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/modifiers/39881.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/modifiers/39881.cc deleted file mode 100644 index 0178a91c4..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/modifiers/39881.cc +++ /dev/null @@ -1,61 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_hooks.h> - -enum my_errc { my_err = 0 }; - -class my_error_category_impl -: public std::error_category -{ -public: - const char* name() const { return ""; } - std::string message(int) const { return ""; } -} my_error_category_instance; - -std::error_condition -make_error_condition(my_errc e) -{ - return std::error_condition(static_cast<int>(e), - my_error_category_instance); -} - -namespace std -{ - template<> - struct is_error_condition_enum<my_errc> - : public true_type { }; -} - -// libstdc++/39881 -void test01() -{ - bool test __attribute__((unused)) = true; - - std::error_condition ec2; - ec2 = my_err; - VERIFY( ec2 == make_error_condition(my_err) ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc deleted file mode 100644 index 17a9553d7..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc +++ /dev/null @@ -1,47 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_hooks.h> - -// unspecified bool operator positive tests -void test01() -{ - bool test __attribute__((unused)) = true; - - // 1 - std::error_condition e1; - if (e1) - { - VERIFY( false ); - } - - // 2 - std::error_condition e2(std::errc::operation_not_supported); - if (e2) - { - VERIFY( true ); - } -} - -int main() -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool_neg.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool_neg.cc deleted file mode 100644 index 5e8ed96f1..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool_neg.cc +++ /dev/null @@ -1,32 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-do compile } - -// Copyright (C) 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_hooks.h> - -int test01() -{ - std::error_condition e; - int i = e; - - return i; -} - -// { dg-error "invalid conversion" "" { target *-*-* } 27 } diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc deleted file mode 100644 index d7f62bf09..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc +++ /dev/null @@ -1,43 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_error.h> - -// unspecified bool operator positive tests -void test01() -{ - bool test __attribute__((unused)) = true; - - std::error_condition e1; - std::error_condition e2(std::errc::operation_not_supported); - - VERIFY( e1 == e1 ); - VERIFY( !(e1 == e2) ); - - const __gnu_test::test_category cat; - std::error_condition e3(e2.value(), cat); - VERIFY( !(e2 == e3) ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc deleted file mode 100644 index fed22ed4f..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc +++ /dev/null @@ -1,43 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_error.h> - -// unspecified bool operator positive tests -void test01() -{ - bool test __attribute__((unused)) = true; - - std::error_condition e1; - std::error_condition e2(std::errc::operation_not_supported); - - VERIFY( !(e1 != e1) ); - VERIFY( e1 != e2 ); - - const __gnu_test::test_category cat; - std::error_condition e3(e2.value(), cat); - VERIFY( e2 != e3 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/cassert/macros.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/cassert/macros.cc deleted file mode 100644 index 12ddd2799..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/cassert/macros.cc +++ /dev/null @@ -1,27 +0,0 @@ -// { dg-do compile } - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <cassert> - -namespace gnu -{ -#ifndef assert - #error "assert_must_be_a_macro" -#endif -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/cerrno/macros.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/cerrno/macros.cc deleted file mode 100644 index d82821b4f..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/cerrno/macros.cc +++ /dev/null @@ -1,35 +0,0 @@ -// { dg-do compile } - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <cerrno> - -namespace gnu -{ -#ifndef EDOM - #error "EDOM_must_be_a_macro" -#endif - -#ifndef ERANGE - #error "ERANGE_must_be_a_macro" -#endif - -#ifndef errno - #error "errno_must_be_a_macro" -#endif -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/stdexcept/synopsis.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/stdexcept/synopsis.cc deleted file mode 100644 index 0035107bc..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/stdexcept/synopsis.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-do compile } - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <stdexcept> - -namespace std { - class logic_error; - class domain_error; - class invalid_argument; - class length_error; - class out_of_range; - class runtime_error; - class range_error; - class overflow_error; - class underflow_error; -} - diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/stdexcept/types_std.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/stdexcept/types_std.cc deleted file mode 100644 index bff018b94..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/stdexcept/types_std.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-do compile } - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <stdexcept> - -namespace gnu -{ - typedef std::logic_error t1; - typedef std::domain_error t2; - typedef std::invalid_argument t3; - typedef std::length_error t4; - typedef std::out_of_range t5; - typedef std::runtime_error t6; - typedef std::range_error t7; - typedef std::overflow_error t8; - typedef std::underflow_error t9; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/34538.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/34538.cc deleted file mode 100644 index e33a88e40..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/34538.cc +++ /dev/null @@ -1,28 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-do compile } - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <stdexcept> -#include <system_error> - -// libstdc++/34538 -int main() -{ - throw std::invalid_argument("foo"); -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc deleted file mode 100644 index d480a09b8..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc +++ /dev/null @@ -1,157 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-do compile } - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> - -#define TEST_ERRC(x) errc x(errc::x); (void)x - -void test01() -{ - using std::errc; - - TEST_ERRC(address_family_not_supported); - TEST_ERRC(address_in_use); - TEST_ERRC(address_not_available); - TEST_ERRC(already_connected); - TEST_ERRC(argument_list_too_long); - TEST_ERRC(argument_out_of_domain); - TEST_ERRC(bad_address); - TEST_ERRC(bad_file_descriptor); - -#ifdef _GLIBCXX_HAVE_EBADMSG - TEST_ERRC(bad_message); -#endif - - TEST_ERRC(broken_pipe); - TEST_ERRC(connection_aborted); - TEST_ERRC(connection_already_in_progress); - TEST_ERRC(connection_refused); - TEST_ERRC(connection_reset); - TEST_ERRC(cross_device_link); - TEST_ERRC(destination_address_required); - TEST_ERRC(device_or_resource_busy); - TEST_ERRC(directory_not_empty); - TEST_ERRC(executable_format_error); - TEST_ERRC(file_exists); - TEST_ERRC(file_too_large); - TEST_ERRC(filename_too_long); - TEST_ERRC(function_not_supported); - TEST_ERRC(host_unreachable); - -#ifdef _GLIBCXX_HAVE_EIDRM - TEST_ERRC(identifier_removed); -#endif - - TEST_ERRC(illegal_byte_sequence); - TEST_ERRC(inappropriate_io_control_operation); - TEST_ERRC(interrupted); - TEST_ERRC(invalid_argument); - TEST_ERRC(invalid_seek); - TEST_ERRC(io_error); - TEST_ERRC(is_a_directory); - TEST_ERRC(message_size); - TEST_ERRC(network_down); - TEST_ERRC(network_reset); - TEST_ERRC(network_unreachable); - TEST_ERRC(no_buffer_space); - TEST_ERRC(no_child_process); - -#ifdef _GLIBCXX_HAVE_ENOLINK - TEST_ERRC(no_link); -#endif - - TEST_ERRC(no_lock_available); - -#ifdef _GLIBCXX_HAVE_ENODATA - TEST_ERRC(no_message_available); -#endif - - TEST_ERRC(no_message); - TEST_ERRC(no_protocol_option); - TEST_ERRC(no_space_on_device); - -#ifdef _GLIBCXX_HAVE_ENOSR - TEST_ERRC(no_stream_resources); -#endif - - TEST_ERRC(no_such_device_or_address); - TEST_ERRC(no_such_device); - TEST_ERRC(no_such_file_or_directory); - TEST_ERRC(no_such_process); - TEST_ERRC(not_a_directory); - TEST_ERRC(not_a_socket); - -#ifdef _GLIBCXX_HAVE_ENOSTR - TEST_ERRC(not_a_stream); -#endif - - TEST_ERRC(not_connected); - TEST_ERRC(not_enough_memory); - TEST_ERRC(not_supported); - -#ifdef _GLIBCXX_HAVE_ECANCELED - TEST_ERRC(operation_canceled); -#endif - - TEST_ERRC(operation_in_progress); - TEST_ERRC(operation_not_permitted); - TEST_ERRC(operation_not_supported); - TEST_ERRC(operation_would_block); - -#ifdef _GLIBCXX_HAVE_EOWNERDEAD - TEST_ERRC(owner_dead); -#endif - - TEST_ERRC(permission_denied); - -#ifdef _GLIBCXX_HAVE_EPROTO - TEST_ERRC(protocol_error); -#endif - - TEST_ERRC(protocol_not_supported); - TEST_ERRC(read_only_file_system); - TEST_ERRC(resource_deadlock_would_occur); - TEST_ERRC(resource_unavailable_try_again); - TEST_ERRC(result_out_of_range); - -#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE - TEST_ERRC(state_not_recoverable); -#endif - -#ifdef _GLIBCXX_HAVE_ETIME - TEST_ERRC(stream_timeout); -#endif - -#ifdef _GLIBCXX_HAVE_ETXTBSY - TEST_ERRC(text_file_busy); -#endif - - TEST_ERRC(timed_out); - TEST_ERRC(too_many_files_open_in_system); - TEST_ERRC(too_many_files_open); - TEST_ERRC(too_many_links); - TEST_ERRC(too_many_symbolic_link_levels); - -#ifdef _GLIBCXX_HAVE_EOVERFLOW - TEST_ERRC(value_too_large); -#endif - - TEST_ERRC(wrong_protocol_type); -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc deleted file mode 100644 index e9294bfd2..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc +++ /dev/null @@ -1,25 +0,0 @@ -// { dg-do compile } - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> // { dg-excess-errors "In file included from" } - -// { dg-error "upcoming ISO" "" { target *-*-* } 31 } - - - diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc deleted file mode 100644 index f124e04ff..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc +++ /dev/null @@ -1,29 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-do compile } - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> - -namespace gnu -{ - using std::system_error; - using std::error_code; - using std::error_category; - using std::system_category; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc deleted file mode 100644 index a41b439d2..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc +++ /dev/null @@ -1,28 +0,0 @@ -// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <stdexcept> -#include <testsuite_api.h> - -int main() -{ - typedef std::logic_error test_type; - __gnu_test::diamond_derivation<test_type, false>::test(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-1.cc deleted file mode 100644 index 1c82da7b9..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-1.cc +++ /dev/null @@ -1,58 +0,0 @@ -// 2001-02-26 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 -// 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// 19.1 Exception classes - -#include <string> -#include <stdexcept> -#include <cstring> -#include <testsuite_hooks.h> - -// libstdc++/1972 -void test01() -{ - bool test __attribute__((unused)) = true; - std::string s("lack of sunlight, no water error"); - - // 1 - std::logic_error obj1 = std::logic_error(s); - - // 2 - std::logic_error obj2(s); - - VERIFY( std::strcmp(obj1.what(), s.data()) == 0 ); - VERIFY( std::strcmp(obj2.what(), s.data()) == 0 ); -} - -void test02() -{ - bool test __attribute__((unused)) = true; - std::string s("lack of sunlight error"); - std::domain_error x(s); - - VERIFY( std::strcmp(x.what(), s.data()) == 0 ); -} - -int main(void) -{ - test01(); - test02(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-2.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-2.cc deleted file mode 100644 index 094aa9e60..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-2.cc +++ /dev/null @@ -1,50 +0,0 @@ -// 2001-02-26 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 -// 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// 19.1 Exception classes - -#include <string> -#include <stdexcept> -#include <cstring> -#include <testsuite_hooks.h> - -// libstdc++/2089 -class fuzzy_logic : public std::logic_error -{ -public: - fuzzy_logic() : std::logic_error("whoa") { } -}; - -void test03() -{ - bool test __attribute__((unused)) = true; - try - { throw fuzzy_logic(); } - catch(const fuzzy_logic& obj) - { VERIFY( std::strcmp("whoa", obj.what()) == 0 ); } - catch(...) - { VERIFY( false ); } -} - -int main(void) -{ - test03(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-3.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-3.cc deleted file mode 100644 index 13438f0fb..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-3.cc +++ /dev/null @@ -1,68 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2007, 2009 -// 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <string> -#include <stdexcept> -#include <cstring> -#include <testsuite_hooks.h> - -// test copy ctors, assignment operators, and persistence of member string data -// 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() -{ - bool test __attribute__((unused)) = true; - 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::logic_error obj1(s); - - // block 01 - { - const std::string s2(strlit1); - std::logic_error obj2(s2); - obj1 = obj2; - } - allocate_on_stack(); - VERIFY( std::strcmp(strlit1, obj1.what()) == 0 ); - - // block 02 - { - const std::string s3(strlit2); - std::logic_error obj3 = std::logic_error(s3); - obj1 = obj3; - } - allocate_on_stack(); - VERIFY( std::strcmp(strlit2, obj1.what()) == 0 ); -} - -int main(void) -{ - test04(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-big.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-big.cc deleted file mode 100644 index 87edf5c5e..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-big.cc +++ /dev/null @@ -1,40 +0,0 @@ -// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <cstring> -#include <string> -#include <stdexcept> -#include <testsuite_hooks.h> - -// Can construct and return 10k character error string. -void test01() -{ - typedef std::logic_error test_type; - - bool test __attribute__((unused)) = true; - const std::string xxx(10000, 'x'); - test_type t(xxx); - VERIFY( std::strcmp(t.what(), xxx.c_str()) == 0 ); -} - -int main(void) -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc deleted file mode 100644 index 1eb2d66e7..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc +++ /dev/null @@ -1,28 +0,0 @@ -// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <stdexcept> -#include <testsuite_api.h> - -int main() -{ - typedef std::runtime_error test_type; - __gnu_test::diamond_derivation<test_type, false>::test(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-1.cc deleted file mode 100644 index 11d8ed617..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-1.cc +++ /dev/null @@ -1,58 +0,0 @@ -// 2001-02-26 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 -// 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// 19.1 Exception classes - -#include <string> -#include <stdexcept> -#include <cstring> -#include <testsuite_hooks.h> - -// libstdc++/1972 -void test01() -{ - bool test __attribute__((unused)) = true; - std::string s("lack of sunlight, no water error"); - - // 1 - std::runtime_error obj1 = std::runtime_error(s); - - // 2 - std::runtime_error obj2(s); - - VERIFY( std::strcmp(obj1.what(), s.data()) == 0 ); - VERIFY( std::strcmp(obj2.what(), s.data()) == 0 ); -} - -void test02() -{ - bool test __attribute__((unused)) = true; - std::string s("lack of sunlight error"); - std::range_error x(s); - - VERIFY( std::strcmp(x.what(), s.data()) == 0 ); -} - -int main(void) -{ - test01(); - test02(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-2.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-2.cc deleted file mode 100644 index b3a5ba5fd..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-2.cc +++ /dev/null @@ -1,50 +0,0 @@ -// 2001-02-26 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 -// 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// 19.1 Exception classes - -#include <string> -#include <stdexcept> -#include <cstring> -#include <testsuite_hooks.h> - -// libstdc++/2089 -class fuzzy_logic : public std::runtime_error -{ -public: - fuzzy_logic() : std::runtime_error("whoa") { } -}; - -void test03() -{ - bool test __attribute__((unused)) = true; - try - { throw fuzzy_logic(); } - catch(const fuzzy_logic& obj) - { VERIFY( std::strcmp("whoa", obj.what()) == 0 ); } - catch(...) - { VERIFY( false ); } -} - -int main(void) -{ - test03(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-3.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-3.cc deleted file mode 100644 index d28fc8ea9..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-3.cc +++ /dev/null @@ -1,70 +0,0 @@ -// 2001-02-26 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 -// 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// 19.1 Exception classes - -#include <string> -#include <stdexcept> -#include <cstring> -#include <testsuite_hooks.h> - -// test copy ctors, assignment operators, and persistence of member string data -// 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() -{ - bool test __attribute__((unused)) = true; - 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) -{ - test04(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-big.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-big.cc deleted file mode 100644 index f9600cfbd..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-big.cc +++ /dev/null @@ -1,40 +0,0 @@ -// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <cstring> -#include <string> -#include <stdexcept> -#include <testsuite_hooks.h> - -// Can construct and return 10k character error string. -void test01() -{ - typedef std::runtime_error test_type; - - bool test __attribute__((unused)) = true; - const std::string xxx(10000, 'x'); - test_type t(xxx); - VERIFY( std::strcmp(t.what(), xxx.c_str()) == 0 ); -} - -int main(void) -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/39880.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/39880.cc deleted file mode 100644 index a6ac7470c..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/39880.cc +++ /dev/null @@ -1,29 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-do compile } - -// Copyright (C) 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> - -// libstdc++/39880 -void test01() -{ - std::error_code ec; - if (ec == std::errc::not_supported) - { } -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc deleted file mode 100644 index 42f297985..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc +++ /dev/null @@ -1,47 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// 2007-06-05 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <cstring> -#include <system_error> -#include <testsuite_hooks.h> - -int main() -{ - bool test __attribute__((unused)) = true; - const std::string s("too late: boulangerie out of pain au raisin"); - const std::error_code - e(std::make_error_code(std::errc::operation_not_supported)); - - // 1 - { - std::system_error err1(e, s); - VERIFY( err1.code() == e ); - VERIFY( std::strcmp(err1.runtime_error::what(), s.c_str()) == 0 ); - } - - // 2 - { - std::system_error err2(95, std::system_category(), s); - VERIFY( err2.code() == std::error_code(95, std::system_category()) ); - VERIFY( std::strcmp(err2.runtime_error::what(), s.c_str()) == 0 ); - } - - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc deleted file mode 100644 index d1afadffd..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc +++ /dev/null @@ -1,29 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com> - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <system_error> -#include <testsuite_api.h> - -int main() -{ - typedef std::system_error test_type; - __gnu_test::diamond_derivation<test_type, true>::test(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc deleted file mode 100644 index 213b196b5..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc +++ /dev/null @@ -1,60 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2007, 2008, 2009 -// 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// 19.1 Exception classes - -#include <string> -#include <system_error> -#include <cstring> -#include <testsuite_hooks.h> - -using namespace std; - -// libstdc++/1972 -void test01() -{ - bool test __attribute__((unused)) = true; - string s("lack of sunlight, no water error"); - - // 1 - system_error obj1 = system_error(error_code(), s); - - // 2 - system_error obj2(error_code(), s); - - VERIFY( strcmp(obj1.what(), s.data()) == 0 ); - VERIFY( strcmp(obj2.what(), s.data()) == 0 ); -} - -void test02() -{ - bool test __attribute__((unused)) = true; - string s("lack of sunlight error"); - system_error x(error_code(), s); - - VERIFY( strcmp(x.what(), s.data()) == 0 ); -} - -int main(void) -{ - test01(); - test02(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc deleted file mode 100644 index ff6641bd2..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc +++ /dev/null @@ -1,50 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2007, 2008, 2009 -// 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// 19.1 Exception classes - -#include <string> -#include <system_error> -#include <cstring> -#include <testsuite_hooks.h> - -// libstdc++/2089 -class fuzzy_logic : public std::system_error -{ -public: - fuzzy_logic() : std::system_error(std::error_code(), "whoa") { } -}; - -void test03() -{ - bool test __attribute__((unused)) = true; - try - { throw fuzzy_logic(); } - catch(const fuzzy_logic& obj) - { VERIFY( std::strcmp("whoa", obj.what()) == 0 ); } - catch(...) - { VERIFY( false ); } -} - -int main(void) -{ - test03(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc deleted file mode 100644 index 9dc701098..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc +++ /dev/null @@ -1,68 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2007, 2009 -// 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <string> -#include <system_error> -#include <cstring> -#include <testsuite_hooks.h> - -// test copy ctors, assignment operators, and persistence of member string data -// 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() -{ - bool test __attribute__((unused)) = true; - 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::system_error obj1(std::error_code(), s); - - // block 01 - { - const std::string s2(strlit1); - std::system_error obj2(std::error_code(), s2); - obj1 = obj2; - } - allocate_on_stack(); - VERIFY( std::strcmp(strlit1, obj1.what()) == 0 ); - - // block 02 - { - const std::string s3(strlit2); - std::system_error obj3 = std::system_error(std::error_code(), s3); - obj1 = obj3; - } - allocate_on_stack(); - VERIFY( std::strcmp(strlit2, obj1.what()) == 0 ); -} - -int main(void) -{ - test04(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc deleted file mode 100644 index 2b5d51c45..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc +++ /dev/null @@ -1,45 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2007, 2008, 2009 -// 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// 19.1 Exception classes - -#include <cstring> -#include <string> -#include <system_error> -#include <testsuite_hooks.h> - -// Make sure each invocation of what() doesn't grow the message. -void test01() -{ - bool test __attribute__((unused)) = true; - std::string s("after nine thirty, this request cannot be met"); - - std::system_error obj = - std::system_error(std::make_error_code(std::errc::invalid_argument), s); - std::string s1(obj.what()); - std::string s2(obj.what()); - VERIFY( s1 == s2 ); -} - -int main(void) -{ - test01(); - return 0; -} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc b/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc deleted file mode 100644 index f3c1309f5..000000000 --- a/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc +++ /dev/null @@ -1,40 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -#include <cstring> -#include <string> -#include <system_error> -#include <testsuite_hooks.h> - -// Can construct and return 10k character error string. -void test01() -{ - typedef std::system_error test_type; - - bool test __attribute__((unused)) = true; - const std::string xxx(10000, 'x'); - test_type t(std::error_code(), xxx); - VERIFY( std::strcmp(t.what(), xxx.c_str()) == 0 ); -} - -int main(void) -{ - test01(); - return 0; -} |