From 5ec04a92d24061c5332c2989bce999a5414d9d83 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Fri, 28 Aug 2015 05:00:25 +0000 Subject: [PATCH] Fix bug in test_allocator that used the wrong value to represent object state git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246270 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/support/test_allocator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/support/test_allocator.h b/test/support/test_allocator.h index 47ef1d556..3ca672f89 100644 --- a/test/support/test_allocator.h +++ b/test/support/test_allocator.h @@ -171,13 +171,13 @@ public: template struct rebind {typedef test_allocator other;}; - test_allocator() throw() : data_(-1) {} + test_allocator() throw() : data_(0) {} explicit test_allocator(int i) throw() : data_(i) {} test_allocator(const test_allocator& a) throw() : data_(a.data_) {} template test_allocator(const test_allocator& a) throw() : data_(a.data_) {} - ~test_allocator() throw() {data_ = 0;} + ~test_allocator() throw() {data_ = -1;} friend bool operator==(const test_allocator& x, const test_allocator& y) {return x.data_ == y.data_;}