mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
733bd64108
commit
6ab0d680e7
|
|
@ -25,6 +25,11 @@
|
||||||
with fancy pointer.
|
with fancy pointer.
|
||||||
* testsuite/30_threads/promise/cons/alloc.cc: Likewise.
|
* 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>
|
2014-06-24 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
* include/bits/functexcept.h (__throw_out_of_range_fmt): Change
|
* include/bits/functexcept.h (__throw_out_of_range_fmt): Change
|
||||||
|
|
|
||||||
|
|
@ -101,16 +101,10 @@ test02()
|
||||||
== tracker_allocator_counter::get_deallocation_count() );
|
== 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
|
void
|
||||||
test03()
|
test03()
|
||||||
{
|
{
|
||||||
__gnu_test::CustomPointerAlloc<Pointer<int>> alloc;
|
__gnu_test::CustomPointerAlloc<int> alloc;
|
||||||
auto p = std::allocate_shared<int>(alloc, 1);
|
auto p = std::allocate_shared<int>(alloc, 1);
|
||||||
VERIFY( *p == 1 );
|
VERIFY( *p == 1 );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,7 @@ struct X { };
|
||||||
|
|
||||||
// test allocate_shared with no RTTI
|
// test allocate_shared with no RTTI
|
||||||
|
|
||||||
template<typename T>
|
__gnu_test::CustomPointerAlloc<int> alloc;
|
||||||
struct Pointer : __gnu_test::PointerBase<Pointer<T>, T>
|
|
||||||
{
|
|
||||||
using __gnu_test::PointerBase<Pointer<T>, T>::PointerBase;
|
|
||||||
};
|
|
||||||
|
|
||||||
__gnu_test::CustomPointerAlloc<Pointer<int>> alloc;
|
|
||||||
|
|
||||||
auto p = std::allocate_shared<X>(alloc);
|
auto p = std::allocate_shared<X>(alloc);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,16 +38,9 @@ void test01()
|
||||||
VERIFY( p1.get_future().get() == 5 );
|
VERIFY( p1.get_future().get() == 5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
void test02()
|
||||||
struct Pointer : __gnu_test::PointerBase<Pointer<T>, T>
|
|
||||||
{
|
|
||||||
using __gnu_test::PointerBase<Pointer<T>, T>::PointerBase;
|
|
||||||
};
|
|
||||||
|
|
||||||
void
|
|
||||||
test02()
|
|
||||||
{
|
{
|
||||||
__gnu_test::CustomPointerAlloc<Pointer<int>> alloc;
|
__gnu_test::CustomPointerAlloc<int> alloc;
|
||||||
promise<int> p1(allocator_arg, alloc);
|
promise<int> p1(allocator_arg, alloc);
|
||||||
p1.set_value(5);
|
p1.set_value(5);
|
||||||
VERIFY( p1.get_future().get() == 5 );
|
VERIFY( p1.get_future().get() == 5 );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue