summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2016-05-16 16:57:15 +0000
committerMarshall Clow <mclow.lists@gmail.com>2016-05-16 16:57:15 +0000
commit779ddd134d50a0096444d14dd220a6ac73726c79 (patch)
treef5c5676efd9f86dfda77a10391d260f7859ed8f6 /libcxx/test/std
parent0a04ac21539f87c88e0fefada975a09948610a1e (diff)
downloadbcm5719-llvm-779ddd134d50a0096444d14dd220a6ac73726c79.tar.gz
bcm5719-llvm-779ddd134d50a0096444d14dd220a6ac73726c79.zip
Add a test for uniqueptr having either NULL and nullptr
llvm-svn: 269665
Diffstat (limited to 'libcxx/test/std')
-rw-r--r--libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp
index 2d62bccdce5..2b0b5f0d945 100644
--- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp
+++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp
@@ -40,4 +40,10 @@ int main()
assert(s.get_deleter().state() == 0);
}
assert(A::count == 0);
+
+ { // LWG#2520 says that nullptr is a valid input as well as null
+ std::unique_ptr<A[], Deleter<A[]> > s1(NULL, Deleter<A[]>());
+ std::unique_ptr<A[], Deleter<A[]> > s2(nullptr, Deleter<A[]>());
+ }
+ assert(A::count == 0);
}
OpenPOWER on IntegriCloud