From 53a420fba21cf1644972b34dcd811a43cdb8368d Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 2 Jan 2017 19:18:58 +0000 Subject: Vendor import of libc++ trunk r290819: https://llvm.org/svn/llvm-project/libcxx/trunk@290819 --- .../basic.string/string.cons/size_char_alloc.pass.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp') diff --git a/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp b/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp index 60d41b1d35be..60443e9f358d 100644 --- a/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp +++ b/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include "test_macros.h" #include "test_allocator.h" @@ -61,8 +62,8 @@ test(Tp n, Tp c) typedef typename S::allocator_type A; S s2(n, c); LIBCPP_ASSERT(s2.__invariants()); - assert(s2.size() == n); - for (unsigned i = 0; i < n; ++i) + assert(s2.size() == static_cast(n)); + for (int i = 0; i < n; ++i) assert(s2[i] == c); assert(s2.get_allocator() == A()); assert(s2.capacity() >= s2.size()); @@ -77,8 +78,8 @@ test(Tp n, Tp c, const A& a) typedef typename S::traits_type T; S s2(n, c, a); LIBCPP_ASSERT(s2.__invariants()); - assert(s2.size() == n); - for (unsigned i = 0; i < n; ++i) + assert(s2.size() == static_cast(n)); + for (int i = 0; i < n; ++i) assert(s2[i] == c); assert(s2.get_allocator() == a); assert(s2.capacity() >= s2.size()); @@ -102,8 +103,8 @@ int main() test(100, 'a'); test(100, 'a', A(2)); - test(100, 65); - test(100, 65, A(3)); + test(static_cast(100), static_cast(65)); + test(static_cast(100), static_cast(65), A(3)); } #if TEST_STD_VER >= 11 { @@ -122,8 +123,8 @@ int main() test(100, 'a'); test(100, 'a', A()); - test(100, 65); - test(100, 65, A()); + test(static_cast(100), static_cast(65)); + test(static_cast(100), static_cast(65), A()); } #endif } -- cgit v1.3