aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error')
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/39880.cc29
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc47
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc29
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc60
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc50
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc68
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc45
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc40
8 files changed, 0 insertions, 368 deletions
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;
-}