summaryrefslogtreecommitdiffstats
path: root/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp
diff options
context:
space:
mode:
authorDan Austin <danielaustin@google.com>2016-06-08 22:25:43 +0000
committerDan Austin <danielaustin@google.com>2016-06-08 22:25:43 +0000
commitee226c05af9e0187098f43fb71465a581487af9b (patch)
tree780cae976165d7708c7ece6e72d1eb81650c5ac8 /test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp
parent1d4a1edbc7e4461b59239e1b8297e9dd395a6322 (diff)
downloadexternal_libcxx-ee226c05af9e0187098f43fb71465a581487af9b.tar.gz
external_libcxx-ee226c05af9e0187098f43fb71465a581487af9b.tar.bz2
external_libcxx-ee226c05af9e0187098f43fb71465a581487af9b.zip
Revert "Revert "Update aosp/master libcxx rebase to r263688""
This reverts commit 1d4a1edbc7e4461b59239e1b8297e9dd395a6322. Change-Id: I2909937fe582f2c5552bc86e7f4d2d5cff0de0aa
Diffstat (limited to 'test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp')
-rw-r--r--test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp b/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp
index 70a4e00b0..c0fe2ef88 100644
--- a/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp
+++ b/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
//
// UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
// <future>
@@ -19,36 +20,36 @@
#include <future>
#include <cassert>
-#include "../test_allocator.h"
+#include "test_allocator.h"
#include "min_allocator.h"
int main()
{
- assert(test_alloc_base::count == 0);
+ assert(test_alloc_base::alloc_count == 0);
{
- std::promise<int> p(std::allocator_arg, test_allocator<int>());
- assert(test_alloc_base::count == 1);
+ std::promise<int> p(std::allocator_arg, test_allocator<int>(42));
+ assert(test_alloc_base::alloc_count == 1);
std::future<int> f = p.get_future();
- assert(test_alloc_base::count == 1);
+ assert(test_alloc_base::alloc_count == 1);
assert(f.valid());
}
- assert(test_alloc_base::count == 0);
+ assert(test_alloc_base::alloc_count == 0);
{
- std::promise<int&> p(std::allocator_arg, test_allocator<int>());
- assert(test_alloc_base::count == 1);
+ std::promise<int&> p(std::allocator_arg, test_allocator<int>(42));
+ assert(test_alloc_base::alloc_count == 1);
std::future<int&> f = p.get_future();
- assert(test_alloc_base::count == 1);
+ assert(test_alloc_base::alloc_count == 1);
assert(f.valid());
}
- assert(test_alloc_base::count == 0);
+ assert(test_alloc_base::alloc_count == 0);
{
- std::promise<void> p(std::allocator_arg, test_allocator<void>());
- assert(test_alloc_base::count == 1);
+ std::promise<void> p(std::allocator_arg, test_allocator<void>(42));
+ assert(test_alloc_base::alloc_count == 1);
std::future<void> f = p.get_future();
- assert(test_alloc_base::count == 1);
+ assert(test_alloc_base::alloc_count == 1);
assert(f.valid());
}
- assert(test_alloc_base::count == 0);
+ assert(test_alloc_base::alloc_count == 0);
// Test with a minimal allocator
{
std::promise<int> p(std::allocator_arg, bare_allocator<void>());