| /external/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/ |
| D | size_size_string_size_size.pass.cpp | 25 template <class S> 27 test(S s, typename S::size_type pos1, typename S::size_type n1, in test() argument 28 S str, typename S::size_type pos2, typename S::size_type n2, in test() 29 S expected) in test() 31 const typename S::size_type old_size = s.size(); in test() 32 S s0 = s; in test() 35 s.replace(pos1, n1, str, pos2, n2); in test() 36 LIBCPP_ASSERT(s.__invariants()); in test() 37 assert(s == expected); in test() 38 typename S::size_type xlen = std::min(n1, old_size - pos1); in test() [all …]
|
| D | size_size_string.pass.cpp | 23 template <class S> 25 test(S s, typename S::size_type pos1, typename S::size_type n1, S str, S expected) in test() argument 27 const typename S::size_type old_size = s.size(); in test() 28 S s0 = s; in test() 31 s.replace(pos1, n1, str); in test() 32 LIBCPP_ASSERT(s.__invariants()); in test() 33 assert(s == expected); in test() 34 typename S::size_type xlen = std::min(n1, old_size - pos1); in test() 35 typename S::size_type rlen = str.size(); in test() 36 assert(s.size() == old_size - xlen + rlen); in test() [all …]
|
| D | iter_iter_string.pass.cpp | 22 template <class S> 24 test(S s, typename S::size_type pos1, typename S::size_type n1, S str, S expected) in test() argument 26 typename S::size_type old_size = s.size(); in test() 27 typename S::const_iterator first = s.begin() + pos1; in test() 28 typename S::const_iterator last = s.begin() + pos1 + n1; in test() 29 typename S::size_type xlen = last - first; in test() 30 s.replace(first, last, str); in test() 31 LIBCPP_ASSERT(s.__invariants()); in test() 32 assert(s == expected); in test() 33 typename S::size_type rlen = str.size(); in test() [all …]
|
| D | size_size_pointer_size.pass.cpp | 13 // replace(size_type pos, size_type n1, const charT* s, size_type n2); 23 template <class S> 25 test(S s, typename S::size_type pos, typename S::size_type n1, in test() argument 26 const typename S::value_type* str, typename S::size_type n2, in test() 27 S expected) in test() 29 const typename S::size_type old_size = s.size(); in test() 30 S s0 = s; in test() 33 s.replace(pos, n1, str, n2); in test() 34 LIBCPP_ASSERT(s.__invariants()); in test() 35 assert(s == expected); in test() [all …]
|
| D | iter_iter_pointer_size.pass.cpp | 13 // replace(const_iterator i1, const_iterator i2, const charT* s, size_type n); 22 template <class S> 24 test(S s, typename S::size_type pos1, typename S::size_type n1, const typename S::value_type* str, in test() argument 25 typename S::size_type n2, S expected) in test() 27 typename S::size_type old_size = s.size(); in test() 28 typename S::const_iterator first = s.begin() + pos1; in test() 29 typename S::const_iterator last = s.begin() + pos1 + n1; in test() 30 typename S::size_type xlen = last - first; in test() 31 s.replace(first, last, str, n2); in test() 32 LIBCPP_ASSERT(s.__invariants()); in test() [all …]
|
| D | size_size_pointer.pass.cpp | 13 // replace(size_type pos, size_type n1, const charT* s); 23 template <class S> 25 test(S s, typename S::size_type pos, typename S::size_type n1, in test() argument 26 const typename S::value_type* str, S expected) in test() 28 const typename S::size_type old_size = s.size(); in test() 29 S s0 = s; in test() 32 s.replace(pos, n1, str); in test() 33 LIBCPP_ASSERT(s.__invariants()); in test() 34 assert(s == expected); in test() 35 typename S::size_type xlen = std::min(n1, old_size - pos); in test() [all …]
|
| D | size_size_T_size_size.pass.cpp | 26 template <class S, class SV> 28 test(S s, typename S::size_type pos1, typename S::size_type n1, in test() argument 29 SV sv, typename S::size_type pos2, typename S::size_type n2, in test() 30 S expected) in test() 32 typedef typename S::size_type SizeT; in test() 33 static_assert((!std::is_same<S, SV>::value), ""); in test() 39 const SizeT old_size = s.size(); in test() 40 S s0 = s; in test() 43 s.replace(pos1, n1, sv, pos2, n2); in test() 44 LIBCPP_ASSERT(s.__invariants()); in test() [all …]
|
| /external/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/ |
| D | size_string_size_size.pass.cpp | 24 template <class S> 26 test(S s, typename S::size_type pos1, S str, typename S::size_type pos2, in test() argument 27 typename S::size_type n, S expected) in test() 29 const typename S::size_type old_size = s.size(); in test() 30 S s0 = s; in test() 33 s.insert(pos1, str, pos2, n); in test() 34 LIBCPP_ASSERT(s.__invariants()); in test() 35 assert(s == expected); in test() 42 s.insert(pos1, str, pos2, n); in test() 48 assert(s == s0); in test() [all …]
|
| D | size_string.pass.cpp | 22 template <class S> 24 test(S s, typename S::size_type pos, S str, S expected) in test() argument 26 const typename S::size_type old_size = s.size(); in test() 27 S s0 = s; in test() 30 s.insert(pos, str); in test() 31 LIBCPP_ASSERT(s.__invariants()); in test() 32 assert(s == expected); in test() 39 s.insert(pos, str); in test() 45 assert(s == s0); in test() 54 typedef std::string S; in main() typedef [all …]
|
| D | size_pointer_size.pass.cpp | 13 // insert(size_type pos, const charT* s, size_type n); 22 template <class S> 24 test(S s, typename S::size_type pos, const typename S::value_type* str, in test() argument 25 typename S::size_type n, S expected) in test() 27 const typename S::size_type old_size = s.size(); in test() 28 S s0 = s; in test() 31 s.insert(pos, str, n); in test() 32 LIBCPP_ASSERT(s.__invariants()); in test() 33 assert(s == expected); in test() 40 s.insert(pos, str, n); in test() [all …]
|
| /external/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/ |
| D | string_string.pass.cpp | 38 template <class S> 40 test0(const S& lhs, const S& rhs, const S& x) in test0() 47 template <class S> 49 test1(S&& lhs, const S& rhs, const S& x) in test1() 54 template <class S> 56 test2(const S& lhs, S&& rhs, const S& x) in test2() 61 template <class S> 63 test3(S&& lhs, S&& rhs, const S& x) in test3() 73 typedef std::string S; in main() typedef 74 test0(S(""), S(""), S("")); in main() [all …]
|
| /external/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/ |
| D | size_size.pass.cpp | 22 template <class S> 24 test(S s, typename S::size_type pos, typename S::size_type n, S expected) in test() argument 26 const typename S::size_type old_size = s.size(); in test() 27 S s0 = s; in test() 30 s.erase(pos, n); in test() 31 LIBCPP_ASSERT(s.__invariants()); in test() 32 assert(s == expected); in test() 39 s.erase(pos, n); in test() 45 assert(s == s0); in test() 51 template <class S> [all …]
|
| /external/libcxx/test/std/strings/basic.string/string.ops/string_compare/ |
| D | size_size_string.pass.cpp | 31 template <class S> 33 test(const S& s, typename S::size_type pos1, typename S::size_type n1, in test() argument 34 const S& str, int x) in test() 36 if (pos1 <= s.size()) in test() 37 assert(sign(s.compare(pos1, n1, str)) == sign(x)); in test() 43 s.compare(pos1, n1, str); in test() 48 assert(pos1 > s.size()); in test() 54 template <class S> 57 test(S(""), 0, 0, S(""), 0); in test0() 58 test(S(""), 0, 0, S("abcde"), -5); in test0() [all …]
|
| D | size_size_string_size_size.pass.cpp | 33 template <class S> 35 test(const S& s, typename S::size_type pos1, typename S::size_type n1, in test() argument 36 const S& str, typename S::size_type pos2, typename S::size_type n2, int x) in test() 38 if (pos1 <= s.size() && pos2 <= str.size()) in test() 39 assert(sign(s.compare(pos1, n1, str, pos2, n2)) == sign(x)); in test() 45 s.compare(pos1, n1, str, pos2, n2); in test() 50 assert(pos1 > s.size() || pos2 > str.size()); in test() 56 template <class S> 58 test_npos(const S& s, typename S::size_type pos1, typename S::size_type n1, in test_npos() argument 59 const S& str, typename S::size_type pos2, int x) in test_npos() [all …]
|
| /external/libcxx/test/std/strings/basic.string/string.modifiers/string_append/ |
| D | iterator.pass.cpp | 21 template <class S, class It> 23 test(S s, It first, It last, S expected) in test() argument 25 s.append(first, last); in test() 26 LIBCPP_ASSERT(s.__invariants()); in test() 27 assert(s == expected); in test() 31 template <class S, class It> 33 test_exceptions(S s, It first, It last) in test_exceptions() argument 35 S aCopy = s; in test_exceptions() 37 s.append(first, last); in test_exceptions() 41 LIBCPP_ASSERT(s.__invariants()); in test_exceptions() [all …]
|
| /external/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/ |
| D | iterator.pass.cpp | 22 template <class S, class It> 24 test(S s, It first, It last, S expected) in test() argument 26 s.assign(first, last); in test() 27 LIBCPP_ASSERT(s.__invariants()); in test() 28 assert(s == expected); in test() 32 template <class S, class It> 34 test_exceptions(S s, It first, It last) in test_exceptions() argument 36 S aCopy = s; in test_exceptions() 38 s.assign(first, last); in test_exceptions() 42 LIBCPP_ASSERT(s.__invariants()); in test_exceptions() [all …]
|
| /external/libcxx/test/std/strings/basic.string/string.ops/string_find/ |
| D | string_size.pass.cpp | 19 template <class S> 21 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x) in test() argument 23 assert(s.find(str, pos) == x); in test() 24 if (x != S::npos) in test() 25 assert(pos <= x && x + str.size() <= s.size()); in test() 28 template <class S> 30 test(const S& s, const S& str, typename S::size_type x) in test() argument 32 assert(s.find(str) == x); in test() 33 if (x != S::npos) in test() 34 assert(0 <= x && x + str.size() <= s.size()); in test() [all …]
|
| /external/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/ |
| D | string_size.pass.cpp | 19 template <class S> 21 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x) in test() argument 23 assert(s.find_first_of(str, pos) == x); in test() 24 if (x != S::npos) in test() 25 assert(pos <= x && x < s.size()); in test() 28 template <class S> 30 test(const S& s, const S& str, typename S::size_type x) in test() argument 32 assert(s.find_first_of(str) == x); in test() 33 if (x != S::npos) in test() 34 assert(x < s.size()); in test() [all …]
|
| /external/libcxx/test/std/experimental/string.view/string.view.find/ |
| D | find_string_view_size.pass.cpp | 20 template <class S> 22 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x) in test() argument 24 assert(s.find(str, pos) == x); in test() 25 if (x != S::npos) in test() 26 assert(pos <= x && x + str.size() <= s.size()); in test() 29 template <class S> 31 test(const S& s, const S& str, typename S::size_type x) in test() argument 33 assert(s.find(str) == x); in test() 34 if (x != S::npos) in test() 35 assert(0 <= x && x + str.size() <= s.size()); in test() [all …]
|
| D | find_first_of_string_view_size.pass.cpp | 17 template <class S> 19 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x) in test() argument 21 assert(s.find_first_of(str, pos) == x); in test() 22 if (x != S::npos) in test() 23 assert(pos <= x && x < s.size()); in test() 26 template <class S> 28 test(const S& s, const S& str, typename S::size_type x) in test() argument 30 assert(s.find_first_of(str) == x); in test() 31 if (x != S::npos) in test() 32 assert(x < s.size()); in test() [all …]
|
| D | find_first_not_of_string_view_size.pass.cpp | 17 template <class S> 19 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x) in test() argument 21 assert(s.find_first_not_of(str, pos) == x); in test() 22 if (x != S::npos) in test() 23 assert(pos <= x && x < s.size()); in test() 26 template <class S> 28 test(const S& s, const S& str, typename S::size_type x) in test() argument 30 assert(s.find_first_not_of(str) == x); in test() 31 if (x != S::npos) in test() 32 assert(x < s.size()); in test() [all …]
|
| /external/libcxx/test/std/strings/string.view/string.view.find/ |
| D | find_string_view_size.pass.cpp | 20 template <class S> 22 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x) in test() argument 24 assert(s.find(str, pos) == x); in test() 25 if (x != S::npos) in test() 26 assert(pos <= x && x + str.size() <= s.size()); in test() 29 template <class S> 31 test(const S& s, const S& str, typename S::size_type x) in test() argument 33 assert(s.find(str) == x); in test() 34 if (x != S::npos) in test() 35 assert(0 <= x && x + str.size() <= s.size()); in test() [all …]
|
| D | find_first_of_string_view_size.pass.cpp | 17 template <class S> 19 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x) in test() argument 21 assert(s.find_first_of(str, pos) == x); in test() 22 if (x != S::npos) in test() 23 assert(pos <= x && x < s.size()); in test() 26 template <class S> 28 test(const S& s, const S& str, typename S::size_type x) in test() argument 30 assert(s.find_first_of(str) == x); in test() 31 if (x != S::npos) in test() 32 assert(x < s.size()); in test() [all …]
|
| D | find_first_not_of_string_view_size.pass.cpp | 17 template <class S> 19 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x) in test() argument 21 assert(s.find_first_not_of(str, pos) == x); in test() 22 if (x != S::npos) in test() 23 assert(pos <= x && x < s.size()); in test() 26 template <class S> 28 test(const S& s, const S& str, typename S::size_type x) in test() argument 30 assert(s.find_first_not_of(str) == x); in test() 31 if (x != S::npos) in test() 32 assert(x < s.size()); in test() [all …]
|
| /external/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/ |
| D | string_size.pass.cpp | 19 template <class S> 21 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x) in test() argument 23 assert(s.find_first_not_of(str, pos) == x); in test() 24 if (x != S::npos) in test() 25 assert(pos <= x && x < s.size()); in test() 28 template <class S> 30 test(const S& s, const S& str, typename S::size_type x) in test() argument 32 assert(s.find_first_not_of(str) == x); in test() 33 if (x != S::npos) in test() 34 assert(x < s.size()); in test() [all …]
|