summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-21 00:11:52 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-21 00:11:52 +0000
commitab0da02967f3464e1794430d4a07d752035e8b26 (patch)
tree3bbaff3c7dfa297f621de5704fd92b3bbed413c2 /libstdc++-v3/testsuite
parent8e7a741f32fb3fad67e3f7b6833f5ff7a6ca0ed1 (diff)
downloadppe42-gcc-ab0da02967f3464e1794430d4a07d752035e8b26.tar.gz
ppe42-gcc-ab0da02967f3464e1794430d4a07d752035e8b26.zip
2006-09-20 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/29134 * include/bits/stl_list.h (list<>::max_size): Forward to allocator' max_size. * include/bits/stl_vector.h (vector<>::max_size): Likewise. * include/bits/stl_deque.h (deque<>::max_size): Likewise. * include/bits/stl_tree.h (_Rb_tree<>::max_size): Likewise. * include/tr1/hashtable (_Hashtable<>::max_size): Likewise. * testsuite/23_containers/vector/capacity/29134.cc: Add. * testsuite/23_containers/deque/capacity/29134.cc: Likewise. * testsuite/23_containers/list/capacity/29134.cc: Likewise. * testsuite/23_containers/set/capacity/29134.cc: Likewise. * testsuite/23_containers/map/capacity/29134.cc: Likewise. * testsuite/23_containers/multiset/capacity/29134.cc: Likewise. * testsuite/23_containers/multimap/capacity/29134.cc: Likewise. * testsuite/tr1/6_containers/unordered/capacity/29134-set.cc: Likewise. * testsuite/tr1/6_containers/unordered/capacity/29134-map.cc: Likewise. * testsuite/tr1/6_containers/unordered/capacity/29134-multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/capacity/29134-multimap.cc: Likewise. * include/bits/deque.tcc (deque<>::_M_new_elements_at_front, deque<>::_M_new_elements_at_back): Check for length errors. * testsuite/23_containers/deque/capacity/29134-2.cc: New. * testsuite/23_containers/vector/capacity/29134-2.cc: Likewise. * include/tr1/hashtable (_Hashtable<>::_M_get_Value_allocator): Add. (_Hashtable<>::_M_allocate_node, _M_deallocate_node): Use it. * testsuite/tr1/6_containers/unordered/instantiate/set.cc: Add test. * testsuite/tr1/6_containers/unordered/instantiate/map.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multiset.cc: Likewise. * testsuite/tr1/6_containers/unordered/instantiate/multimap.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117099 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/capacity/29134-2.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/capacity/29134.cc38
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc38
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/capacity/29134.cc38
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/capacity/29134.cc38
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/capacity/29134.cc38
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/capacity/29134.cc38
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/capacity/29134-2.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/capacity/29134.cc38
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-map.cc38
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-multimap.cc38
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-multiset.cc38
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-set.cc38
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/map.cc5
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/multimap.cc5
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/multiset.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/set.cc4
17 files changed, 536 insertions, 4 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/deque/capacity/29134-2.cc b/libstdc++-v3/testsuite/23_containers/deque/capacity/29134-2.cc
new file mode 100644
index 00000000000..bce8f91567b
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/capacity/29134-2.cc
@@ -0,0 +1,52 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 23.2.1.2 deque capacity [lib.deque.capacity]
+
+#include <deque>
+#include <stdexcept>
+#include <limits>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std;
+
+ deque<int> d;
+
+ try
+ {
+ d.resize(numeric_limits<size_t>::max());
+ }
+ catch(const std::length_error&)
+ {
+ VERIFY( true );
+ }
+ catch(...)
+ {
+ VERIFY( false );
+ }
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/deque/capacity/29134.cc
new file mode 100644
index 00000000000..b787f05db9f
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/capacity/29134.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 23.2.1.2 deque capacity [lib.deque.capacity]
+
+#include <deque>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::deque<int> d;
+
+ VERIFY( d.max_size() == d.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc
new file mode 100644
index 00000000000..513466565f6
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 23.2.2.2 list capacity [lib.list.capacity]
+
+#include <list>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::list<int> l;
+
+ VERIFY( l.max_size() == l.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/map/capacity/29134.cc
new file mode 100644
index 00000000000..6383eefa3ab
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/map/capacity/29134.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 23.3.1 map capacity
+
+#include <map>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::map<int, int> m;
+
+ VERIFY( m.max_size() == m.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/multimap/capacity/29134.cc
new file mode 100644
index 00000000000..466a3341f9e
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multimap/capacity/29134.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 23.3.2 multimap capacity
+
+#include <map>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::multimap<int, int> mm;
+
+ VERIFY( mm.max_size() == mm.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/multiset/capacity/29134.cc
new file mode 100644
index 00000000000..ddfb165e8d9
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multiset/capacity/29134.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 23.3.4 multiset capacity
+
+#include <set>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::multiset<int> ms;
+
+ VERIFY( ms.max_size() == ms.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/set/capacity/29134.cc
new file mode 100644
index 00000000000..51650399b73
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/set/capacity/29134.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 23.3.3 set capacity
+
+#include <set>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::set<int> s;
+
+ VERIFY( s.max_size() == s.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/29134-2.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/29134-2.cc
new file mode 100644
index 00000000000..79a1d24ef78
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/29134-2.cc
@@ -0,0 +1,52 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 23.2.4.2 vector capacity [lib.vector.capacity]
+
+#include <vector>
+#include <stdexcept>
+#include <limits>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std;
+
+ vector<int> v;
+
+ try
+ {
+ v.resize(numeric_limits<size_t>::max());
+ }
+ catch(const std::length_error&)
+ {
+ VERIFY( true );
+ }
+ catch(...)
+ {
+ VERIFY( false );
+ }
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/29134.cc
new file mode 100644
index 00000000000..5a98587954b
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/29134.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 23.2.4.2 vector capacity [lib.vector.capacity]
+
+#include <vector>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::vector<int> v;
+
+ VERIFY( v.max_size() == v.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-map.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-map.cc
new file mode 100644
index 00000000000..459ace41a88
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-map.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 6.3.4.4 Class template unordered_map
+
+#include <tr1/unordered_map>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::unordered_map<int, int> um;
+
+ VERIFY( um.max_size() == um.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-multimap.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-multimap.cc
new file mode 100644
index 00000000000..af41fa154d6
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-multimap.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 6.3.4.6 Class template unordered_multimap
+
+#include <tr1/unordered_map>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::unordered_multimap<int, int> umm;
+
+ VERIFY( umm.max_size() == umm.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-multiset.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-multiset.cc
new file mode 100644
index 00000000000..923af9be118
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-multiset.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 6.3.4.5 Class template unordered_multiset
+
+#include <tr1/unordered_set>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::unordered_multiset<int> ums;
+
+ VERIFY( ums.max_size() == ums.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-set.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-set.cc
new file mode 100644
index 00000000000..5822341c85e
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered/capacity/29134-set.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2006 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 Pred 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.
+
+// 6.3.4.3 Class template unordered_set
+
+#include <tr1/unordered_set>
+#include <testsuite_hooks.h>
+
+// libstdc++/29134
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::unordered_set<int> us;
+
+ VERIFY( us.max_size() == us.get_allocator().max_size() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/map.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/map.cc
index cb1cf2fc98e..41ce95db89e 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/map.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/map.cc
@@ -2,7 +2,7 @@
// 2005-02-17 Matt Austern <austern@apple.com>
//
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006 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
@@ -32,3 +32,6 @@ template class unordered_map<string, float>;
template class unordered_map<string, float,
hash<string>, equal_to<string>,
allocator<pair<const string, float> >, true>;
+template class unordered_map<string, float,
+ hash<string>, equal_to<string>,
+ allocator<char>, false>;
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/multimap.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/multimap.cc
index 73282612951..d48aef831b6 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/multimap.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/multimap.cc
@@ -2,7 +2,7 @@
// 2005-02-17 Matt Austern <austern@apple.com>
//
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006 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
@@ -32,3 +32,6 @@ template class unordered_multimap<string, float>;
template class unordered_multimap<string, float,
hash<string>, equal_to<string>,
allocator<pair<const string, float> >, true>;
+template class unordered_multimap<string, float,
+ hash<string>, equal_to<string>,
+ allocator<char>, false>;
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/multiset.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/multiset.cc
index e022e8bd856..5d1e8710b05 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/multiset.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/multiset.cc
@@ -2,7 +2,7 @@
// 2005-02-17 Matt Austern <austern@apple.com>
//
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006 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
@@ -30,3 +30,5 @@ using namespace std::tr1;
template class unordered_multiset<int>;
template class unordered_multiset<int, hash<int>, equal_to<int>,
allocator<int>, true>;
+template class unordered_multiset<int, hash<int>, equal_to<int>,
+ allocator<char>, false>;
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/set.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/set.cc
index 9bb892eccd6..ae3214f1bae 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/set.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered/instantiate/set.cc
@@ -2,7 +2,7 @@
// 2005-02-17 Matt Austern <austern@apple.com>
//
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006 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
@@ -30,3 +30,5 @@ using namespace std::tr1;
template class unordered_set<int>;
template class unordered_set<int, hash<int>, equal_to<int>,
allocator<int>, true>;
+template class unordered_set<int, hash<int>, equal_to<int>,
+ allocator<char>, false>;
OpenPOWER on IntegriCloud