summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers/sequences/vector.bool/capacity.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/containers/sequences/vector.bool/capacity.pass.cpp')
-rw-r--r--libcxx/test/containers/sequences/vector.bool/capacity.pass.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/libcxx/test/containers/sequences/vector.bool/capacity.pass.cpp b/libcxx/test/containers/sequences/vector.bool/capacity.pass.cpp
index 4feb3d978c7..87c98987dbc 100644
--- a/libcxx/test/containers/sequences/vector.bool/capacity.pass.cpp
+++ b/libcxx/test/containers/sequences/vector.bool/capacity.pass.cpp
@@ -15,6 +15,8 @@
#include <vector>
#include <cassert>
+#include "../../min_allocator.h"
+
int main()
{
{
@@ -27,4 +29,16 @@ int main()
v.push_back(0);
assert(v.capacity() >= 101);
}
+#if __cplusplus >= 201103L
+ {
+ std::vector<bool, min_allocator<bool>> v;
+ assert(v.capacity() == 0);
+ }
+ {
+ std::vector<bool, min_allocator<bool>> v(100);
+ assert(v.capacity() >= 100);
+ v.push_back(0);
+ assert(v.capacity() >= 101);
+ }
+#endif
}
OpenPOWER on IntegriCloud