aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-10-13 16:28:19 -0700
committerDan Albert <danalbert@google.com>2015-10-13 16:28:19 -0700
commita8c075f72b231c37823661ba0d7d082a21cd39d9 (patch)
tree395aa3b848d56037292e50466643453485073018 /gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator
parent5aff2e0142aca13849b4e51de503e71d5010efa6 (diff)
downloadtoolchain_gcc-a8c075f72b231c37823661ba0d7d082a21cd39d9.tar.gz
toolchain_gcc-a8c075f72b231c37823661ba0d7d082a21cd39d9.tar.bz2
toolchain_gcc-a8c075f72b231c37823661ba0d7d082a21cd39d9.zip
Remove gcc-4.8.
Change-Id: Iee9c6985c613f58c82e33a91722d371579eb290f
Diffstat (limited to 'gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator')
-rw-r--r--gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/copy.cc57
-rw-r--r--gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/copy_assign.cc61
-rw-r--r--gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/minimal.cc46
-rw-r--r--gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/move.cc59
-rw-r--r--gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/move_assign.cc80
-rw-r--r--gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/noexcept.cc76
-rw-r--r--gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/swap.cc78
7 files changed, 0 insertions, 457 deletions
diff --git a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/copy.cc b/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/copy.cc
deleted file mode 100644
index f95c345b8..000000000
--- a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/copy.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (C) 2011-2013 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-options "-std=gnu++0x" }
-
-#include <vector>
-#include <testsuite_hooks.h>
-#include <testsuite_allocator.h>
-
-struct T { int i; };
-
-using __gnu_test::propagating_allocator;
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- typedef propagating_allocator<T, false> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- v1.push_back(T());
- test_type v2(v1);
- VERIFY(1 == v1.get_allocator().get_personality());
- VERIFY(0 == v2.get_allocator().get_personality());
-}
-
-void test02()
-{
- bool test __attribute__((unused)) = true;
- typedef propagating_allocator<T, true> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- v1.push_back(T());
- test_type v2(v1);
- VERIFY(1 == v1.get_allocator().get_personality());
- VERIFY(1 == v2.get_allocator().get_personality());
-}
-
-int main()
-{
- test01();
- test02();
- return 0;
-}
diff --git a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/copy_assign.cc b/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/copy_assign.cc
deleted file mode 100644
index 89aac6f56..000000000
--- a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/copy_assign.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (C) 2011-2013 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-options "-std=gnu++0x" }
-
-#include <vector>
-#include <testsuite_hooks.h>
-#include <testsuite_allocator.h>
-
-struct T { int i; };
-
-using __gnu_test::propagating_allocator;
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- typedef propagating_allocator<T, false> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- v1.push_back(T());
- test_type v2(alloc_type(2));
- v2.push_back(T());
- v2 = v1;
- VERIFY(1 == v1.get_allocator().get_personality());
- VERIFY(2 == v2.get_allocator().get_personality());
-}
-
-void test02()
-{
- bool test __attribute__((unused)) = true;
- typedef propagating_allocator<T, true> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- v1.push_back(T());
- test_type v2(alloc_type(2));
- v2.push_back(T());
- v2 = v1;
- VERIFY(1 == v1.get_allocator().get_personality());
- VERIFY(1 == v2.get_allocator().get_personality());
-}
-
-int main()
-{
- test01();
- test02();
- return 0;
-}
diff --git a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/minimal.cc b/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/minimal.cc
deleted file mode 100644
index 1b66b5097..000000000
--- a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/minimal.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (C) 2011-2013 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-options "-std=gnu++0x" }
-
-#include <vector>
-#include <memory>
-#include <testsuite_hooks.h>
-#include <testsuite_allocator.h>
-
-struct T { int i; };
-
-using __gnu_test::SimpleAllocator;
-
-template class std::vector<T, SimpleAllocator<T>>;
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- typedef SimpleAllocator<T> alloc_type;
- typedef std::allocator_traits<alloc_type> traits_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v(alloc_type{});
- v.push_back(T());
- VERIFY( v.max_size() == traits_type::max_size(v.get_allocator()) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/move.cc b/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/move.cc
deleted file mode 100644
index 7e62f1ebc..000000000
--- a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/move.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (C) 2013 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-options "-std=gnu++11" }
-
-#include <vector>
-#include <testsuite_hooks.h>
-#include <testsuite_allocator.h>
-
-struct T { int i; };
-
-using __gnu_test::uneq_allocator;
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- typedef uneq_allocator<T> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- v1 = { T() };
- auto it = v1.begin();
- test_type v2(std::move(v1));
- VERIFY(1 == v1.get_allocator().get_personality());
- VERIFY(1 == v2.get_allocator().get_personality());
- VERIFY( it == v2.begin() );
-}
-
-void test02()
-{
- bool test __attribute__((unused)) = true;
- typedef uneq_allocator<T> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- v1 = { T() };
- test_type v2(std::move(v1), alloc_type(2));
- VERIFY(1 == v1.get_allocator().get_personality());
- VERIFY(2 == v2.get_allocator().get_personality());
-}
-
-int main()
-{
- test01();
- test02();
- return 0;
-}
diff --git a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/move_assign.cc b/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/move_assign.cc
deleted file mode 100644
index 42dec6dd8..000000000
--- a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/move_assign.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (C) 2011-2013 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-options "-std=gnu++0x" }
-
-#include <vector>
-#include <testsuite_hooks.h>
-#include <testsuite_allocator.h>
-
-struct T { int i; };
-
-using __gnu_test::propagating_allocator;
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- typedef propagating_allocator<T, false> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- v1.push_back(T());
- test_type v2(alloc_type(2));
- v2.push_back(T());
- v2 = std::move(v1);
- VERIFY(1 == v1.get_allocator().get_personality());
- VERIFY(2 == v2.get_allocator().get_personality());
-}
-
-void test02()
-{
- bool test __attribute__((unused)) = true;
- typedef propagating_allocator<T, true> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- v1.push_back(T());
- auto it = v1.begin();
- test_type v2(alloc_type(2));
- v2.push_back(T());
- v2 = std::move(v1);
- VERIFY( it == v2.begin() );
- VERIFY(0 == v1.get_allocator().get_personality());
- VERIFY(1 == v2.get_allocator().get_personality());
-}
-
-void test03()
-{
- bool test __attribute__((unused)) = true;
- typedef propagating_allocator<T, false> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- v1.push_back(T());
- auto it = v1.begin();
- test_type v2(alloc_type(1));
- v2.push_back(T());
- v2 = std::move(v1);
- VERIFY( it == v2.begin() );
- VERIFY(1 == v1.get_allocator().get_personality());
- VERIFY(1 == v2.get_allocator().get_personality());
-}
-
-int main()
-{
- test01();
- test02();
- test03();
- return 0;
-}
diff --git a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/noexcept.cc b/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/noexcept.cc
deleted file mode 100644
index a805a4f0a..000000000
--- a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/noexcept.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (C) 2011-2013 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-options "-std=gnu++0x" }
-
-#include <vector>
-#include <testsuite_hooks.h>
-#include <testsuite_allocator.h>
-
-struct T { int i; };
-
-namespace __gnu_test
-{
- inline void
- swap(propagating_allocator<T, true>& l, propagating_allocator<T, true>& r)
- noexcept(false)
- {
- typedef uneq_allocator<T> base_alloc;
- swap(static_cast<base_alloc&>(l), static_cast<base_alloc&>(r));
- }
-}
-
-using __gnu_test::propagating_allocator;
-
-void test01()
-{
- typedef std::allocator<T> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1;
- test_type v2;
- // this is a GNU extension for std::allocator
- static_assert( noexcept( v1 = std::move(v2) ), "Move assign cannot throw" );
- static_assert( noexcept( v1.swap(v2) ), "Swap cannot throw" );
-}
-
-void test02()
-{
- typedef propagating_allocator<T, false> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- test_type v2(alloc_type(2));
- static_assert( !noexcept( v1 = std::move(v2) ), "Move assign can throw" );
- static_assert( noexcept( v1.swap(v2) ), "Swap cannot throw" );
-}
-
-void test03()
-{
- typedef propagating_allocator<T, true> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- test_type v2(alloc_type(2));
- static_assert( noexcept( v1 = std::move(v2) ), "Move assign cannot throw" );
- static_assert( !noexcept( v1.swap(v2) ), "Swap can throw" );
-}
-
-int main()
-{
- test01();
- test02();
- test03();
- return 0;
-}
diff --git a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/swap.cc b/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/swap.cc
deleted file mode 100644
index ce44cf80f..000000000
--- a/gcc-4.8/libstdc++-v3/testsuite/23_containers/vector/allocator/swap.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (C) 2011-2013 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-options "-std=gnu++0x" }
-
-#include <vector>
-#include <testsuite_hooks.h>
-#include <testsuite_allocator.h>
-
-struct T { int i; };
-
-using __gnu_test::propagating_allocator;
-
-// It is undefined behaviour to swap() containers wth unequal allocators
-// if the allocator doesn't propagate, so ensure the allocators compare
-// equal, while still being able to test propagation via get_personality().
-bool
-operator==(const propagating_allocator<T, false>&,
- const propagating_allocator<T, false>&)
-{
- return true;
-}
-
-bool
-operator!=(const propagating_allocator<T, false>&,
- const propagating_allocator<T, false>&)
-{
- return false;
-}
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- typedef propagating_allocator<T, false> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- v1.push_back(T());
- test_type v2(alloc_type(2));
- v2.push_back(T());
- std::swap(v1, v2);
- VERIFY(1 == v1.get_allocator().get_personality());
- VERIFY(2 == v2.get_allocator().get_personality());
- // swap back so assertions in uneq_allocator::deallocate don't fail
- std::swap(v1, v2);
-}
-
-void test02()
-{
- bool test __attribute__((unused)) = true;
- typedef propagating_allocator<T, true> alloc_type;
- typedef std::vector<T, alloc_type> test_type;
- test_type v1(alloc_type(1));
- test_type v2(alloc_type(2));
- std::swap(v1, v2);
- VERIFY(2 == v1.get_allocator().get_personality());
- VERIFY(1 == v2.get_allocator().get_personality());
-}
-
-int main()
-{
- test01();
- test02();
- return 0;
-}