aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2014-06-26 00:05:58 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2014-06-26 00:05:58 +0100
commit6ab0d680e7f63aa467a3806077a757be28af694d (patch)
treef3a89161987e1a7a5d64de507c43ab288dc12365 /libstdc++-v3
parent733bd64108788a2911b05d08fdf7e1cfd47e5eeb (diff)
downloadgcc-6ab0d680e7f63aa467a3806077a757be28af694d.zip
gcc-6ab0d680e7f63aa467a3806077a757be28af694d.tar.gz
gcc-6ab0d680e7f63aa467a3806077a757be28af694d.tar.bz2
alloc.cc: Fix use of test allocator.
* testsuite/20_util/shared_ptr/creation/alloc.cc: Fix use of test allocator. * testsuite/20_util/shared_ptr/creation/no_rtti.cc: Likewise. * testsuite/30_threads/promise/cons/alloc.cc: Likewise. From-SVN: r212003
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc8
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/creation/no_rtti.cc8
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc11
4 files changed, 9 insertions, 23 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 31669e0..7b6c241 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -25,6 +25,11 @@
with fancy pointer.
* testsuite/30_threads/promise/cons/alloc.cc: Likewise.
+ * testsuite/20_util/shared_ptr/creation/alloc.cc: Fix use of test
+ allocator.
+ * testsuite/20_util/shared_ptr/creation/no_rtti.cc: Likewise.
+ * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
+
2014-06-24 Jonathan Wakely <jwakely@redhat.com>
* include/bits/functexcept.h (__throw_out_of_range_fmt): Change
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc
index 402c612..0628807 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc
@@ -101,16 +101,10 @@ test02()
== tracker_allocator_counter::get_deallocation_count() );
}
-template<typename T>
- struct Pointer : __gnu_test::PointerBase<Pointer<T>, T>
- {
- using __gnu_test::PointerBase<Pointer<T>, T>::PointerBase;
- };
-
void
test03()
{
- __gnu_test::CustomPointerAlloc<Pointer<int>> alloc;
+ __gnu_test::CustomPointerAlloc<int> alloc;
auto p = std::allocate_shared<int>(alloc, 1);
VERIFY( *p == 1 );
}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/no_rtti.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/no_rtti.cc
index 127bafb..d1fab6c 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/no_rtti.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/no_rtti.cc
@@ -29,13 +29,7 @@ struct X { };
// test allocate_shared with no RTTI
-template<typename T>
- struct Pointer : __gnu_test::PointerBase<Pointer<T>, T>
- {
- using __gnu_test::PointerBase<Pointer<T>, T>::PointerBase;
- };
-
-__gnu_test::CustomPointerAlloc<Pointer<int>> alloc;
+__gnu_test::CustomPointerAlloc<int> alloc;
auto p = std::allocate_shared<X>(alloc);
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
index c45e646..ea9bb1a 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
@@ -38,16 +38,9 @@ void test01()
VERIFY( p1.get_future().get() == 5 );
}
-template<typename T>
- struct Pointer : __gnu_test::PointerBase<Pointer<T>, T>
- {
- using __gnu_test::PointerBase<Pointer<T>, T>::PointerBase;
- };
-
-void
-test02()
+void test02()
{
- __gnu_test::CustomPointerAlloc<Pointer<int>> alloc;
+ __gnu_test::CustomPointerAlloc<int> alloc;
promise<int> p1(allocator_arg, alloc);
p1.set_value(5);
VERIFY( p1.get_future().get() == 5 );