summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-09-05 01:14:30 +0000
committerHoward Hinnant <hhinnant@apple.com>2010-09-05 01:14:30 +0000
commitcbf93f39592428fc01f0c92196c6abf35dc4ed42 (patch)
tree97d12422d41120001132cdcafc2d442ce0ab86ed /libcxx/test/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp
parentf9e81f9acbdd07281775fcf8cfcdd2b6a218da19 (diff)
downloadbcm5719-llvm-cbf93f39592428fc01f0c92196c6abf35dc4ed42.tar.gz
bcm5719-llvm-cbf93f39592428fc01f0c92196c6abf35dc4ed42.zip
sync with N3126
llvm-svn: 113101
Diffstat (limited to 'libcxx/test/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp')
-rw-r--r--libcxx/test/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/libcxx/test/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp b/libcxx/test/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp
new file mode 100644
index 00000000000..891e7c2eb48
--- /dev/null
+++ b/libcxx/test/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <queue>
+
+// priority_queue();
+
+// bool empty() const;
+
+#include <queue>
+#include <cassert>
+
+int main()
+{
+ std::priority_queue<int> q;
+ assert(q.empty());
+ q.push(1);
+ assert(!q.empty());
+ q.pop();
+ assert(q.empty());
+}
OpenPOWER on IntegriCloud