summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/set/debug
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2012-03-09 10:37:34 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2012-03-09 10:37:34 +0000
commit739fd6a6b37a914454431a7ab1f0a8f4e022b64c (patch)
treeeeee8e1a751ac9cea702378f895b844e0769275b /libstdc++-v3/testsuite/23_containers/set/debug
parent575a62352656475e46054570556afa5b2ecd6882 (diff)
downloadgcc-739fd6a6b37a914454431a7ab1f0a8f4e022b64c.tar.gz
formatter.h (enum _Debug_msg_id): Add __msg_self_move_assign.
2012-03-09 Paolo Carlini <paolo.carlini@oracle.com> * include/debug/formatter.h (enum _Debug_msg_id): Add __msg_self_move_assign. * include/debug/macros.h (__glibcxx_check_self_move_assign): Add. * src/c++11/debug.cc (_S_debug_messages): Update. * include/debug/safe_iterator.h (_Safe_iterator<>::operator= (_Safe_iterator&&)): Add check for self move assignment. * include/debug/set.h: Likewise. * include/debug/unordered_map: Likewise. * include/debug/multiset.h: Likewise. * include/debug/forward_list: Likewise. * include/debug/unordered_set: Likewise. * include/debug/vector: Likewise. * include/debug/map.h: Likewise. * include/debug/deque: Likewise. * include/debug/string: Likewise. * include/debug/list: Likewise. * include/debug/multimap.h: Likewise. * testsuite/21_strings/debug/self_move_assign_neg.cc: New. * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_map/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/multimap/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_multimap/debug/ self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_multimap/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_set/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/vector/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/multiset/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_multiset/debug/ self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_multiset/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Likewise. From-SVN: r185134
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/set/debug')
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc35
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/debug/self_move_assign_neg.cc34
2 files changed, 69 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc
new file mode 100644
index 00000000000..079ecd9b49a
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc
@@ -0,0 +1,35 @@
+// Copyright (C) 2012 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/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <set>
+
+void test01()
+{
+ std::set<int> s1;
+ auto it1 = s1.begin();
+ it1 = std::move(it1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/self_move_assign_neg.cc
new file mode 100644
index 00000000000..dd2bf9fb15c
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/set/debug/self_move_assign_neg.cc
@@ -0,0 +1,34 @@
+// Copyright (C) 2012 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/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <set>
+
+void test01()
+{
+ std::set<int> s1;
+ s1 = std::move(s1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}