diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-06-14 02:53:04 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-06-14 02:53:04 +0000 |
commit | f81cfbab12b8416dceef7b48e2d6987a6c729f4c (patch) | |
tree | 0edaf1f091c80867e976bf29d5a4aa5303191bb4 /libcxx/test | |
parent | f4755f5b15dcca4270ccd932aa0f01bcb6b645b0 (diff) | |
download | bcm5719-llvm-f81cfbab12b8416dceef7b48e2d6987a6c729f4c.tar.gz bcm5719-llvm-f81cfbab12b8416dceef7b48e2d6987a6c729f4c.zip |
Fix vector<bool> tests that were using ints. Patch from STL@microsoft.com
llvm-svn: 272620
Diffstat (limited to 'libcxx/test')
5 files changed, 17 insertions, 17 deletions
diff --git a/libcxx/test/std/containers/sequences/vector.bool/assign_copy.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/assign_copy.pass.cpp index 9501799ae3d..d5faf48e760 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/assign_copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/assign_copy.pass.cpp @@ -19,14 +19,14 @@ int main() { { - std::vector<bool, test_allocator<bool> > l(3, 2, test_allocator<bool>(5)); + std::vector<bool, test_allocator<bool> > l(3, true, test_allocator<bool>(5)); std::vector<bool, test_allocator<bool> > l2(l, test_allocator<bool>(3)); l2 = l; assert(l2 == l); assert(l2.get_allocator() == test_allocator<bool>(3)); } { - std::vector<bool, other_allocator<bool> > l(3, 2, other_allocator<bool>(5)); + std::vector<bool, other_allocator<bool> > l(3, true, other_allocator<bool>(5)); std::vector<bool, other_allocator<bool> > l2(l, other_allocator<bool>(3)); l2 = l; assert(l2 == l); @@ -34,7 +34,7 @@ int main() } #if __cplusplus >= 201103L { - std::vector<bool, min_allocator<bool> > l(3, 2, min_allocator<bool>()); + std::vector<bool, min_allocator<bool> > l(3, true, min_allocator<bool>()); std::vector<bool, min_allocator<bool> > l2(l, min_allocator<bool>()); l2 = l; assert(l2 == l); diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp index 869797b71dd..c66fd497289 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp @@ -31,8 +31,8 @@ test(typename C::size_type n, const typename C::value_type& x) int main() { - test<std::vector<bool> >(50, 3); + test<std::vector<bool> >(50, true); #if TEST_STD_VER >= 11 - test<std::vector<bool, min_allocator<bool>> >(50, 3); + test<std::vector<bool, min_allocator<bool>> >(50, true); #endif } diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp index 905a51ca624..2ef501271f5 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp @@ -33,8 +33,8 @@ test(typename C::size_type n, const typename C::value_type& x, int main() { - test<std::vector<bool> >(50, 3, std::allocator<bool>()); + test<std::vector<bool> >(50, true, std::allocator<bool>()); #if TEST_STD_VER >= 11 - test<std::vector<bool, min_allocator<bool>> >(50, 3, min_allocator<bool>()); + test<std::vector<bool, min_allocator<bool>> >(50, true, min_allocator<bool>()); #endif } diff --git a/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp index abf322b3fae..b3cf9b551f9 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp @@ -38,14 +38,14 @@ int main() test(std::vector<bool>(a, an)); } { - std::vector<bool, test_allocator<bool> > v(3, 2, test_allocator<bool>(5)); + std::vector<bool, test_allocator<bool> > v(3, true, test_allocator<bool>(5)); std::vector<bool, test_allocator<bool> > v2 = v; assert(v2 == v); assert(v2.get_allocator() == v.get_allocator()); } #if TEST_STD_VER >= 11 { - std::vector<bool, other_allocator<bool> > v(3, 2, other_allocator<bool>(5)); + std::vector<bool, other_allocator<bool> > v(3, true, other_allocator<bool>(5)); std::vector<bool, other_allocator<bool> > v2 = v; assert(v2 == v); assert(v2.get_allocator() == other_allocator<bool>(-2)); @@ -56,7 +56,7 @@ int main() test(std::vector<bool, min_allocator<bool>>(a, an)); } { - std::vector<bool, min_allocator<bool> > v(3, 2, min_allocator<bool>()); + std::vector<bool, min_allocator<bool> > v(3, true, min_allocator<bool>()); std::vector<bool, min_allocator<bool> > v2 = v; assert(v2 == v); assert(v2.get_allocator() == v.get_allocator()); diff --git a/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp index 28eea463aee..aa8646a9b81 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp @@ -32,30 +32,30 @@ test(const C& x, const typename C::allocator_type& a) int main() { { - int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 1, 0}; - int* an = a + sizeof(a)/sizeof(a[0]); + bool a[] = {0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0}; + bool* an = a + sizeof(a)/sizeof(a[0]); test(std::vector<bool>(a, an), std::allocator<bool>()); } { - std::vector<bool, test_allocator<bool> > l(3, 2, test_allocator<bool>(5)); + std::vector<bool, test_allocator<bool> > l(3, true, test_allocator<bool>(5)); std::vector<bool, test_allocator<bool> > l2(l, test_allocator<bool>(3)); assert(l2 == l); assert(l2.get_allocator() == test_allocator<bool>(3)); } { - std::vector<bool, other_allocator<bool> > l(3, 2, other_allocator<bool>(5)); + std::vector<bool, other_allocator<bool> > l(3, true, other_allocator<bool>(5)); std::vector<bool, other_allocator<bool> > l2(l, other_allocator<bool>(3)); assert(l2 == l); assert(l2.get_allocator() == other_allocator<bool>(3)); } #if TEST_STD_VER >= 11 { - int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 1, 0}; - int* an = a + sizeof(a)/sizeof(a[0]); + bool a[] = {0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0}; + bool* an = a + sizeof(a)/sizeof(a[0]); test(std::vector<bool, min_allocator<bool>>(a, an), min_allocator<bool>()); } { - std::vector<bool, min_allocator<bool> > l(3, 2, min_allocator<bool>()); + std::vector<bool, min_allocator<bool> > l(3, true, min_allocator<bool>()); std::vector<bool, min_allocator<bool> > l2(l, min_allocator<bool>()); assert(l2 == l); assert(l2.get_allocator() == min_allocator<bool>()); |