summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2010-01-01 03:38:58 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2010-01-01 03:38:58 +0000
commit3c0f2830ac9f8a97acbceb5af706d518a46250a1 (patch)
treee4291471e02a3091b05b1ec23e4ce54c7b345158 /libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc
parentc448a85e09ecdcd100b43a9bd1a0d8d7272eb5f0 (diff)
downloadgcc-3c0f2830ac9f8a97acbceb5af706d518a46250a1.tar.gz
PR libstdc++/21772 part 3
2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc')
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc40
1 files changed, 40 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc
new file mode 100644
index 00000000000..a31a05a06db
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc
@@ -0,0 +1,40 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// 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 <vector>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::vector<value_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}