[libcxx] r272745 - Improve portability of vector tests. Patch from STL at microsoft.com
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 14 18:44:22 PDT 2016
Author: ericwf
Date: Tue Jun 14 20:44:22 2016
New Revision: 272745
URL: http://llvm.org/viewvc/llvm-project?rev=272745&view=rev
Log:
Improve portability of vector tests. Patch from STL at microsoft.com
Modified:
libcxx/trunk/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp?rev=272745&r1=272744&r2=272745&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp Tue Jun 14 20:44:22 2016
@@ -43,7 +43,7 @@ int main()
v.push_back(1);
assert(is_contiguous_container_asan_correct(v));
v.shrink_to_fit();
- assert(v.capacity() == 200);
+ LIBCPP_ASSERT(v.capacity() == 200); // assumes libc++'s 2x growth factor
assert(v.size() == 101);
assert(is_contiguous_container_asan_correct(v));
}
More information about the cfe-commits
mailing list