summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2014-05-08 14:14:06 +0000
committerMarshall Clow <mclow.lists@gmail.com>2014-05-08 14:14:06 +0000
commit5c520bd985ee51472d2396fe28a3ef8b30eb5a6c (patch)
tree63b8da1539c0e78e9cd755ba956af13ffb38bf5e /libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
parent4c0274b6635af169561d32804d0faa3da2d00aee (diff)
downloadbcm5719-llvm-5c520bd985ee51472d2396fe28a3ef8b30eb5a6c.tar.gz
bcm5719-llvm-5c520bd985ee51472d2396fe28a3ef8b30eb5a6c.zip
Add Address Sanitizer support to std::vector
llvm-svn: 208319
Diffstat (limited to 'libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp')
-rw-r--r--libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp b/libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
index 2914af91a07..4df5702f2ad 100644
--- a/libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
+++ b/libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
@@ -15,6 +15,7 @@
#include <cassert>
#include "../../../stack_allocator.h"
#include "min_allocator.h"
+#include "asan_testing.h"
int main()
{
@@ -22,6 +23,7 @@ int main()
std::vector<int> v;
v.reserve(10);
assert(v.capacity() >= 10);
+ assert(is_contiguous_container_asan_correct(v));
}
{
std::vector<int> v(100);
@@ -32,6 +34,7 @@ int main()
v.reserve(150);
assert(v.size() == 100);
assert(v.capacity() == 150);
+ assert(is_contiguous_container_asan_correct(v));
}
{
std::vector<int, stack_allocator<int, 250> > v(100);
@@ -42,12 +45,14 @@ int main()
v.reserve(150);
assert(v.size() == 100);
assert(v.capacity() == 150);
+ assert(is_contiguous_container_asan_correct(v));
}
#if __cplusplus >= 201103L
{
std::vector<int, min_allocator<int>> v;
v.reserve(10);
assert(v.capacity() >= 10);
+ assert(is_contiguous_container_asan_correct(v));
}
{
std::vector<int, min_allocator<int>> v(100);
@@ -58,6 +63,7 @@ int main()
v.reserve(150);
assert(v.size() == 100);
assert(v.capacity() == 150);
+ assert(is_contiguous_container_asan_correct(v));
}
#endif
}
OpenPOWER on IntegriCloud