diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-01 17:03:22 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-01 17:03:22 +0000 |
commit | f5d16d55b4f237b5bc9cdb50da61ca639a60f94d (patch) | |
tree | 2e6d25df053819c91aa4d7a351c24b78ad8aea1f /libstdc++-v3/testsuite/18_support/exception/what.cc | |
parent | 4e7a1eb86a1b273d882474a660fb9a332b91c5c8 (diff) | |
download | gcc-f5d16d55b4f237b5bc9cdb50da61ca639a60f94d.tar.gz |
2007-06-01 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/19_diagnostics/logic_error/what-big.cc: New.
* testsuite/19_diagnostics/logic_error/what-3.cc: Same.
* testsuite/19_diagnostics/runtime_error/what-big.cc: Same.
* testsuite/19_diagnostics/runtime_error/what-3.cc: Same.
* testsuite/18_support/14493.cc: Break into...
* testsuite/18_support/exception/what.cc: ...this.
* testsuite/18_support/bad_cast/what.cc: ...this.
* testsuite/18_support/bad_alloc/what.cc: ...this.
* testsuite/18_support/bad_typeid/what.cc: ...this.
* testsuite/18_support/bad_exception/what.cc: ...this.
* testsuite/19_diagnostics/bad_exception/23591_thread-1.c: Move...
* testsuite/18_support/bad_exception/23591_thread-1.c: ...here.
* testsuite/18_support/14026.cc: Move...
* testsuite/18_support/uncaught_exception/14026.cc: ...here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125267 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/18_support/exception/what.cc')
-rw-r--r-- | libstdc++-v3/testsuite/18_support/exception/what.cc | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/18_support/exception/what.cc b/libstdc++-v3/testsuite/18_support/exception/what.cc new file mode 100644 index 00000000000..d328bb77f18 --- /dev/null +++ b/libstdc++-v3/testsuite/18_support/exception/what.cc @@ -0,0 +1,41 @@ +// 2007-01-30 Paolo Carlini <pcarlini@suse.de> + +// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +#include <new> +#include <typeinfo> +#include <exception> +#include <cstring> +#include <testsuite_hooks.h> + +// libstdc++/14493 +void test01() +{ + bool test __attribute__((unused)) = true; + using namespace std; + + exception e; + VERIFY( !strcmp(e.what(), "std::exception") ); +} + +int main() +{ + test01(); + return 0; +} |