diff options
author | Howard Hinnant <hhinnant@apple.com> | 2013-08-23 17:37:05 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2013-08-23 17:37:05 +0000 |
commit | fc88dbd2988365dfa869d7387e1c1a1ae1e5d33d (patch) | |
tree | ae37b542af4ad74ab85bfa5650101b0e2ece2e1a /libcxx/test/strings/basic.string/string.modifiers/string_replace | |
parent | 9217aa3b1532b76e50c6e28f4baec28557f5f978 (diff) | |
download | bcm5719-llvm-fc88dbd2988365dfa869d7387e1c1a1ae1e5d33d.tar.gz bcm5719-llvm-fc88dbd2988365dfa869d7387e1c1a1ae1e5d33d.zip |
Debug mode for string. This commit also marks the first time libc++ debug-mode has found a bug (found one in regex). Had to play with extern templates a bit to get this to work since string is heavily used within libc++.dylib.
llvm-svn: 189114
Diffstat (limited to 'libcxx/test/strings/basic.string/string.modifiers/string_replace')
5 files changed, 5 insertions, 5 deletions
diff --git a/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp b/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp index 37262f13c77..bdc4519305b 100644 --- a/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp +++ b/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp @@ -26,10 +26,10 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, It f, It l, S ex typename S::size_type old_size = s.size(); typename S::const_iterator first = s.begin() + pos1; typename S::const_iterator last = s.begin() + pos1 + n1; + typename S::size_type xlen = last - first; s.replace(first, last, f, l); assert(s.__invariants()); assert(s == expected); - typename S::size_type xlen = last - first; typename S::size_type rlen = std::distance(f, l); assert(s.size() == old_size - xlen + rlen); } diff --git a/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp b/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp index 58a4b20c2f2..6d552f0e747 100644 --- a/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp +++ b/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp @@ -27,10 +27,10 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, const typename S typename S::size_type old_size = s.size(); typename S::const_iterator first = s.begin() + pos1; typename S::const_iterator last = s.begin() + pos1 + n1; + typename S::size_type xlen = last - first; s.replace(first, last, str); assert(s.__invariants()); assert(s == expected); - typename S::size_type xlen = last - first; typename S::size_type rlen = S::traits_type::length(str); assert(s.size() == old_size - xlen + rlen); } diff --git a/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp b/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp index 0ef59ed7771..a8968ef7a3a 100644 --- a/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp +++ b/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp @@ -28,10 +28,10 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, const typename S typename S::size_type old_size = s.size(); typename S::const_iterator first = s.begin() + pos1; typename S::const_iterator last = s.begin() + pos1 + n1; + typename S::size_type xlen = last - first; s.replace(first, last, str, n2); assert(s.__invariants()); assert(s == expected); - typename S::size_type xlen = last - first; typename S::size_type rlen = n2; assert(s.size() == old_size - xlen + rlen); } diff --git a/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp b/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp index 6525607d7a7..b1b3d96ff94 100644 --- a/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp +++ b/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp @@ -28,10 +28,10 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, typename S::size typename S::size_type old_size = s.size(); typename S::const_iterator first = s.begin() + pos1; typename S::const_iterator last = s.begin() + pos1 + n1; + typename S::size_type xlen = last - first; s.replace(first, last, n2, c); assert(s.__invariants()); assert(s == expected); - typename S::size_type xlen = last - first; typename S::size_type rlen = n2; assert(s.size() == old_size - xlen + rlen); } diff --git a/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp b/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp index 76db558c2e5..95ef8be2de3 100644 --- a/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp +++ b/libcxx/test/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp @@ -27,10 +27,10 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, S str, S expecte typename S::size_type old_size = s.size(); typename S::const_iterator first = s.begin() + pos1; typename S::const_iterator last = s.begin() + pos1 + n1; + typename S::size_type xlen = last - first; s.replace(first, last, str); assert(s.__invariants()); assert(s == expected); - typename S::size_type xlen = last - first; typename S::size_type rlen = str.size(); assert(s.size() == old_size - xlen + rlen); } |