| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // <string> |
| 10 | |
| 11 | // basic_string<charT,traits,Allocator>& |
| 12 | // insert(size_type pos1, const basic_string<charT,traits,Allocator>& str, |
| 13 | // size_type pos2, size_type n=npos); // constexpr since C++20 |
| 14 | // the "=npos" was added in C++14 |
| 15 | |
| 16 | #include <string> |
| 17 | #include <stdexcept> |
| 18 | #include <cassert> |
| 19 | |
| 20 | #include "test_macros.h" |
| 21 | #include "min_allocator.h" |
| 22 | #include "asan_testing.h" |
| 23 | |
| 24 | template <class S> |
| 25 | TEST_CONSTEXPR_CXX20 void |
| 26 | test(S s, typename S::size_type pos1, S str, typename S::size_type pos2, typename S::size_type n, S expected) { |
| 27 | const typename S::size_type old_size = s.size(); |
| 28 | S s0 = s; |
| 29 | if (pos1 <= old_size && pos2 <= str.size()) { |
| 30 | s.insert(pos1, str, pos2, n); |
| 31 | LIBCPP_ASSERT(s.__invariants()); |
| 32 | assert(s == expected); |
| 33 | LIBCPP_ASSERT(is_string_asan_correct(s)); |
| 34 | } |
| 35 | #ifndef TEST_HAS_NO_EXCEPTIONS |
| 36 | else if (!TEST_IS_CONSTANT_EVALUATED) { |
| 37 | try { |
| 38 | s.insert(pos1, str, pos2, n); |
| 39 | assert(false); |
| 40 | } catch (std::out_of_range&) { |
| 41 | assert(pos1 > old_size || pos2 > str.size()); |
| 42 | assert(s == s0); |
| 43 | } |
| 44 | } |
| 45 | #endif |
| 46 | } |
| 47 | |
| 48 | template <class S> |
| 49 | TEST_CONSTEXPR_CXX20 void test_npos(S s, typename S::size_type pos1, S str, typename S::size_type pos2, S expected) { |
| 50 | const typename S::size_type old_size = s.size(); |
| 51 | S s0 = s; |
| 52 | if (pos1 <= old_size && pos2 <= str.size()) { |
| 53 | s.insert(pos1, str, pos2); |
| 54 | LIBCPP_ASSERT(s.__invariants()); |
| 55 | assert(s == expected); |
| 56 | } |
| 57 | #ifndef TEST_HAS_NO_EXCEPTIONS |
| 58 | else if (!TEST_IS_CONSTANT_EVALUATED) { |
| 59 | try { |
| 60 | s.insert(pos1, str, pos2); |
| 61 | assert(false); |
| 62 | } catch (std::out_of_range&) { |
| 63 | assert(pos1 > old_size || pos2 > str.size()); |
| 64 | assert(s == s0); |
| 65 | } |
| 66 | } |
| 67 | #endif |
| 68 | } |
| 69 | |
| 70 | template <class S> |
| 71 | TEST_CONSTEXPR_CXX20 bool test0() { |
| 72 | test(S("" ), 0, S("" ), 0, 0, S("" )); |
| 73 | test(S("" ), 0, S("" ), 0, 1, S("" )); |
| 74 | test(S("" ), 0, S("" ), 1, 0, S("can't happen" )); |
| 75 | test(S("" ), 0, S("12345" ), 0, 0, S("" )); |
| 76 | test(S("" ), 0, S("12345" ), 0, 1, S("1" )); |
| 77 | test(S("" ), 0, S("12345" ), 0, 2, S("12" )); |
| 78 | test(S("" ), 0, S("12345" ), 0, 4, S("1234" )); |
| 79 | test(S("" ), 0, S("12345" ), 0, 5, S("12345" )); |
| 80 | test(S("" ), 0, S("12345" ), 0, 6, S("12345" )); |
| 81 | test(S("" ), 0, S("12345" ), 1, 0, S("" )); |
| 82 | test(S("" ), 0, S("12345" ), 1, 1, S("2" )); |
| 83 | test(S("" ), 0, S("12345" ), 1, 2, S("23" )); |
| 84 | test(S("" ), 0, S("12345" ), 1, 3, S("234" )); |
| 85 | test(S("" ), 0, S("12345" ), 1, 4, S("2345" )); |
| 86 | test(S("" ), 0, S("12345" ), 1, 5, S("2345" )); |
| 87 | test(S("" ), 0, S("12345" ), 2, 0, S("" )); |
| 88 | test(S("" ), 0, S("12345" ), 2, 1, S("3" )); |
| 89 | test(S("" ), 0, S("12345" ), 2, 2, S("34" )); |
| 90 | test(S("" ), 0, S("12345" ), 2, 3, S("345" )); |
| 91 | test(S("" ), 0, S("12345" ), 2, 4, S("345" )); |
| 92 | test(S("" ), 0, S("12345" ), 4, 0, S("" )); |
| 93 | test(S("" ), 0, S("12345" ), 4, 1, S("5" )); |
| 94 | test(S("" ), 0, S("12345" ), 4, 2, S("5" )); |
| 95 | test(S("" ), 0, S("12345" ), 5, 0, S("" )); |
| 96 | test(S("" ), 0, S("12345" ), 5, 1, S("" )); |
| 97 | test(S("" ), 0, S("12345" ), 6, 0, S("can't happen" )); |
| 98 | test(S("" ), 0, S("1234567890" ), 0, 0, S("" )); |
| 99 | test(S("" ), 0, S("1234567890" ), 0, 1, S("1" )); |
| 100 | test(S("" ), 0, S("1234567890" ), 0, 5, S("12345" )); |
| 101 | test(S("" ), 0, S("1234567890" ), 0, 9, S("123456789" )); |
| 102 | test(S("" ), 0, S("1234567890" ), 0, 10, S("1234567890" )); |
| 103 | test(S("" ), 0, S("1234567890" ), 0, 11, S("1234567890" )); |
| 104 | test(S("" ), 0, S("1234567890" ), 1, 0, S("" )); |
| 105 | test(S("" ), 0, S("1234567890" ), 1, 1, S("2" )); |
| 106 | test(S("" ), 0, S("1234567890" ), 1, 4, S("2345" )); |
| 107 | test(S("" ), 0, S("1234567890" ), 1, 8, S("23456789" )); |
| 108 | test(S("" ), 0, S("1234567890" ), 1, 9, S("234567890" )); |
| 109 | test(S("" ), 0, S("1234567890" ), 1, 10, S("234567890" )); |
| 110 | test(S("" ), 0, S("1234567890" ), 5, 0, S("" )); |
| 111 | test(S("" ), 0, S("1234567890" ), 5, 1, S("6" )); |
| 112 | test(S("" ), 0, S("1234567890" ), 5, 2, S("67" )); |
| 113 | test(S("" ), 0, S("1234567890" ), 5, 4, S("6789" )); |
| 114 | test(S("" ), 0, S("1234567890" ), 5, 5, S("67890" )); |
| 115 | test(S("" ), 0, S("1234567890" ), 5, 6, S("67890" )); |
| 116 | test(S("" ), 0, S("1234567890" ), 9, 0, S("" )); |
| 117 | test(S("" ), 0, S("1234567890" ), 9, 1, S("0" )); |
| 118 | test(S("" ), 0, S("1234567890" ), 9, 2, S("0" )); |
| 119 | test(S("" ), 0, S("1234567890" ), 10, 0, S("" )); |
| 120 | test(S("" ), 0, S("1234567890" ), 10, 1, S("" )); |
| 121 | test(S("" ), 0, S("1234567890" ), 11, 0, S("can't happen" )); |
| 122 | |
| 123 | return true; |
| 124 | } |
| 125 | |
| 126 | template <class S> |
| 127 | TEST_CONSTEXPR_CXX20 bool test1() { |
| 128 | test(S("" ), 0, S("12345678901234567890" ), 0, 0, S("" )); |
| 129 | test(S("" ), 0, S("12345678901234567890" ), 0, 1, S("1" )); |
| 130 | test(S("" ), 0, S("12345678901234567890" ), 0, 10, S("1234567890" )); |
| 131 | test(S("" ), 0, S("12345678901234567890" ), 0, 19, S("1234567890123456789" )); |
| 132 | test(S("" ), 0, S("12345678901234567890" ), 0, 20, S("12345678901234567890" )); |
| 133 | test(S("" ), 0, S("12345678901234567890" ), 0, 21, S("12345678901234567890" )); |
| 134 | test(S("" ), 0, S("12345678901234567890" ), 1, 0, S("" )); |
| 135 | test(S("" ), 0, S("12345678901234567890" ), 1, 1, S("2" )); |
| 136 | test(S("" ), 0, S("12345678901234567890" ), 1, 9, S("234567890" )); |
| 137 | test(S("" ), 0, S("12345678901234567890" ), 1, 18, S("234567890123456789" )); |
| 138 | test(S("" ), 0, S("12345678901234567890" ), 1, 19, S("2345678901234567890" )); |
| 139 | test(S("" ), 0, S("12345678901234567890" ), 1, 20, S("2345678901234567890" )); |
| 140 | test(S("" ), 0, S("12345678901234567890" ), 10, 0, S("" )); |
| 141 | test(S("" ), 0, S("12345678901234567890" ), 10, 1, S("1" )); |
| 142 | test(S("" ), 0, S("12345678901234567890" ), 10, 5, S("12345" )); |
| 143 | test(S("" ), 0, S("12345678901234567890" ), 10, 9, S("123456789" )); |
| 144 | test(S("" ), 0, S("12345678901234567890" ), 10, 10, S("1234567890" )); |
| 145 | test(S("" ), 0, S("12345678901234567890" ), 10, 11, S("1234567890" )); |
| 146 | test(S("" ), 0, S("12345678901234567890" ), 19, 0, S("" )); |
| 147 | test(S("" ), 0, S("12345678901234567890" ), 19, 1, S("0" )); |
| 148 | test(S("" ), 0, S("12345678901234567890" ), 19, 2, S("0" )); |
| 149 | test(S("" ), 0, S("12345678901234567890" ), 20, 0, S("" )); |
| 150 | test(S("" ), 0, S("12345678901234567890" ), 20, 1, S("" )); |
| 151 | test(S("" ), 0, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 152 | test(S("" ), 1, S("" ), 0, 0, S("can't happen" )); |
| 153 | test(S("" ), 1, S("" ), 0, 1, S("can't happen" )); |
| 154 | test(S("" ), 1, S("" ), 1, 0, S("can't happen" )); |
| 155 | test(S("" ), 1, S("12345" ), 0, 0, S("can't happen" )); |
| 156 | test(S("" ), 1, S("12345" ), 0, 1, S("can't happen" )); |
| 157 | test(S("" ), 1, S("12345" ), 0, 2, S("can't happen" )); |
| 158 | test(S("" ), 1, S("12345" ), 0, 4, S("can't happen" )); |
| 159 | test(S("" ), 1, S("12345" ), 0, 5, S("can't happen" )); |
| 160 | test(S("" ), 1, S("12345" ), 0, 6, S("can't happen" )); |
| 161 | test(S("" ), 1, S("12345" ), 1, 0, S("can't happen" )); |
| 162 | test(S("" ), 1, S("12345" ), 1, 1, S("can't happen" )); |
| 163 | test(S("" ), 1, S("12345" ), 1, 2, S("can't happen" )); |
| 164 | test(S("" ), 1, S("12345" ), 1, 3, S("can't happen" )); |
| 165 | test(S("" ), 1, S("12345" ), 1, 4, S("can't happen" )); |
| 166 | test(S("" ), 1, S("12345" ), 1, 5, S("can't happen" )); |
| 167 | test(S("" ), 1, S("12345" ), 2, 0, S("can't happen" )); |
| 168 | test(S("" ), 1, S("12345" ), 2, 1, S("can't happen" )); |
| 169 | test(S("" ), 1, S("12345" ), 2, 2, S("can't happen" )); |
| 170 | test(S("" ), 1, S("12345" ), 2, 3, S("can't happen" )); |
| 171 | test(S("" ), 1, S("12345" ), 2, 4, S("can't happen" )); |
| 172 | test(S("" ), 1, S("12345" ), 4, 0, S("can't happen" )); |
| 173 | test(S("" ), 1, S("12345" ), 4, 1, S("can't happen" )); |
| 174 | test(S("" ), 1, S("12345" ), 4, 2, S("can't happen" )); |
| 175 | test(S("" ), 1, S("12345" ), 5, 0, S("can't happen" )); |
| 176 | test(S("" ), 1, S("12345" ), 5, 1, S("can't happen" )); |
| 177 | test(S("" ), 1, S("12345" ), 6, 0, S("can't happen" )); |
| 178 | |
| 179 | return true; |
| 180 | } |
| 181 | |
| 182 | template <class S> |
| 183 | TEST_CONSTEXPR_CXX20 bool test2() { |
| 184 | test(S("" ), 1, S("1234567890" ), 0, 0, S("can't happen" )); |
| 185 | test(S("" ), 1, S("1234567890" ), 0, 1, S("can't happen" )); |
| 186 | test(S("" ), 1, S("1234567890" ), 0, 5, S("can't happen" )); |
| 187 | test(S("" ), 1, S("1234567890" ), 0, 9, S("can't happen" )); |
| 188 | test(S("" ), 1, S("1234567890" ), 0, 10, S("can't happen" )); |
| 189 | test(S("" ), 1, S("1234567890" ), 0, 11, S("can't happen" )); |
| 190 | test(S("" ), 1, S("1234567890" ), 1, 0, S("can't happen" )); |
| 191 | test(S("" ), 1, S("1234567890" ), 1, 1, S("can't happen" )); |
| 192 | test(S("" ), 1, S("1234567890" ), 1, 4, S("can't happen" )); |
| 193 | test(S("" ), 1, S("1234567890" ), 1, 8, S("can't happen" )); |
| 194 | test(S("" ), 1, S("1234567890" ), 1, 9, S("can't happen" )); |
| 195 | test(S("" ), 1, S("1234567890" ), 1, 10, S("can't happen" )); |
| 196 | test(S("" ), 1, S("1234567890" ), 5, 0, S("can't happen" )); |
| 197 | test(S("" ), 1, S("1234567890" ), 5, 1, S("can't happen" )); |
| 198 | test(S("" ), 1, S("1234567890" ), 5, 2, S("can't happen" )); |
| 199 | test(S("" ), 1, S("1234567890" ), 5, 4, S("can't happen" )); |
| 200 | test(S("" ), 1, S("1234567890" ), 5, 5, S("can't happen" )); |
| 201 | test(S("" ), 1, S("1234567890" ), 5, 6, S("can't happen" )); |
| 202 | test(S("" ), 1, S("1234567890" ), 9, 0, S("can't happen" )); |
| 203 | test(S("" ), 1, S("1234567890" ), 9, 1, S("can't happen" )); |
| 204 | test(S("" ), 1, S("1234567890" ), 9, 2, S("can't happen" )); |
| 205 | test(S("" ), 1, S("1234567890" ), 10, 0, S("can't happen" )); |
| 206 | test(S("" ), 1, S("1234567890" ), 10, 1, S("can't happen" )); |
| 207 | test(S("" ), 1, S("1234567890" ), 11, 0, S("can't happen" )); |
| 208 | test(S("" ), 1, S("12345678901234567890" ), 0, 0, S("can't happen" )); |
| 209 | test(S("" ), 1, S("12345678901234567890" ), 0, 1, S("can't happen" )); |
| 210 | test(S("" ), 1, S("12345678901234567890" ), 0, 10, S("can't happen" )); |
| 211 | test(S("" ), 1, S("12345678901234567890" ), 0, 19, S("can't happen" )); |
| 212 | test(S("" ), 1, S("12345678901234567890" ), 0, 20, S("can't happen" )); |
| 213 | test(S("" ), 1, S("12345678901234567890" ), 0, 21, S("can't happen" )); |
| 214 | test(S("" ), 1, S("12345678901234567890" ), 1, 0, S("can't happen" )); |
| 215 | test(S("" ), 1, S("12345678901234567890" ), 1, 1, S("can't happen" )); |
| 216 | test(S("" ), 1, S("12345678901234567890" ), 1, 9, S("can't happen" )); |
| 217 | test(S("" ), 1, S("12345678901234567890" ), 1, 18, S("can't happen" )); |
| 218 | test(S("" ), 1, S("12345678901234567890" ), 1, 19, S("can't happen" )); |
| 219 | test(S("" ), 1, S("12345678901234567890" ), 1, 20, S("can't happen" )); |
| 220 | test(S("" ), 1, S("12345678901234567890" ), 10, 0, S("can't happen" )); |
| 221 | test(S("" ), 1, S("12345678901234567890" ), 10, 1, S("can't happen" )); |
| 222 | test(S("" ), 1, S("12345678901234567890" ), 10, 5, S("can't happen" )); |
| 223 | test(S("" ), 1, S("12345678901234567890" ), 10, 9, S("can't happen" )); |
| 224 | test(S("" ), 1, S("12345678901234567890" ), 10, 10, S("can't happen" )); |
| 225 | test(S("" ), 1, S("12345678901234567890" ), 10, 11, S("can't happen" )); |
| 226 | test(S("" ), 1, S("12345678901234567890" ), 19, 0, S("can't happen" )); |
| 227 | test(S("" ), 1, S("12345678901234567890" ), 19, 1, S("can't happen" )); |
| 228 | test(S("" ), 1, S("12345678901234567890" ), 19, 2, S("can't happen" )); |
| 229 | test(S("" ), 1, S("12345678901234567890" ), 20, 0, S("can't happen" )); |
| 230 | test(S("" ), 1, S("12345678901234567890" ), 20, 1, S("can't happen" )); |
| 231 | test(S("" ), 1, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 232 | test(S("abcde" ), 0, S("" ), 0, 0, S("abcde" )); |
| 233 | test(S("abcde" ), 0, S("" ), 0, 1, S("abcde" )); |
| 234 | |
| 235 | return true; |
| 236 | } |
| 237 | |
| 238 | template <class S> |
| 239 | TEST_CONSTEXPR_CXX20 bool test3() { |
| 240 | test(S("abcde" ), 0, S("" ), 1, 0, S("can't happen" )); |
| 241 | test(S("abcde" ), 0, S("12345" ), 0, 0, S("abcde" )); |
| 242 | test(S("abcde" ), 0, S("12345" ), 0, 1, S("1abcde" )); |
| 243 | test(S("abcde" ), 0, S("12345" ), 0, 2, S("12abcde" )); |
| 244 | test(S("abcde" ), 0, S("12345" ), 0, 4, S("1234abcde" )); |
| 245 | test(S("abcde" ), 0, S("12345" ), 0, 5, S("12345abcde" )); |
| 246 | test(S("abcde" ), 0, S("12345" ), 0, 6, S("12345abcde" )); |
| 247 | test(S("abcde" ), 0, S("12345" ), 1, 0, S("abcde" )); |
| 248 | test(S("abcde" ), 0, S("12345" ), 1, 1, S("2abcde" )); |
| 249 | test(S("abcde" ), 0, S("12345" ), 1, 2, S("23abcde" )); |
| 250 | test(S("abcde" ), 0, S("12345" ), 1, 3, S("234abcde" )); |
| 251 | test(S("abcde" ), 0, S("12345" ), 1, 4, S("2345abcde" )); |
| 252 | test(S("abcde" ), 0, S("12345" ), 1, 5, S("2345abcde" )); |
| 253 | test(S("abcde" ), 0, S("12345" ), 2, 0, S("abcde" )); |
| 254 | test(S("abcde" ), 0, S("12345" ), 2, 1, S("3abcde" )); |
| 255 | test(S("abcde" ), 0, S("12345" ), 2, 2, S("34abcde" )); |
| 256 | test(S("abcde" ), 0, S("12345" ), 2, 3, S("345abcde" )); |
| 257 | test(S("abcde" ), 0, S("12345" ), 2, 4, S("345abcde" )); |
| 258 | test(S("abcde" ), 0, S("12345" ), 4, 0, S("abcde" )); |
| 259 | test(S("abcde" ), 0, S("12345" ), 4, 1, S("5abcde" )); |
| 260 | test(S("abcde" ), 0, S("12345" ), 4, 2, S("5abcde" )); |
| 261 | test(S("abcde" ), 0, S("12345" ), 5, 0, S("abcde" )); |
| 262 | test(S("abcde" ), 0, S("12345" ), 5, 1, S("abcde" )); |
| 263 | test(S("abcde" ), 0, S("12345" ), 6, 0, S("can't happen" )); |
| 264 | test(S("abcde" ), 0, S("1234567890" ), 0, 0, S("abcde" )); |
| 265 | test(S("abcde" ), 0, S("1234567890" ), 0, 1, S("1abcde" )); |
| 266 | test(S("abcde" ), 0, S("1234567890" ), 0, 5, S("12345abcde" )); |
| 267 | test(S("abcde" ), 0, S("1234567890" ), 0, 9, S("123456789abcde" )); |
| 268 | test(S("abcde" ), 0, S("1234567890" ), 0, 10, S("1234567890abcde" )); |
| 269 | test(S("abcde" ), 0, S("1234567890" ), 0, 11, S("1234567890abcde" )); |
| 270 | test(S("abcde" ), 0, S("1234567890" ), 1, 0, S("abcde" )); |
| 271 | test(S("abcde" ), 0, S("1234567890" ), 1, 1, S("2abcde" )); |
| 272 | test(S("abcde" ), 0, S("1234567890" ), 1, 4, S("2345abcde" )); |
| 273 | test(S("abcde" ), 0, S("1234567890" ), 1, 8, S("23456789abcde" )); |
| 274 | test(S("abcde" ), 0, S("1234567890" ), 1, 9, S("234567890abcde" )); |
| 275 | test(S("abcde" ), 0, S("1234567890" ), 1, 10, S("234567890abcde" )); |
| 276 | test(S("abcde" ), 0, S("1234567890" ), 5, 0, S("abcde" )); |
| 277 | test(S("abcde" ), 0, S("1234567890" ), 5, 1, S("6abcde" )); |
| 278 | test(S("abcde" ), 0, S("1234567890" ), 5, 2, S("67abcde" )); |
| 279 | test(S("abcde" ), 0, S("1234567890" ), 5, 4, S("6789abcde" )); |
| 280 | test(S("abcde" ), 0, S("1234567890" ), 5, 5, S("67890abcde" )); |
| 281 | test(S("abcde" ), 0, S("1234567890" ), 5, 6, S("67890abcde" )); |
| 282 | test(S("abcde" ), 0, S("1234567890" ), 9, 0, S("abcde" )); |
| 283 | test(S("abcde" ), 0, S("1234567890" ), 9, 1, S("0abcde" )); |
| 284 | test(S("abcde" ), 0, S("1234567890" ), 9, 2, S("0abcde" )); |
| 285 | test(S("abcde" ), 0, S("1234567890" ), 10, 0, S("abcde" )); |
| 286 | test(S("abcde" ), 0, S("1234567890" ), 10, 1, S("abcde" )); |
| 287 | test(S("abcde" ), 0, S("1234567890" ), 11, 0, S("can't happen" )); |
| 288 | test(S("abcde" ), 0, S("12345678901234567890" ), 0, 0, S("abcde" )); |
| 289 | test(S("abcde" ), 0, S("12345678901234567890" ), 0, 1, S("1abcde" )); |
| 290 | |
| 291 | return true; |
| 292 | } |
| 293 | |
| 294 | template <class S> |
| 295 | TEST_CONSTEXPR_CXX20 bool test4() { |
| 296 | test(S("abcde" ), 0, S("12345678901234567890" ), 0, 10, S("1234567890abcde" )); |
| 297 | test(S("abcde" ), 0, S("12345678901234567890" ), 0, 19, S("1234567890123456789abcde" )); |
| 298 | test(S("abcde" ), 0, S("12345678901234567890" ), 0, 20, S("12345678901234567890abcde" )); |
| 299 | test(S("abcde" ), 0, S("12345678901234567890" ), 0, 21, S("12345678901234567890abcde" )); |
| 300 | test(S("abcde" ), 0, S("12345678901234567890" ), 1, 0, S("abcde" )); |
| 301 | test(S("abcde" ), 0, S("12345678901234567890" ), 1, 1, S("2abcde" )); |
| 302 | test(S("abcde" ), 0, S("12345678901234567890" ), 1, 9, S("234567890abcde" )); |
| 303 | test(S("abcde" ), 0, S("12345678901234567890" ), 1, 18, S("234567890123456789abcde" )); |
| 304 | test(S("abcde" ), 0, S("12345678901234567890" ), 1, 19, S("2345678901234567890abcde" )); |
| 305 | test(S("abcde" ), 0, S("12345678901234567890" ), 1, 20, S("2345678901234567890abcde" )); |
| 306 | test(S("abcde" ), 0, S("12345678901234567890" ), 10, 0, S("abcde" )); |
| 307 | test(S("abcde" ), 0, S("12345678901234567890" ), 10, 1, S("1abcde" )); |
| 308 | test(S("abcde" ), 0, S("12345678901234567890" ), 10, 5, S("12345abcde" )); |
| 309 | test(S("abcde" ), 0, S("12345678901234567890" ), 10, 9, S("123456789abcde" )); |
| 310 | test(S("abcde" ), 0, S("12345678901234567890" ), 10, 10, S("1234567890abcde" )); |
| 311 | test(S("abcde" ), 0, S("12345678901234567890" ), 10, 11, S("1234567890abcde" )); |
| 312 | test(S("abcde" ), 0, S("12345678901234567890" ), 19, 0, S("abcde" )); |
| 313 | test(S("abcde" ), 0, S("12345678901234567890" ), 19, 1, S("0abcde" )); |
| 314 | test(S("abcde" ), 0, S("12345678901234567890" ), 19, 2, S("0abcde" )); |
| 315 | test(S("abcde" ), 0, S("12345678901234567890" ), 20, 0, S("abcde" )); |
| 316 | test(S("abcde" ), 0, S("12345678901234567890" ), 20, 1, S("abcde" )); |
| 317 | test(S("abcde" ), 0, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 318 | test(S("abcde" ), 1, S("" ), 0, 0, S("abcde" )); |
| 319 | test(S("abcde" ), 1, S("" ), 0, 1, S("abcde" )); |
| 320 | test(S("abcde" ), 1, S("" ), 1, 0, S("can't happen" )); |
| 321 | test(S("abcde" ), 1, S("12345" ), 0, 0, S("abcde" )); |
| 322 | test(S("abcde" ), 1, S("12345" ), 0, 1, S("a1bcde" )); |
| 323 | test(S("abcde" ), 1, S("12345" ), 0, 2, S("a12bcde" )); |
| 324 | test(S("abcde" ), 1, S("12345" ), 0, 4, S("a1234bcde" )); |
| 325 | test(S("abcde" ), 1, S("12345" ), 0, 5, S("a12345bcde" )); |
| 326 | test(S("abcde" ), 1, S("12345" ), 0, 6, S("a12345bcde" )); |
| 327 | test(S("abcde" ), 1, S("12345" ), 1, 0, S("abcde" )); |
| 328 | test(S("abcde" ), 1, S("12345" ), 1, 1, S("a2bcde" )); |
| 329 | test(S("abcde" ), 1, S("12345" ), 1, 2, S("a23bcde" )); |
| 330 | test(S("abcde" ), 1, S("12345" ), 1, 3, S("a234bcde" )); |
| 331 | test(S("abcde" ), 1, S("12345" ), 1, 4, S("a2345bcde" )); |
| 332 | test(S("abcde" ), 1, S("12345" ), 1, 5, S("a2345bcde" )); |
| 333 | test(S("abcde" ), 1, S("12345" ), 2, 0, S("abcde" )); |
| 334 | test(S("abcde" ), 1, S("12345" ), 2, 1, S("a3bcde" )); |
| 335 | test(S("abcde" ), 1, S("12345" ), 2, 2, S("a34bcde" )); |
| 336 | test(S("abcde" ), 1, S("12345" ), 2, 3, S("a345bcde" )); |
| 337 | test(S("abcde" ), 1, S("12345" ), 2, 4, S("a345bcde" )); |
| 338 | test(S("abcde" ), 1, S("12345" ), 4, 0, S("abcde" )); |
| 339 | test(S("abcde" ), 1, S("12345" ), 4, 1, S("a5bcde" )); |
| 340 | test(S("abcde" ), 1, S("12345" ), 4, 2, S("a5bcde" )); |
| 341 | test(S("abcde" ), 1, S("12345" ), 5, 0, S("abcde" )); |
| 342 | test(S("abcde" ), 1, S("12345" ), 5, 1, S("abcde" )); |
| 343 | test(S("abcde" ), 1, S("12345" ), 6, 0, S("can't happen" )); |
| 344 | test(S("abcde" ), 1, S("1234567890" ), 0, 0, S("abcde" )); |
| 345 | test(S("abcde" ), 1, S("1234567890" ), 0, 1, S("a1bcde" )); |
| 346 | |
| 347 | return true; |
| 348 | } |
| 349 | |
| 350 | template <class S> |
| 351 | TEST_CONSTEXPR_CXX20 bool test5() { |
| 352 | test(S("abcde" ), 1, S("1234567890" ), 0, 5, S("a12345bcde" )); |
| 353 | test(S("abcde" ), 1, S("1234567890" ), 0, 9, S("a123456789bcde" )); |
| 354 | test(S("abcde" ), 1, S("1234567890" ), 0, 10, S("a1234567890bcde" )); |
| 355 | test(S("abcde" ), 1, S("1234567890" ), 0, 11, S("a1234567890bcde" )); |
| 356 | test(S("abcde" ), 1, S("1234567890" ), 1, 0, S("abcde" )); |
| 357 | test(S("abcde" ), 1, S("1234567890" ), 1, 1, S("a2bcde" )); |
| 358 | test(S("abcde" ), 1, S("1234567890" ), 1, 4, S("a2345bcde" )); |
| 359 | test(S("abcde" ), 1, S("1234567890" ), 1, 8, S("a23456789bcde" )); |
| 360 | test(S("abcde" ), 1, S("1234567890" ), 1, 9, S("a234567890bcde" )); |
| 361 | test(S("abcde" ), 1, S("1234567890" ), 1, 10, S("a234567890bcde" )); |
| 362 | test(S("abcde" ), 1, S("1234567890" ), 5, 0, S("abcde" )); |
| 363 | test(S("abcde" ), 1, S("1234567890" ), 5, 1, S("a6bcde" )); |
| 364 | test(S("abcde" ), 1, S("1234567890" ), 5, 2, S("a67bcde" )); |
| 365 | test(S("abcde" ), 1, S("1234567890" ), 5, 4, S("a6789bcde" )); |
| 366 | test(S("abcde" ), 1, S("1234567890" ), 5, 5, S("a67890bcde" )); |
| 367 | test(S("abcde" ), 1, S("1234567890" ), 5, 6, S("a67890bcde" )); |
| 368 | test(S("abcde" ), 1, S("1234567890" ), 9, 0, S("abcde" )); |
| 369 | test(S("abcde" ), 1, S("1234567890" ), 9, 1, S("a0bcde" )); |
| 370 | test(S("abcde" ), 1, S("1234567890" ), 9, 2, S("a0bcde" )); |
| 371 | test(S("abcde" ), 1, S("1234567890" ), 10, 0, S("abcde" )); |
| 372 | test(S("abcde" ), 1, S("1234567890" ), 10, 1, S("abcde" )); |
| 373 | test(S("abcde" ), 1, S("1234567890" ), 11, 0, S("can't happen" )); |
| 374 | test(S("abcde" ), 1, S("12345678901234567890" ), 0, 0, S("abcde" )); |
| 375 | test(S("abcde" ), 1, S("12345678901234567890" ), 0, 1, S("a1bcde" )); |
| 376 | test(S("abcde" ), 1, S("12345678901234567890" ), 0, 10, S("a1234567890bcde" )); |
| 377 | test(S("abcde" ), 1, S("12345678901234567890" ), 0, 19, S("a1234567890123456789bcde" )); |
| 378 | test(S("abcde" ), 1, S("12345678901234567890" ), 0, 20, S("a12345678901234567890bcde" )); |
| 379 | test(S("abcde" ), 1, S("12345678901234567890" ), 0, 21, S("a12345678901234567890bcde" )); |
| 380 | test(S("abcde" ), 1, S("12345678901234567890" ), 1, 0, S("abcde" )); |
| 381 | test(S("abcde" ), 1, S("12345678901234567890" ), 1, 1, S("a2bcde" )); |
| 382 | test(S("abcde" ), 1, S("12345678901234567890" ), 1, 9, S("a234567890bcde" )); |
| 383 | test(S("abcde" ), 1, S("12345678901234567890" ), 1, 18, S("a234567890123456789bcde" )); |
| 384 | test(S("abcde" ), 1, S("12345678901234567890" ), 1, 19, S("a2345678901234567890bcde" )); |
| 385 | test(S("abcde" ), 1, S("12345678901234567890" ), 1, 20, S("a2345678901234567890bcde" )); |
| 386 | test(S("abcde" ), 1, S("12345678901234567890" ), 10, 0, S("abcde" )); |
| 387 | test(S("abcde" ), 1, S("12345678901234567890" ), 10, 1, S("a1bcde" )); |
| 388 | test(S("abcde" ), 1, S("12345678901234567890" ), 10, 5, S("a12345bcde" )); |
| 389 | test(S("abcde" ), 1, S("12345678901234567890" ), 10, 9, S("a123456789bcde" )); |
| 390 | test(S("abcde" ), 1, S("12345678901234567890" ), 10, 10, S("a1234567890bcde" )); |
| 391 | test(S("abcde" ), 1, S("12345678901234567890" ), 10, 11, S("a1234567890bcde" )); |
| 392 | test(S("abcde" ), 1, S("12345678901234567890" ), 19, 0, S("abcde" )); |
| 393 | test(S("abcde" ), 1, S("12345678901234567890" ), 19, 1, S("a0bcde" )); |
| 394 | test(S("abcde" ), 1, S("12345678901234567890" ), 19, 2, S("a0bcde" )); |
| 395 | test(S("abcde" ), 1, S("12345678901234567890" ), 20, 0, S("abcde" )); |
| 396 | test(S("abcde" ), 1, S("12345678901234567890" ), 20, 1, S("abcde" )); |
| 397 | test(S("abcde" ), 1, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 398 | test(S("abcde" ), 2, S("" ), 0, 0, S("abcde" )); |
| 399 | test(S("abcde" ), 2, S("" ), 0, 1, S("abcde" )); |
| 400 | test(S("abcde" ), 2, S("" ), 1, 0, S("can't happen" )); |
| 401 | test(S("abcde" ), 2, S("12345" ), 0, 0, S("abcde" )); |
| 402 | |
| 403 | return true; |
| 404 | } |
| 405 | |
| 406 | template <class S> |
| 407 | TEST_CONSTEXPR_CXX20 bool test6() { |
| 408 | test(S("abcde" ), 2, S("12345" ), 0, 1, S("ab1cde" )); |
| 409 | test(S("abcde" ), 2, S("12345" ), 0, 2, S("ab12cde" )); |
| 410 | test(S("abcde" ), 2, S("12345" ), 0, 4, S("ab1234cde" )); |
| 411 | test(S("abcde" ), 2, S("12345" ), 0, 5, S("ab12345cde" )); |
| 412 | test(S("abcde" ), 2, S("12345" ), 0, 6, S("ab12345cde" )); |
| 413 | test(S("abcde" ), 2, S("12345" ), 1, 0, S("abcde" )); |
| 414 | test(S("abcde" ), 2, S("12345" ), 1, 1, S("ab2cde" )); |
| 415 | test(S("abcde" ), 2, S("12345" ), 1, 2, S("ab23cde" )); |
| 416 | test(S("abcde" ), 2, S("12345" ), 1, 3, S("ab234cde" )); |
| 417 | test(S("abcde" ), 2, S("12345" ), 1, 4, S("ab2345cde" )); |
| 418 | test(S("abcde" ), 2, S("12345" ), 1, 5, S("ab2345cde" )); |
| 419 | test(S("abcde" ), 2, S("12345" ), 2, 0, S("abcde" )); |
| 420 | test(S("abcde" ), 2, S("12345" ), 2, 1, S("ab3cde" )); |
| 421 | test(S("abcde" ), 2, S("12345" ), 2, 2, S("ab34cde" )); |
| 422 | test(S("abcde" ), 2, S("12345" ), 2, 3, S("ab345cde" )); |
| 423 | test(S("abcde" ), 2, S("12345" ), 2, 4, S("ab345cde" )); |
| 424 | test(S("abcde" ), 2, S("12345" ), 4, 0, S("abcde" )); |
| 425 | test(S("abcde" ), 2, S("12345" ), 4, 1, S("ab5cde" )); |
| 426 | test(S("abcde" ), 2, S("12345" ), 4, 2, S("ab5cde" )); |
| 427 | test(S("abcde" ), 2, S("12345" ), 5, 0, S("abcde" )); |
| 428 | test(S("abcde" ), 2, S("12345" ), 5, 1, S("abcde" )); |
| 429 | test(S("abcde" ), 2, S("12345" ), 6, 0, S("can't happen" )); |
| 430 | test(S("abcde" ), 2, S("1234567890" ), 0, 0, S("abcde" )); |
| 431 | test(S("abcde" ), 2, S("1234567890" ), 0, 1, S("ab1cde" )); |
| 432 | test(S("abcde" ), 2, S("1234567890" ), 0, 5, S("ab12345cde" )); |
| 433 | test(S("abcde" ), 2, S("1234567890" ), 0, 9, S("ab123456789cde" )); |
| 434 | test(S("abcde" ), 2, S("1234567890" ), 0, 10, S("ab1234567890cde" )); |
| 435 | test(S("abcde" ), 2, S("1234567890" ), 0, 11, S("ab1234567890cde" )); |
| 436 | test(S("abcde" ), 2, S("1234567890" ), 1, 0, S("abcde" )); |
| 437 | test(S("abcde" ), 2, S("1234567890" ), 1, 1, S("ab2cde" )); |
| 438 | test(S("abcde" ), 2, S("1234567890" ), 1, 4, S("ab2345cde" )); |
| 439 | test(S("abcde" ), 2, S("1234567890" ), 1, 8, S("ab23456789cde" )); |
| 440 | test(S("abcde" ), 2, S("1234567890" ), 1, 9, S("ab234567890cde" )); |
| 441 | test(S("abcde" ), 2, S("1234567890" ), 1, 10, S("ab234567890cde" )); |
| 442 | test(S("abcde" ), 2, S("1234567890" ), 5, 0, S("abcde" )); |
| 443 | test(S("abcde" ), 2, S("1234567890" ), 5, 1, S("ab6cde" )); |
| 444 | test(S("abcde" ), 2, S("1234567890" ), 5, 2, S("ab67cde" )); |
| 445 | test(S("abcde" ), 2, S("1234567890" ), 5, 4, S("ab6789cde" )); |
| 446 | test(S("abcde" ), 2, S("1234567890" ), 5, 5, S("ab67890cde" )); |
| 447 | test(S("abcde" ), 2, S("1234567890" ), 5, 6, S("ab67890cde" )); |
| 448 | test(S("abcde" ), 2, S("1234567890" ), 9, 0, S("abcde" )); |
| 449 | test(S("abcde" ), 2, S("1234567890" ), 9, 1, S("ab0cde" )); |
| 450 | test(S("abcde" ), 2, S("1234567890" ), 9, 2, S("ab0cde" )); |
| 451 | test(S("abcde" ), 2, S("1234567890" ), 10, 0, S("abcde" )); |
| 452 | test(S("abcde" ), 2, S("1234567890" ), 10, 1, S("abcde" )); |
| 453 | test(S("abcde" ), 2, S("1234567890" ), 11, 0, S("can't happen" )); |
| 454 | test(S("abcde" ), 2, S("12345678901234567890" ), 0, 0, S("abcde" )); |
| 455 | test(S("abcde" ), 2, S("12345678901234567890" ), 0, 1, S("ab1cde" )); |
| 456 | test(S("abcde" ), 2, S("12345678901234567890" ), 0, 10, S("ab1234567890cde" )); |
| 457 | test(S("abcde" ), 2, S("12345678901234567890" ), 0, 19, S("ab1234567890123456789cde" )); |
| 458 | |
| 459 | return true; |
| 460 | } |
| 461 | |
| 462 | template <class S> |
| 463 | TEST_CONSTEXPR_CXX20 bool test7() { |
| 464 | test(S("abcde" ), 2, S("12345678901234567890" ), 0, 20, S("ab12345678901234567890cde" )); |
| 465 | test(S("abcde" ), 2, S("12345678901234567890" ), 0, 21, S("ab12345678901234567890cde" )); |
| 466 | test(S("abcde" ), 2, S("12345678901234567890" ), 1, 0, S("abcde" )); |
| 467 | test(S("abcde" ), 2, S("12345678901234567890" ), 1, 1, S("ab2cde" )); |
| 468 | test(S("abcde" ), 2, S("12345678901234567890" ), 1, 9, S("ab234567890cde" )); |
| 469 | test(S("abcde" ), 2, S("12345678901234567890" ), 1, 18, S("ab234567890123456789cde" )); |
| 470 | test(S("abcde" ), 2, S("12345678901234567890" ), 1, 19, S("ab2345678901234567890cde" )); |
| 471 | test(S("abcde" ), 2, S("12345678901234567890" ), 1, 20, S("ab2345678901234567890cde" )); |
| 472 | test(S("abcde" ), 2, S("12345678901234567890" ), 10, 0, S("abcde" )); |
| 473 | test(S("abcde" ), 2, S("12345678901234567890" ), 10, 1, S("ab1cde" )); |
| 474 | test(S("abcde" ), 2, S("12345678901234567890" ), 10, 5, S("ab12345cde" )); |
| 475 | test(S("abcde" ), 2, S("12345678901234567890" ), 10, 9, S("ab123456789cde" )); |
| 476 | test(S("abcde" ), 2, S("12345678901234567890" ), 10, 10, S("ab1234567890cde" )); |
| 477 | test(S("abcde" ), 2, S("12345678901234567890" ), 10, 11, S("ab1234567890cde" )); |
| 478 | test(S("abcde" ), 2, S("12345678901234567890" ), 19, 0, S("abcde" )); |
| 479 | test(S("abcde" ), 2, S("12345678901234567890" ), 19, 1, S("ab0cde" )); |
| 480 | test(S("abcde" ), 2, S("12345678901234567890" ), 19, 2, S("ab0cde" )); |
| 481 | test(S("abcde" ), 2, S("12345678901234567890" ), 20, 0, S("abcde" )); |
| 482 | test(S("abcde" ), 2, S("12345678901234567890" ), 20, 1, S("abcde" )); |
| 483 | test(S("abcde" ), 2, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 484 | test(S("abcde" ), 4, S("" ), 0, 0, S("abcde" )); |
| 485 | test(S("abcde" ), 4, S("" ), 0, 1, S("abcde" )); |
| 486 | test(S("abcde" ), 4, S("" ), 1, 0, S("can't happen" )); |
| 487 | test(S("abcde" ), 4, S("12345" ), 0, 0, S("abcde" )); |
| 488 | test(S("abcde" ), 4, S("12345" ), 0, 1, S("abcd1e" )); |
| 489 | test(S("abcde" ), 4, S("12345" ), 0, 2, S("abcd12e" )); |
| 490 | test(S("abcde" ), 4, S("12345" ), 0, 4, S("abcd1234e" )); |
| 491 | test(S("abcde" ), 4, S("12345" ), 0, 5, S("abcd12345e" )); |
| 492 | test(S("abcde" ), 4, S("12345" ), 0, 6, S("abcd12345e" )); |
| 493 | test(S("abcde" ), 4, S("12345" ), 1, 0, S("abcde" )); |
| 494 | test(S("abcde" ), 4, S("12345" ), 1, 1, S("abcd2e" )); |
| 495 | test(S("abcde" ), 4, S("12345" ), 1, 2, S("abcd23e" )); |
| 496 | test(S("abcde" ), 4, S("12345" ), 1, 3, S("abcd234e" )); |
| 497 | test(S("abcde" ), 4, S("12345" ), 1, 4, S("abcd2345e" )); |
| 498 | test(S("abcde" ), 4, S("12345" ), 1, 5, S("abcd2345e" )); |
| 499 | test(S("abcde" ), 4, S("12345" ), 2, 0, S("abcde" )); |
| 500 | test(S("abcde" ), 4, S("12345" ), 2, 1, S("abcd3e" )); |
| 501 | test(S("abcde" ), 4, S("12345" ), 2, 2, S("abcd34e" )); |
| 502 | test(S("abcde" ), 4, S("12345" ), 2, 3, S("abcd345e" )); |
| 503 | test(S("abcde" ), 4, S("12345" ), 2, 4, S("abcd345e" )); |
| 504 | test(S("abcde" ), 4, S("12345" ), 4, 0, S("abcde" )); |
| 505 | test(S("abcde" ), 4, S("12345" ), 4, 1, S("abcd5e" )); |
| 506 | test(S("abcde" ), 4, S("12345" ), 4, 2, S("abcd5e" )); |
| 507 | test(S("abcde" ), 4, S("12345" ), 5, 0, S("abcde" )); |
| 508 | test(S("abcde" ), 4, S("12345" ), 5, 1, S("abcde" )); |
| 509 | test(S("abcde" ), 4, S("12345" ), 6, 0, S("can't happen" )); |
| 510 | test(S("abcde" ), 4, S("1234567890" ), 0, 0, S("abcde" )); |
| 511 | test(S("abcde" ), 4, S("1234567890" ), 0, 1, S("abcd1e" )); |
| 512 | test(S("abcde" ), 4, S("1234567890" ), 0, 5, S("abcd12345e" )); |
| 513 | test(S("abcde" ), 4, S("1234567890" ), 0, 9, S("abcd123456789e" )); |
| 514 | |
| 515 | return true; |
| 516 | } |
| 517 | |
| 518 | template <class S> |
| 519 | TEST_CONSTEXPR_CXX20 bool test8() { |
| 520 | test(S("abcde" ), 4, S("1234567890" ), 0, 10, S("abcd1234567890e" )); |
| 521 | test(S("abcde" ), 4, S("1234567890" ), 0, 11, S("abcd1234567890e" )); |
| 522 | test(S("abcde" ), 4, S("1234567890" ), 1, 0, S("abcde" )); |
| 523 | test(S("abcde" ), 4, S("1234567890" ), 1, 1, S("abcd2e" )); |
| 524 | test(S("abcde" ), 4, S("1234567890" ), 1, 4, S("abcd2345e" )); |
| 525 | test(S("abcde" ), 4, S("1234567890" ), 1, 8, S("abcd23456789e" )); |
| 526 | test(S("abcde" ), 4, S("1234567890" ), 1, 9, S("abcd234567890e" )); |
| 527 | test(S("abcde" ), 4, S("1234567890" ), 1, 10, S("abcd234567890e" )); |
| 528 | test(S("abcde" ), 4, S("1234567890" ), 5, 0, S("abcde" )); |
| 529 | test(S("abcde" ), 4, S("1234567890" ), 5, 1, S("abcd6e" )); |
| 530 | test(S("abcde" ), 4, S("1234567890" ), 5, 2, S("abcd67e" )); |
| 531 | test(S("abcde" ), 4, S("1234567890" ), 5, 4, S("abcd6789e" )); |
| 532 | test(S("abcde" ), 4, S("1234567890" ), 5, 5, S("abcd67890e" )); |
| 533 | test(S("abcde" ), 4, S("1234567890" ), 5, 6, S("abcd67890e" )); |
| 534 | test(S("abcde" ), 4, S("1234567890" ), 9, 0, S("abcde" )); |
| 535 | test(S("abcde" ), 4, S("1234567890" ), 9, 1, S("abcd0e" )); |
| 536 | test(S("abcde" ), 4, S("1234567890" ), 9, 2, S("abcd0e" )); |
| 537 | test(S("abcde" ), 4, S("1234567890" ), 10, 0, S("abcde" )); |
| 538 | test(S("abcde" ), 4, S("1234567890" ), 10, 1, S("abcde" )); |
| 539 | test(S("abcde" ), 4, S("1234567890" ), 11, 0, S("can't happen" )); |
| 540 | test(S("abcde" ), 4, S("12345678901234567890" ), 0, 0, S("abcde" )); |
| 541 | test(S("abcde" ), 4, S("12345678901234567890" ), 0, 1, S("abcd1e" )); |
| 542 | test(S("abcde" ), 4, S("12345678901234567890" ), 0, 10, S("abcd1234567890e" )); |
| 543 | test(S("abcde" ), 4, S("12345678901234567890" ), 0, 19, S("abcd1234567890123456789e" )); |
| 544 | test(S("abcde" ), 4, S("12345678901234567890" ), 0, 20, S("abcd12345678901234567890e" )); |
| 545 | test(S("abcde" ), 4, S("12345678901234567890" ), 0, 21, S("abcd12345678901234567890e" )); |
| 546 | test(S("abcde" ), 4, S("12345678901234567890" ), 1, 0, S("abcde" )); |
| 547 | test(S("abcde" ), 4, S("12345678901234567890" ), 1, 1, S("abcd2e" )); |
| 548 | test(S("abcde" ), 4, S("12345678901234567890" ), 1, 9, S("abcd234567890e" )); |
| 549 | test(S("abcde" ), 4, S("12345678901234567890" ), 1, 18, S("abcd234567890123456789e" )); |
| 550 | test(S("abcde" ), 4, S("12345678901234567890" ), 1, 19, S("abcd2345678901234567890e" )); |
| 551 | test(S("abcde" ), 4, S("12345678901234567890" ), 1, 20, S("abcd2345678901234567890e" )); |
| 552 | test(S("abcde" ), 4, S("12345678901234567890" ), 10, 0, S("abcde" )); |
| 553 | test(S("abcde" ), 4, S("12345678901234567890" ), 10, 1, S("abcd1e" )); |
| 554 | test(S("abcde" ), 4, S("12345678901234567890" ), 10, 5, S("abcd12345e" )); |
| 555 | test(S("abcde" ), 4, S("12345678901234567890" ), 10, 9, S("abcd123456789e" )); |
| 556 | test(S("abcde" ), 4, S("12345678901234567890" ), 10, 10, S("abcd1234567890e" )); |
| 557 | test(S("abcde" ), 4, S("12345678901234567890" ), 10, 11, S("abcd1234567890e" )); |
| 558 | test(S("abcde" ), 4, S("12345678901234567890" ), 19, 0, S("abcde" )); |
| 559 | test(S("abcde" ), 4, S("12345678901234567890" ), 19, 1, S("abcd0e" )); |
| 560 | test(S("abcde" ), 4, S("12345678901234567890" ), 19, 2, S("abcd0e" )); |
| 561 | test(S("abcde" ), 4, S("12345678901234567890" ), 20, 0, S("abcde" )); |
| 562 | test(S("abcde" ), 4, S("12345678901234567890" ), 20, 1, S("abcde" )); |
| 563 | test(S("abcde" ), 4, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 564 | test(S("abcde" ), 5, S("" ), 0, 0, S("abcde" )); |
| 565 | test(S("abcde" ), 5, S("" ), 0, 1, S("abcde" )); |
| 566 | test(S("abcde" ), 5, S("" ), 1, 0, S("can't happen" )); |
| 567 | test(S("abcde" ), 5, S("12345" ), 0, 0, S("abcde" )); |
| 568 | test(S("abcde" ), 5, S("12345" ), 0, 1, S("abcde1" )); |
| 569 | test(S("abcde" ), 5, S("12345" ), 0, 2, S("abcde12" )); |
| 570 | |
| 571 | return true; |
| 572 | } |
| 573 | |
| 574 | template <class S> |
| 575 | TEST_CONSTEXPR_CXX20 bool test9() { |
| 576 | test(S("abcde" ), 5, S("12345" ), 0, 4, S("abcde1234" )); |
| 577 | test(S("abcde" ), 5, S("12345" ), 0, 5, S("abcde12345" )); |
| 578 | test(S("abcde" ), 5, S("12345" ), 0, 6, S("abcde12345" )); |
| 579 | test(S("abcde" ), 5, S("12345" ), 1, 0, S("abcde" )); |
| 580 | test(S("abcde" ), 5, S("12345" ), 1, 1, S("abcde2" )); |
| 581 | test(S("abcde" ), 5, S("12345" ), 1, 2, S("abcde23" )); |
| 582 | test(S("abcde" ), 5, S("12345" ), 1, 3, S("abcde234" )); |
| 583 | test(S("abcde" ), 5, S("12345" ), 1, 4, S("abcde2345" )); |
| 584 | test(S("abcde" ), 5, S("12345" ), 1, 5, S("abcde2345" )); |
| 585 | test(S("abcde" ), 5, S("12345" ), 2, 0, S("abcde" )); |
| 586 | test(S("abcde" ), 5, S("12345" ), 2, 1, S("abcde3" )); |
| 587 | test(S("abcde" ), 5, S("12345" ), 2, 2, S("abcde34" )); |
| 588 | test(S("abcde" ), 5, S("12345" ), 2, 3, S("abcde345" )); |
| 589 | test(S("abcde" ), 5, S("12345" ), 2, 4, S("abcde345" )); |
| 590 | test(S("abcde" ), 5, S("12345" ), 4, 0, S("abcde" )); |
| 591 | test(S("abcde" ), 5, S("12345" ), 4, 1, S("abcde5" )); |
| 592 | test(S("abcde" ), 5, S("12345" ), 4, 2, S("abcde5" )); |
| 593 | test(S("abcde" ), 5, S("12345" ), 5, 0, S("abcde" )); |
| 594 | test(S("abcde" ), 5, S("12345" ), 5, 1, S("abcde" )); |
| 595 | test(S("abcde" ), 5, S("12345" ), 6, 0, S("can't happen" )); |
| 596 | test(S("abcde" ), 5, S("1234567890" ), 0, 0, S("abcde" )); |
| 597 | test(S("abcde" ), 5, S("1234567890" ), 0, 1, S("abcde1" )); |
| 598 | test(S("abcde" ), 5, S("1234567890" ), 0, 5, S("abcde12345" )); |
| 599 | test(S("abcde" ), 5, S("1234567890" ), 0, 9, S("abcde123456789" )); |
| 600 | test(S("abcde" ), 5, S("1234567890" ), 0, 10, S("abcde1234567890" )); |
| 601 | test(S("abcde" ), 5, S("1234567890" ), 0, 11, S("abcde1234567890" )); |
| 602 | test(S("abcde" ), 5, S("1234567890" ), 1, 0, S("abcde" )); |
| 603 | test(S("abcde" ), 5, S("1234567890" ), 1, 1, S("abcde2" )); |
| 604 | test(S("abcde" ), 5, S("1234567890" ), 1, 4, S("abcde2345" )); |
| 605 | test(S("abcde" ), 5, S("1234567890" ), 1, 8, S("abcde23456789" )); |
| 606 | test(S("abcde" ), 5, S("1234567890" ), 1, 9, S("abcde234567890" )); |
| 607 | test(S("abcde" ), 5, S("1234567890" ), 1, 10, S("abcde234567890" )); |
| 608 | test(S("abcde" ), 5, S("1234567890" ), 5, 0, S("abcde" )); |
| 609 | test(S("abcde" ), 5, S("1234567890" ), 5, 1, S("abcde6" )); |
| 610 | test(S("abcde" ), 5, S("1234567890" ), 5, 2, S("abcde67" )); |
| 611 | test(S("abcde" ), 5, S("1234567890" ), 5, 4, S("abcde6789" )); |
| 612 | test(S("abcde" ), 5, S("1234567890" ), 5, 5, S("abcde67890" )); |
| 613 | test(S("abcde" ), 5, S("1234567890" ), 5, 6, S("abcde67890" )); |
| 614 | test(S("abcde" ), 5, S("1234567890" ), 9, 0, S("abcde" )); |
| 615 | test(S("abcde" ), 5, S("1234567890" ), 9, 1, S("abcde0" )); |
| 616 | test(S("abcde" ), 5, S("1234567890" ), 9, 2, S("abcde0" )); |
| 617 | test(S("abcde" ), 5, S("1234567890" ), 10, 0, S("abcde" )); |
| 618 | test(S("abcde" ), 5, S("1234567890" ), 10, 1, S("abcde" )); |
| 619 | test(S("abcde" ), 5, S("1234567890" ), 11, 0, S("can't happen" )); |
| 620 | test(S("abcde" ), 5, S("12345678901234567890" ), 0, 0, S("abcde" )); |
| 621 | test(S("abcde" ), 5, S("12345678901234567890" ), 0, 1, S("abcde1" )); |
| 622 | test(S("abcde" ), 5, S("12345678901234567890" ), 0, 10, S("abcde1234567890" )); |
| 623 | test(S("abcde" ), 5, S("12345678901234567890" ), 0, 19, S("abcde1234567890123456789" )); |
| 624 | test(S("abcde" ), 5, S("12345678901234567890" ), 0, 20, S("abcde12345678901234567890" )); |
| 625 | test(S("abcde" ), 5, S("12345678901234567890" ), 0, 21, S("abcde12345678901234567890" )); |
| 626 | |
| 627 | return true; |
| 628 | } |
| 629 | |
| 630 | template <class S> |
| 631 | TEST_CONSTEXPR_CXX20 bool test10() { |
| 632 | test(S("abcde" ), 5, S("12345678901234567890" ), 1, 0, S("abcde" )); |
| 633 | test(S("abcde" ), 5, S("12345678901234567890" ), 1, 1, S("abcde2" )); |
| 634 | test(S("abcde" ), 5, S("12345678901234567890" ), 1, 9, S("abcde234567890" )); |
| 635 | test(S("abcde" ), 5, S("12345678901234567890" ), 1, 18, S("abcde234567890123456789" )); |
| 636 | test(S("abcde" ), 5, S("12345678901234567890" ), 1, 19, S("abcde2345678901234567890" )); |
| 637 | test(S("abcde" ), 5, S("12345678901234567890" ), 1, 20, S("abcde2345678901234567890" )); |
| 638 | test(S("abcde" ), 5, S("12345678901234567890" ), 10, 0, S("abcde" )); |
| 639 | test(S("abcde" ), 5, S("12345678901234567890" ), 10, 1, S("abcde1" )); |
| 640 | test(S("abcde" ), 5, S("12345678901234567890" ), 10, 5, S("abcde12345" )); |
| 641 | test(S("abcde" ), 5, S("12345678901234567890" ), 10, 9, S("abcde123456789" )); |
| 642 | test(S("abcde" ), 5, S("12345678901234567890" ), 10, 10, S("abcde1234567890" )); |
| 643 | test(S("abcde" ), 5, S("12345678901234567890" ), 10, 11, S("abcde1234567890" )); |
| 644 | test(S("abcde" ), 5, S("12345678901234567890" ), 19, 0, S("abcde" )); |
| 645 | test(S("abcde" ), 5, S("12345678901234567890" ), 19, 1, S("abcde0" )); |
| 646 | test(S("abcde" ), 5, S("12345678901234567890" ), 19, 2, S("abcde0" )); |
| 647 | test(S("abcde" ), 5, S("12345678901234567890" ), 20, 0, S("abcde" )); |
| 648 | test(S("abcde" ), 5, S("12345678901234567890" ), 20, 1, S("abcde" )); |
| 649 | test(S("abcde" ), 5, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 650 | test(S("abcde" ), 6, S("" ), 0, 0, S("can't happen" )); |
| 651 | test(S("abcde" ), 6, S("" ), 0, 1, S("can't happen" )); |
| 652 | test(S("abcde" ), 6, S("" ), 1, 0, S("can't happen" )); |
| 653 | test(S("abcde" ), 6, S("12345" ), 0, 0, S("can't happen" )); |
| 654 | test(S("abcde" ), 6, S("12345" ), 0, 1, S("can't happen" )); |
| 655 | test(S("abcde" ), 6, S("12345" ), 0, 2, S("can't happen" )); |
| 656 | test(S("abcde" ), 6, S("12345" ), 0, 4, S("can't happen" )); |
| 657 | test(S("abcde" ), 6, S("12345" ), 0, 5, S("can't happen" )); |
| 658 | test(S("abcde" ), 6, S("12345" ), 0, 6, S("can't happen" )); |
| 659 | test(S("abcde" ), 6, S("12345" ), 1, 0, S("can't happen" )); |
| 660 | test(S("abcde" ), 6, S("12345" ), 1, 1, S("can't happen" )); |
| 661 | test(S("abcde" ), 6, S("12345" ), 1, 2, S("can't happen" )); |
| 662 | test(S("abcde" ), 6, S("12345" ), 1, 3, S("can't happen" )); |
| 663 | test(S("abcde" ), 6, S("12345" ), 1, 4, S("can't happen" )); |
| 664 | test(S("abcde" ), 6, S("12345" ), 1, 5, S("can't happen" )); |
| 665 | test(S("abcde" ), 6, S("12345" ), 2, 0, S("can't happen" )); |
| 666 | test(S("abcde" ), 6, S("12345" ), 2, 1, S("can't happen" )); |
| 667 | test(S("abcde" ), 6, S("12345" ), 2, 2, S("can't happen" )); |
| 668 | test(S("abcde" ), 6, S("12345" ), 2, 3, S("can't happen" )); |
| 669 | test(S("abcde" ), 6, S("12345" ), 2, 4, S("can't happen" )); |
| 670 | test(S("abcde" ), 6, S("12345" ), 4, 0, S("can't happen" )); |
| 671 | test(S("abcde" ), 6, S("12345" ), 4, 1, S("can't happen" )); |
| 672 | test(S("abcde" ), 6, S("12345" ), 4, 2, S("can't happen" )); |
| 673 | test(S("abcde" ), 6, S("12345" ), 5, 0, S("can't happen" )); |
| 674 | test(S("abcde" ), 6, S("12345" ), 5, 1, S("can't happen" )); |
| 675 | test(S("abcde" ), 6, S("12345" ), 6, 0, S("can't happen" )); |
| 676 | test(S("abcde" ), 6, S("1234567890" ), 0, 0, S("can't happen" )); |
| 677 | test(S("abcde" ), 6, S("1234567890" ), 0, 1, S("can't happen" )); |
| 678 | test(S("abcde" ), 6, S("1234567890" ), 0, 5, S("can't happen" )); |
| 679 | test(S("abcde" ), 6, S("1234567890" ), 0, 9, S("can't happen" )); |
| 680 | test(S("abcde" ), 6, S("1234567890" ), 0, 10, S("can't happen" )); |
| 681 | test(S("abcde" ), 6, S("1234567890" ), 0, 11, S("can't happen" )); |
| 682 | |
| 683 | return true; |
| 684 | } |
| 685 | |
| 686 | template <class S> |
| 687 | TEST_CONSTEXPR_CXX20 bool test11() { |
| 688 | test(S("abcde" ), 6, S("1234567890" ), 1, 0, S("can't happen" )); |
| 689 | test(S("abcde" ), 6, S("1234567890" ), 1, 1, S("can't happen" )); |
| 690 | test(S("abcde" ), 6, S("1234567890" ), 1, 4, S("can't happen" )); |
| 691 | test(S("abcde" ), 6, S("1234567890" ), 1, 8, S("can't happen" )); |
| 692 | test(S("abcde" ), 6, S("1234567890" ), 1, 9, S("can't happen" )); |
| 693 | test(S("abcde" ), 6, S("1234567890" ), 1, 10, S("can't happen" )); |
| 694 | test(S("abcde" ), 6, S("1234567890" ), 5, 0, S("can't happen" )); |
| 695 | test(S("abcde" ), 6, S("1234567890" ), 5, 1, S("can't happen" )); |
| 696 | test(S("abcde" ), 6, S("1234567890" ), 5, 2, S("can't happen" )); |
| 697 | test(S("abcde" ), 6, S("1234567890" ), 5, 4, S("can't happen" )); |
| 698 | test(S("abcde" ), 6, S("1234567890" ), 5, 5, S("can't happen" )); |
| 699 | test(S("abcde" ), 6, S("1234567890" ), 5, 6, S("can't happen" )); |
| 700 | test(S("abcde" ), 6, S("1234567890" ), 9, 0, S("can't happen" )); |
| 701 | test(S("abcde" ), 6, S("1234567890" ), 9, 1, S("can't happen" )); |
| 702 | test(S("abcde" ), 6, S("1234567890" ), 9, 2, S("can't happen" )); |
| 703 | test(S("abcde" ), 6, S("1234567890" ), 10, 0, S("can't happen" )); |
| 704 | test(S("abcde" ), 6, S("1234567890" ), 10, 1, S("can't happen" )); |
| 705 | test(S("abcde" ), 6, S("1234567890" ), 11, 0, S("can't happen" )); |
| 706 | test(S("abcde" ), 6, S("12345678901234567890" ), 0, 0, S("can't happen" )); |
| 707 | test(S("abcde" ), 6, S("12345678901234567890" ), 0, 1, S("can't happen" )); |
| 708 | test(S("abcde" ), 6, S("12345678901234567890" ), 0, 10, S("can't happen" )); |
| 709 | test(S("abcde" ), 6, S("12345678901234567890" ), 0, 19, S("can't happen" )); |
| 710 | test(S("abcde" ), 6, S("12345678901234567890" ), 0, 20, S("can't happen" )); |
| 711 | test(S("abcde" ), 6, S("12345678901234567890" ), 0, 21, S("can't happen" )); |
| 712 | test(S("abcde" ), 6, S("12345678901234567890" ), 1, 0, S("can't happen" )); |
| 713 | test(S("abcde" ), 6, S("12345678901234567890" ), 1, 1, S("can't happen" )); |
| 714 | test(S("abcde" ), 6, S("12345678901234567890" ), 1, 9, S("can't happen" )); |
| 715 | test(S("abcde" ), 6, S("12345678901234567890" ), 1, 18, S("can't happen" )); |
| 716 | test(S("abcde" ), 6, S("12345678901234567890" ), 1, 19, S("can't happen" )); |
| 717 | test(S("abcde" ), 6, S("12345678901234567890" ), 1, 20, S("can't happen" )); |
| 718 | test(S("abcde" ), 6, S("12345678901234567890" ), 10, 0, S("can't happen" )); |
| 719 | test(S("abcde" ), 6, S("12345678901234567890" ), 10, 1, S("can't happen" )); |
| 720 | test(S("abcde" ), 6, S("12345678901234567890" ), 10, 5, S("can't happen" )); |
| 721 | test(S("abcde" ), 6, S("12345678901234567890" ), 10, 9, S("can't happen" )); |
| 722 | test(S("abcde" ), 6, S("12345678901234567890" ), 10, 10, S("can't happen" )); |
| 723 | test(S("abcde" ), 6, S("12345678901234567890" ), 10, 11, S("can't happen" )); |
| 724 | test(S("abcde" ), 6, S("12345678901234567890" ), 19, 0, S("can't happen" )); |
| 725 | test(S("abcde" ), 6, S("12345678901234567890" ), 19, 1, S("can't happen" )); |
| 726 | test(S("abcde" ), 6, S("12345678901234567890" ), 19, 2, S("can't happen" )); |
| 727 | test(S("abcde" ), 6, S("12345678901234567890" ), 20, 0, S("can't happen" )); |
| 728 | test(S("abcde" ), 6, S("12345678901234567890" ), 20, 1, S("can't happen" )); |
| 729 | test(S("abcde" ), 6, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 730 | test(S("abcdefghij" ), 0, S("" ), 0, 0, S("abcdefghij" )); |
| 731 | test(S("abcdefghij" ), 0, S("" ), 0, 1, S("abcdefghij" )); |
| 732 | test(S("abcdefghij" ), 0, S("" ), 1, 0, S("can't happen" )); |
| 733 | test(S("abcdefghij" ), 0, S("12345" ), 0, 0, S("abcdefghij" )); |
| 734 | test(S("abcdefghij" ), 0, S("12345" ), 0, 1, S("1abcdefghij" )); |
| 735 | test(S("abcdefghij" ), 0, S("12345" ), 0, 2, S("12abcdefghij" )); |
| 736 | test(S("abcdefghij" ), 0, S("12345" ), 0, 4, S("1234abcdefghij" )); |
| 737 | test(S("abcdefghij" ), 0, S("12345" ), 0, 5, S("12345abcdefghij" )); |
| 738 | |
| 739 | return true; |
| 740 | } |
| 741 | |
| 742 | template <class S> |
| 743 | TEST_CONSTEXPR_CXX20 bool test12() { |
| 744 | test(S("abcdefghij" ), 0, S("12345" ), 0, 6, S("12345abcdefghij" )); |
| 745 | test(S("abcdefghij" ), 0, S("12345" ), 1, 0, S("abcdefghij" )); |
| 746 | test(S("abcdefghij" ), 0, S("12345" ), 1, 1, S("2abcdefghij" )); |
| 747 | test(S("abcdefghij" ), 0, S("12345" ), 1, 2, S("23abcdefghij" )); |
| 748 | test(S("abcdefghij" ), 0, S("12345" ), 1, 3, S("234abcdefghij" )); |
| 749 | test(S("abcdefghij" ), 0, S("12345" ), 1, 4, S("2345abcdefghij" )); |
| 750 | test(S("abcdefghij" ), 0, S("12345" ), 1, 5, S("2345abcdefghij" )); |
| 751 | test(S("abcdefghij" ), 0, S("12345" ), 2, 0, S("abcdefghij" )); |
| 752 | test(S("abcdefghij" ), 0, S("12345" ), 2, 1, S("3abcdefghij" )); |
| 753 | test(S("abcdefghij" ), 0, S("12345" ), 2, 2, S("34abcdefghij" )); |
| 754 | test(S("abcdefghij" ), 0, S("12345" ), 2, 3, S("345abcdefghij" )); |
| 755 | test(S("abcdefghij" ), 0, S("12345" ), 2, 4, S("345abcdefghij" )); |
| 756 | test(S("abcdefghij" ), 0, S("12345" ), 4, 0, S("abcdefghij" )); |
| 757 | test(S("abcdefghij" ), 0, S("12345" ), 4, 1, S("5abcdefghij" )); |
| 758 | test(S("abcdefghij" ), 0, S("12345" ), 4, 2, S("5abcdefghij" )); |
| 759 | test(S("abcdefghij" ), 0, S("12345" ), 5, 0, S("abcdefghij" )); |
| 760 | test(S("abcdefghij" ), 0, S("12345" ), 5, 1, S("abcdefghij" )); |
| 761 | test(S("abcdefghij" ), 0, S("12345" ), 6, 0, S("can't happen" )); |
| 762 | test(S("abcdefghij" ), 0, S("1234567890" ), 0, 0, S("abcdefghij" )); |
| 763 | test(S("abcdefghij" ), 0, S("1234567890" ), 0, 1, S("1abcdefghij" )); |
| 764 | test(S("abcdefghij" ), 0, S("1234567890" ), 0, 5, S("12345abcdefghij" )); |
| 765 | test(S("abcdefghij" ), 0, S("1234567890" ), 0, 9, S("123456789abcdefghij" )); |
| 766 | test(S("abcdefghij" ), 0, S("1234567890" ), 0, 10, S("1234567890abcdefghij" )); |
| 767 | test(S("abcdefghij" ), 0, S("1234567890" ), 0, 11, S("1234567890abcdefghij" )); |
| 768 | test(S("abcdefghij" ), 0, S("1234567890" ), 1, 0, S("abcdefghij" )); |
| 769 | test(S("abcdefghij" ), 0, S("1234567890" ), 1, 1, S("2abcdefghij" )); |
| 770 | test(S("abcdefghij" ), 0, S("1234567890" ), 1, 4, S("2345abcdefghij" )); |
| 771 | test(S("abcdefghij" ), 0, S("1234567890" ), 1, 8, S("23456789abcdefghij" )); |
| 772 | test(S("abcdefghij" ), 0, S("1234567890" ), 1, 9, S("234567890abcdefghij" )); |
| 773 | test(S("abcdefghij" ), 0, S("1234567890" ), 1, 10, S("234567890abcdefghij" )); |
| 774 | test(S("abcdefghij" ), 0, S("1234567890" ), 5, 0, S("abcdefghij" )); |
| 775 | test(S("abcdefghij" ), 0, S("1234567890" ), 5, 1, S("6abcdefghij" )); |
| 776 | test(S("abcdefghij" ), 0, S("1234567890" ), 5, 2, S("67abcdefghij" )); |
| 777 | test(S("abcdefghij" ), 0, S("1234567890" ), 5, 4, S("6789abcdefghij" )); |
| 778 | test(S("abcdefghij" ), 0, S("1234567890" ), 5, 5, S("67890abcdefghij" )); |
| 779 | test(S("abcdefghij" ), 0, S("1234567890" ), 5, 6, S("67890abcdefghij" )); |
| 780 | test(S("abcdefghij" ), 0, S("1234567890" ), 9, 0, S("abcdefghij" )); |
| 781 | test(S("abcdefghij" ), 0, S("1234567890" ), 9, 1, S("0abcdefghij" )); |
| 782 | test(S("abcdefghij" ), 0, S("1234567890" ), 9, 2, S("0abcdefghij" )); |
| 783 | test(S("abcdefghij" ), 0, S("1234567890" ), 10, 0, S("abcdefghij" )); |
| 784 | test(S("abcdefghij" ), 0, S("1234567890" ), 10, 1, S("abcdefghij" )); |
| 785 | test(S("abcdefghij" ), 0, S("1234567890" ), 11, 0, S("can't happen" )); |
| 786 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 0, 0, S("abcdefghij" )); |
| 787 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 0, 1, S("1abcdefghij" )); |
| 788 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 0, 10, S("1234567890abcdefghij" )); |
| 789 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 0, 19, S("1234567890123456789abcdefghij" )); |
| 790 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 0, 20, S("12345678901234567890abcdefghij" )); |
| 791 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 0, 21, S("12345678901234567890abcdefghij" )); |
| 792 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 1, 0, S("abcdefghij" )); |
| 793 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 1, 1, S("2abcdefghij" )); |
| 794 | |
| 795 | return true; |
| 796 | } |
| 797 | |
| 798 | template <class S> |
| 799 | TEST_CONSTEXPR_CXX20 bool test13() { |
| 800 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 1, 9, S("234567890abcdefghij" )); |
| 801 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 1, 18, S("234567890123456789abcdefghij" )); |
| 802 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 1, 19, S("2345678901234567890abcdefghij" )); |
| 803 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 1, 20, S("2345678901234567890abcdefghij" )); |
| 804 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 10, 0, S("abcdefghij" )); |
| 805 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 10, 1, S("1abcdefghij" )); |
| 806 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 10, 5, S("12345abcdefghij" )); |
| 807 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 10, 9, S("123456789abcdefghij" )); |
| 808 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 10, 10, S("1234567890abcdefghij" )); |
| 809 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 10, 11, S("1234567890abcdefghij" )); |
| 810 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 19, 0, S("abcdefghij" )); |
| 811 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 19, 1, S("0abcdefghij" )); |
| 812 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 19, 2, S("0abcdefghij" )); |
| 813 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 20, 0, S("abcdefghij" )); |
| 814 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 20, 1, S("abcdefghij" )); |
| 815 | test(S("abcdefghij" ), 0, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 816 | test(S("abcdefghij" ), 1, S("" ), 0, 0, S("abcdefghij" )); |
| 817 | test(S("abcdefghij" ), 1, S("" ), 0, 1, S("abcdefghij" )); |
| 818 | test(S("abcdefghij" ), 1, S("" ), 1, 0, S("can't happen" )); |
| 819 | test(S("abcdefghij" ), 1, S("12345" ), 0, 0, S("abcdefghij" )); |
| 820 | test(S("abcdefghij" ), 1, S("12345" ), 0, 1, S("a1bcdefghij" )); |
| 821 | test(S("abcdefghij" ), 1, S("12345" ), 0, 2, S("a12bcdefghij" )); |
| 822 | test(S("abcdefghij" ), 1, S("12345" ), 0, 4, S("a1234bcdefghij" )); |
| 823 | test(S("abcdefghij" ), 1, S("12345" ), 0, 5, S("a12345bcdefghij" )); |
| 824 | test(S("abcdefghij" ), 1, S("12345" ), 0, 6, S("a12345bcdefghij" )); |
| 825 | test(S("abcdefghij" ), 1, S("12345" ), 1, 0, S("abcdefghij" )); |
| 826 | test(S("abcdefghij" ), 1, S("12345" ), 1, 1, S("a2bcdefghij" )); |
| 827 | test(S("abcdefghij" ), 1, S("12345" ), 1, 2, S("a23bcdefghij" )); |
| 828 | test(S("abcdefghij" ), 1, S("12345" ), 1, 3, S("a234bcdefghij" )); |
| 829 | test(S("abcdefghij" ), 1, S("12345" ), 1, 4, S("a2345bcdefghij" )); |
| 830 | test(S("abcdefghij" ), 1, S("12345" ), 1, 5, S("a2345bcdefghij" )); |
| 831 | test(S("abcdefghij" ), 1, S("12345" ), 2, 0, S("abcdefghij" )); |
| 832 | test(S("abcdefghij" ), 1, S("12345" ), 2, 1, S("a3bcdefghij" )); |
| 833 | test(S("abcdefghij" ), 1, S("12345" ), 2, 2, S("a34bcdefghij" )); |
| 834 | test(S("abcdefghij" ), 1, S("12345" ), 2, 3, S("a345bcdefghij" )); |
| 835 | test(S("abcdefghij" ), 1, S("12345" ), 2, 4, S("a345bcdefghij" )); |
| 836 | test(S("abcdefghij" ), 1, S("12345" ), 4, 0, S("abcdefghij" )); |
| 837 | test(S("abcdefghij" ), 1, S("12345" ), 4, 1, S("a5bcdefghij" )); |
| 838 | test(S("abcdefghij" ), 1, S("12345" ), 4, 2, S("a5bcdefghij" )); |
| 839 | test(S("abcdefghij" ), 1, S("12345" ), 5, 0, S("abcdefghij" )); |
| 840 | test(S("abcdefghij" ), 1, S("12345" ), 5, 1, S("abcdefghij" )); |
| 841 | test(S("abcdefghij" ), 1, S("12345" ), 6, 0, S("can't happen" )); |
| 842 | test(S("abcdefghij" ), 1, S("1234567890" ), 0, 0, S("abcdefghij" )); |
| 843 | test(S("abcdefghij" ), 1, S("1234567890" ), 0, 1, S("a1bcdefghij" )); |
| 844 | test(S("abcdefghij" ), 1, S("1234567890" ), 0, 5, S("a12345bcdefghij" )); |
| 845 | test(S("abcdefghij" ), 1, S("1234567890" ), 0, 9, S("a123456789bcdefghij" )); |
| 846 | test(S("abcdefghij" ), 1, S("1234567890" ), 0, 10, S("a1234567890bcdefghij" )); |
| 847 | test(S("abcdefghij" ), 1, S("1234567890" ), 0, 11, S("a1234567890bcdefghij" )); |
| 848 | test(S("abcdefghij" ), 1, S("1234567890" ), 1, 0, S("abcdefghij" )); |
| 849 | test(S("abcdefghij" ), 1, S("1234567890" ), 1, 1, S("a2bcdefghij" )); |
| 850 | |
| 851 | return true; |
| 852 | } |
| 853 | |
| 854 | template <class S> |
| 855 | TEST_CONSTEXPR_CXX20 bool test14() { |
| 856 | test(S("abcdefghij" ), 1, S("1234567890" ), 1, 4, S("a2345bcdefghij" )); |
| 857 | test(S("abcdefghij" ), 1, S("1234567890" ), 1, 8, S("a23456789bcdefghij" )); |
| 858 | test(S("abcdefghij" ), 1, S("1234567890" ), 1, 9, S("a234567890bcdefghij" )); |
| 859 | test(S("abcdefghij" ), 1, S("1234567890" ), 1, 10, S("a234567890bcdefghij" )); |
| 860 | test(S("abcdefghij" ), 1, S("1234567890" ), 5, 0, S("abcdefghij" )); |
| 861 | test(S("abcdefghij" ), 1, S("1234567890" ), 5, 1, S("a6bcdefghij" )); |
| 862 | test(S("abcdefghij" ), 1, S("1234567890" ), 5, 2, S("a67bcdefghij" )); |
| 863 | test(S("abcdefghij" ), 1, S("1234567890" ), 5, 4, S("a6789bcdefghij" )); |
| 864 | test(S("abcdefghij" ), 1, S("1234567890" ), 5, 5, S("a67890bcdefghij" )); |
| 865 | test(S("abcdefghij" ), 1, S("1234567890" ), 5, 6, S("a67890bcdefghij" )); |
| 866 | test(S("abcdefghij" ), 1, S("1234567890" ), 9, 0, S("abcdefghij" )); |
| 867 | test(S("abcdefghij" ), 1, S("1234567890" ), 9, 1, S("a0bcdefghij" )); |
| 868 | test(S("abcdefghij" ), 1, S("1234567890" ), 9, 2, S("a0bcdefghij" )); |
| 869 | test(S("abcdefghij" ), 1, S("1234567890" ), 10, 0, S("abcdefghij" )); |
| 870 | test(S("abcdefghij" ), 1, S("1234567890" ), 10, 1, S("abcdefghij" )); |
| 871 | test(S("abcdefghij" ), 1, S("1234567890" ), 11, 0, S("can't happen" )); |
| 872 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 0, 0, S("abcdefghij" )); |
| 873 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 0, 1, S("a1bcdefghij" )); |
| 874 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 0, 10, S("a1234567890bcdefghij" )); |
| 875 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 0, 19, S("a1234567890123456789bcdefghij" )); |
| 876 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 0, 20, S("a12345678901234567890bcdefghij" )); |
| 877 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 0, 21, S("a12345678901234567890bcdefghij" )); |
| 878 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 1, 0, S("abcdefghij" )); |
| 879 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 1, 1, S("a2bcdefghij" )); |
| 880 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 1, 9, S("a234567890bcdefghij" )); |
| 881 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 1, 18, S("a234567890123456789bcdefghij" )); |
| 882 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 1, 19, S("a2345678901234567890bcdefghij" )); |
| 883 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 1, 20, S("a2345678901234567890bcdefghij" )); |
| 884 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 10, 0, S("abcdefghij" )); |
| 885 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 10, 1, S("a1bcdefghij" )); |
| 886 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 10, 5, S("a12345bcdefghij" )); |
| 887 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 10, 9, S("a123456789bcdefghij" )); |
| 888 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 10, 10, S("a1234567890bcdefghij" )); |
| 889 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 10, 11, S("a1234567890bcdefghij" )); |
| 890 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 19, 0, S("abcdefghij" )); |
| 891 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 19, 1, S("a0bcdefghij" )); |
| 892 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 19, 2, S("a0bcdefghij" )); |
| 893 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 20, 0, S("abcdefghij" )); |
| 894 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 20, 1, S("abcdefghij" )); |
| 895 | test(S("abcdefghij" ), 1, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 896 | test(S("abcdefghij" ), 5, S("" ), 0, 0, S("abcdefghij" )); |
| 897 | test(S("abcdefghij" ), 5, S("" ), 0, 1, S("abcdefghij" )); |
| 898 | test(S("abcdefghij" ), 5, S("" ), 1, 0, S("can't happen" )); |
| 899 | test(S("abcdefghij" ), 5, S("12345" ), 0, 0, S("abcdefghij" )); |
| 900 | test(S("abcdefghij" ), 5, S("12345" ), 0, 1, S("abcde1fghij" )); |
| 901 | test(S("abcdefghij" ), 5, S("12345" ), 0, 2, S("abcde12fghij" )); |
| 902 | test(S("abcdefghij" ), 5, S("12345" ), 0, 4, S("abcde1234fghij" )); |
| 903 | test(S("abcdefghij" ), 5, S("12345" ), 0, 5, S("abcde12345fghij" )); |
| 904 | test(S("abcdefghij" ), 5, S("12345" ), 0, 6, S("abcde12345fghij" )); |
| 905 | test(S("abcdefghij" ), 5, S("12345" ), 1, 0, S("abcdefghij" )); |
| 906 | |
| 907 | return true; |
| 908 | } |
| 909 | |
| 910 | template <class S> |
| 911 | TEST_CONSTEXPR_CXX20 bool test15() { |
| 912 | test(S("abcdefghij" ), 5, S("12345" ), 1, 1, S("abcde2fghij" )); |
| 913 | test(S("abcdefghij" ), 5, S("12345" ), 1, 2, S("abcde23fghij" )); |
| 914 | test(S("abcdefghij" ), 5, S("12345" ), 1, 3, S("abcde234fghij" )); |
| 915 | test(S("abcdefghij" ), 5, S("12345" ), 1, 4, S("abcde2345fghij" )); |
| 916 | test(S("abcdefghij" ), 5, S("12345" ), 1, 5, S("abcde2345fghij" )); |
| 917 | test(S("abcdefghij" ), 5, S("12345" ), 2, 0, S("abcdefghij" )); |
| 918 | test(S("abcdefghij" ), 5, S("12345" ), 2, 1, S("abcde3fghij" )); |
| 919 | test(S("abcdefghij" ), 5, S("12345" ), 2, 2, S("abcde34fghij" )); |
| 920 | test(S("abcdefghij" ), 5, S("12345" ), 2, 3, S("abcde345fghij" )); |
| 921 | test(S("abcdefghij" ), 5, S("12345" ), 2, 4, S("abcde345fghij" )); |
| 922 | test(S("abcdefghij" ), 5, S("12345" ), 4, 0, S("abcdefghij" )); |
| 923 | test(S("abcdefghij" ), 5, S("12345" ), 4, 1, S("abcde5fghij" )); |
| 924 | test(S("abcdefghij" ), 5, S("12345" ), 4, 2, S("abcde5fghij" )); |
| 925 | test(S("abcdefghij" ), 5, S("12345" ), 5, 0, S("abcdefghij" )); |
| 926 | test(S("abcdefghij" ), 5, S("12345" ), 5, 1, S("abcdefghij" )); |
| 927 | test(S("abcdefghij" ), 5, S("12345" ), 6, 0, S("can't happen" )); |
| 928 | test(S("abcdefghij" ), 5, S("1234567890" ), 0, 0, S("abcdefghij" )); |
| 929 | test(S("abcdefghij" ), 5, S("1234567890" ), 0, 1, S("abcde1fghij" )); |
| 930 | test(S("abcdefghij" ), 5, S("1234567890" ), 0, 5, S("abcde12345fghij" )); |
| 931 | test(S("abcdefghij" ), 5, S("1234567890" ), 0, 9, S("abcde123456789fghij" )); |
| 932 | test(S("abcdefghij" ), 5, S("1234567890" ), 0, 10, S("abcde1234567890fghij" )); |
| 933 | test(S("abcdefghij" ), 5, S("1234567890" ), 0, 11, S("abcde1234567890fghij" )); |
| 934 | test(S("abcdefghij" ), 5, S("1234567890" ), 1, 0, S("abcdefghij" )); |
| 935 | test(S("abcdefghij" ), 5, S("1234567890" ), 1, 1, S("abcde2fghij" )); |
| 936 | test(S("abcdefghij" ), 5, S("1234567890" ), 1, 4, S("abcde2345fghij" )); |
| 937 | test(S("abcdefghij" ), 5, S("1234567890" ), 1, 8, S("abcde23456789fghij" )); |
| 938 | test(S("abcdefghij" ), 5, S("1234567890" ), 1, 9, S("abcde234567890fghij" )); |
| 939 | test(S("abcdefghij" ), 5, S("1234567890" ), 1, 10, S("abcde234567890fghij" )); |
| 940 | test(S("abcdefghij" ), 5, S("1234567890" ), 5, 0, S("abcdefghij" )); |
| 941 | test(S("abcdefghij" ), 5, S("1234567890" ), 5, 1, S("abcde6fghij" )); |
| 942 | test(S("abcdefghij" ), 5, S("1234567890" ), 5, 2, S("abcde67fghij" )); |
| 943 | test(S("abcdefghij" ), 5, S("1234567890" ), 5, 4, S("abcde6789fghij" )); |
| 944 | test(S("abcdefghij" ), 5, S("1234567890" ), 5, 5, S("abcde67890fghij" )); |
| 945 | test(S("abcdefghij" ), 5, S("1234567890" ), 5, 6, S("abcde67890fghij" )); |
| 946 | test(S("abcdefghij" ), 5, S("1234567890" ), 9, 0, S("abcdefghij" )); |
| 947 | test(S("abcdefghij" ), 5, S("1234567890" ), 9, 1, S("abcde0fghij" )); |
| 948 | test(S("abcdefghij" ), 5, S("1234567890" ), 9, 2, S("abcde0fghij" )); |
| 949 | test(S("abcdefghij" ), 5, S("1234567890" ), 10, 0, S("abcdefghij" )); |
| 950 | test(S("abcdefghij" ), 5, S("1234567890" ), 10, 1, S("abcdefghij" )); |
| 951 | test(S("abcdefghij" ), 5, S("1234567890" ), 11, 0, S("can't happen" )); |
| 952 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 0, 0, S("abcdefghij" )); |
| 953 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 0, 1, S("abcde1fghij" )); |
| 954 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 0, 10, S("abcde1234567890fghij" )); |
| 955 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 0, 19, S("abcde1234567890123456789fghij" )); |
| 956 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 0, 20, S("abcde12345678901234567890fghij" )); |
| 957 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 0, 21, S("abcde12345678901234567890fghij" )); |
| 958 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 1, 0, S("abcdefghij" )); |
| 959 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 1, 1, S("abcde2fghij" )); |
| 960 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 1, 9, S("abcde234567890fghij" )); |
| 961 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 1, 18, S("abcde234567890123456789fghij" )); |
| 962 | |
| 963 | return true; |
| 964 | } |
| 965 | |
| 966 | template <class S> |
| 967 | TEST_CONSTEXPR_CXX20 bool test16() { |
| 968 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 1, 19, S("abcde2345678901234567890fghij" )); |
| 969 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 1, 20, S("abcde2345678901234567890fghij" )); |
| 970 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 10, 0, S("abcdefghij" )); |
| 971 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 10, 1, S("abcde1fghij" )); |
| 972 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 10, 5, S("abcde12345fghij" )); |
| 973 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 10, 9, S("abcde123456789fghij" )); |
| 974 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 10, 10, S("abcde1234567890fghij" )); |
| 975 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 10, 11, S("abcde1234567890fghij" )); |
| 976 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 19, 0, S("abcdefghij" )); |
| 977 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 19, 1, S("abcde0fghij" )); |
| 978 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 19, 2, S("abcde0fghij" )); |
| 979 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 20, 0, S("abcdefghij" )); |
| 980 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 20, 1, S("abcdefghij" )); |
| 981 | test(S("abcdefghij" ), 5, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 982 | test(S("abcdefghij" ), 9, S("" ), 0, 0, S("abcdefghij" )); |
| 983 | test(S("abcdefghij" ), 9, S("" ), 0, 1, S("abcdefghij" )); |
| 984 | test(S("abcdefghij" ), 9, S("" ), 1, 0, S("can't happen" )); |
| 985 | test(S("abcdefghij" ), 9, S("12345" ), 0, 0, S("abcdefghij" )); |
| 986 | test(S("abcdefghij" ), 9, S("12345" ), 0, 1, S("abcdefghi1j" )); |
| 987 | test(S("abcdefghij" ), 9, S("12345" ), 0, 2, S("abcdefghi12j" )); |
| 988 | test(S("abcdefghij" ), 9, S("12345" ), 0, 4, S("abcdefghi1234j" )); |
| 989 | test(S("abcdefghij" ), 9, S("12345" ), 0, 5, S("abcdefghi12345j" )); |
| 990 | test(S("abcdefghij" ), 9, S("12345" ), 0, 6, S("abcdefghi12345j" )); |
| 991 | test(S("abcdefghij" ), 9, S("12345" ), 1, 0, S("abcdefghij" )); |
| 992 | test(S("abcdefghij" ), 9, S("12345" ), 1, 1, S("abcdefghi2j" )); |
| 993 | test(S("abcdefghij" ), 9, S("12345" ), 1, 2, S("abcdefghi23j" )); |
| 994 | test(S("abcdefghij" ), 9, S("12345" ), 1, 3, S("abcdefghi234j" )); |
| 995 | test(S("abcdefghij" ), 9, S("12345" ), 1, 4, S("abcdefghi2345j" )); |
| 996 | test(S("abcdefghij" ), 9, S("12345" ), 1, 5, S("abcdefghi2345j" )); |
| 997 | test(S("abcdefghij" ), 9, S("12345" ), 2, 0, S("abcdefghij" )); |
| 998 | test(S("abcdefghij" ), 9, S("12345" ), 2, 1, S("abcdefghi3j" )); |
| 999 | test(S("abcdefghij" ), 9, S("12345" ), 2, 2, S("abcdefghi34j" )); |
| 1000 | test(S("abcdefghij" ), 9, S("12345" ), 2, 3, S("abcdefghi345j" )); |
| 1001 | test(S("abcdefghij" ), 9, S("12345" ), 2, 4, S("abcdefghi345j" )); |
| 1002 | test(S("abcdefghij" ), 9, S("12345" ), 4, 0, S("abcdefghij" )); |
| 1003 | test(S("abcdefghij" ), 9, S("12345" ), 4, 1, S("abcdefghi5j" )); |
| 1004 | test(S("abcdefghij" ), 9, S("12345" ), 4, 2, S("abcdefghi5j" )); |
| 1005 | test(S("abcdefghij" ), 9, S("12345" ), 5, 0, S("abcdefghij" )); |
| 1006 | test(S("abcdefghij" ), 9, S("12345" ), 5, 1, S("abcdefghij" )); |
| 1007 | test(S("abcdefghij" ), 9, S("12345" ), 6, 0, S("can't happen" )); |
| 1008 | test(S("abcdefghij" ), 9, S("1234567890" ), 0, 0, S("abcdefghij" )); |
| 1009 | test(S("abcdefghij" ), 9, S("1234567890" ), 0, 1, S("abcdefghi1j" )); |
| 1010 | test(S("abcdefghij" ), 9, S("1234567890" ), 0, 5, S("abcdefghi12345j" )); |
| 1011 | test(S("abcdefghij" ), 9, S("1234567890" ), 0, 9, S("abcdefghi123456789j" )); |
| 1012 | test(S("abcdefghij" ), 9, S("1234567890" ), 0, 10, S("abcdefghi1234567890j" )); |
| 1013 | test(S("abcdefghij" ), 9, S("1234567890" ), 0, 11, S("abcdefghi1234567890j" )); |
| 1014 | test(S("abcdefghij" ), 9, S("1234567890" ), 1, 0, S("abcdefghij" )); |
| 1015 | test(S("abcdefghij" ), 9, S("1234567890" ), 1, 1, S("abcdefghi2j" )); |
| 1016 | test(S("abcdefghij" ), 9, S("1234567890" ), 1, 4, S("abcdefghi2345j" )); |
| 1017 | test(S("abcdefghij" ), 9, S("1234567890" ), 1, 8, S("abcdefghi23456789j" )); |
| 1018 | |
| 1019 | return true; |
| 1020 | } |
| 1021 | |
| 1022 | template <class S> |
| 1023 | TEST_CONSTEXPR_CXX20 bool test17() { |
| 1024 | test(S("abcdefghij" ), 9, S("1234567890" ), 1, 9, S("abcdefghi234567890j" )); |
| 1025 | test(S("abcdefghij" ), 9, S("1234567890" ), 1, 10, S("abcdefghi234567890j" )); |
| 1026 | test(S("abcdefghij" ), 9, S("1234567890" ), 5, 0, S("abcdefghij" )); |
| 1027 | test(S("abcdefghij" ), 9, S("1234567890" ), 5, 1, S("abcdefghi6j" )); |
| 1028 | test(S("abcdefghij" ), 9, S("1234567890" ), 5, 2, S("abcdefghi67j" )); |
| 1029 | test(S("abcdefghij" ), 9, S("1234567890" ), 5, 4, S("abcdefghi6789j" )); |
| 1030 | test(S("abcdefghij" ), 9, S("1234567890" ), 5, 5, S("abcdefghi67890j" )); |
| 1031 | test(S("abcdefghij" ), 9, S("1234567890" ), 5, 6, S("abcdefghi67890j" )); |
| 1032 | test(S("abcdefghij" ), 9, S("1234567890" ), 9, 0, S("abcdefghij" )); |
| 1033 | test(S("abcdefghij" ), 9, S("1234567890" ), 9, 1, S("abcdefghi0j" )); |
| 1034 | test(S("abcdefghij" ), 9, S("1234567890" ), 9, 2, S("abcdefghi0j" )); |
| 1035 | test(S("abcdefghij" ), 9, S("1234567890" ), 10, 0, S("abcdefghij" )); |
| 1036 | test(S("abcdefghij" ), 9, S("1234567890" ), 10, 1, S("abcdefghij" )); |
| 1037 | test(S("abcdefghij" ), 9, S("1234567890" ), 11, 0, S("can't happen" )); |
| 1038 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 0, 0, S("abcdefghij" )); |
| 1039 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 0, 1, S("abcdefghi1j" )); |
| 1040 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 0, 10, S("abcdefghi1234567890j" )); |
| 1041 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 0, 19, S("abcdefghi1234567890123456789j" )); |
| 1042 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 0, 20, S("abcdefghi12345678901234567890j" )); |
| 1043 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 0, 21, S("abcdefghi12345678901234567890j" )); |
| 1044 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 1, 0, S("abcdefghij" )); |
| 1045 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 1, 1, S("abcdefghi2j" )); |
| 1046 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 1, 9, S("abcdefghi234567890j" )); |
| 1047 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 1, 18, S("abcdefghi234567890123456789j" )); |
| 1048 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 1, 19, S("abcdefghi2345678901234567890j" )); |
| 1049 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 1, 20, S("abcdefghi2345678901234567890j" )); |
| 1050 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 10, 0, S("abcdefghij" )); |
| 1051 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 10, 1, S("abcdefghi1j" )); |
| 1052 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 10, 5, S("abcdefghi12345j" )); |
| 1053 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 10, 9, S("abcdefghi123456789j" )); |
| 1054 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 10, 10, S("abcdefghi1234567890j" )); |
| 1055 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 10, 11, S("abcdefghi1234567890j" )); |
| 1056 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 19, 0, S("abcdefghij" )); |
| 1057 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 19, 1, S("abcdefghi0j" )); |
| 1058 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 19, 2, S("abcdefghi0j" )); |
| 1059 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 20, 0, S("abcdefghij" )); |
| 1060 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 20, 1, S("abcdefghij" )); |
| 1061 | test(S("abcdefghij" ), 9, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 1062 | test(S("abcdefghij" ), 10, S("" ), 0, 0, S("abcdefghij" )); |
| 1063 | test(S("abcdefghij" ), 10, S("" ), 0, 1, S("abcdefghij" )); |
| 1064 | test(S("abcdefghij" ), 10, S("" ), 1, 0, S("can't happen" )); |
| 1065 | test(S("abcdefghij" ), 10, S("12345" ), 0, 0, S("abcdefghij" )); |
| 1066 | test(S("abcdefghij" ), 10, S("12345" ), 0, 1, S("abcdefghij1" )); |
| 1067 | test(S("abcdefghij" ), 10, S("12345" ), 0, 2, S("abcdefghij12" )); |
| 1068 | test(S("abcdefghij" ), 10, S("12345" ), 0, 4, S("abcdefghij1234" )); |
| 1069 | test(S("abcdefghij" ), 10, S("12345" ), 0, 5, S("abcdefghij12345" )); |
| 1070 | test(S("abcdefghij" ), 10, S("12345" ), 0, 6, S("abcdefghij12345" )); |
| 1071 | test(S("abcdefghij" ), 10, S("12345" ), 1, 0, S("abcdefghij" )); |
| 1072 | test(S("abcdefghij" ), 10, S("12345" ), 1, 1, S("abcdefghij2" )); |
| 1073 | test(S("abcdefghij" ), 10, S("12345" ), 1, 2, S("abcdefghij23" )); |
| 1074 | |
| 1075 | return true; |
| 1076 | } |
| 1077 | |
| 1078 | template <class S> |
| 1079 | TEST_CONSTEXPR_CXX20 bool test18() { |
| 1080 | test(S("abcdefghij" ), 10, S("12345" ), 1, 3, S("abcdefghij234" )); |
| 1081 | test(S("abcdefghij" ), 10, S("12345" ), 1, 4, S("abcdefghij2345" )); |
| 1082 | test(S("abcdefghij" ), 10, S("12345" ), 1, 5, S("abcdefghij2345" )); |
| 1083 | test(S("abcdefghij" ), 10, S("12345" ), 2, 0, S("abcdefghij" )); |
| 1084 | test(S("abcdefghij" ), 10, S("12345" ), 2, 1, S("abcdefghij3" )); |
| 1085 | test(S("abcdefghij" ), 10, S("12345" ), 2, 2, S("abcdefghij34" )); |
| 1086 | test(S("abcdefghij" ), 10, S("12345" ), 2, 3, S("abcdefghij345" )); |
| 1087 | test(S("abcdefghij" ), 10, S("12345" ), 2, 4, S("abcdefghij345" )); |
| 1088 | test(S("abcdefghij" ), 10, S("12345" ), 4, 0, S("abcdefghij" )); |
| 1089 | test(S("abcdefghij" ), 10, S("12345" ), 4, 1, S("abcdefghij5" )); |
| 1090 | test(S("abcdefghij" ), 10, S("12345" ), 4, 2, S("abcdefghij5" )); |
| 1091 | test(S("abcdefghij" ), 10, S("12345" ), 5, 0, S("abcdefghij" )); |
| 1092 | test(S("abcdefghij" ), 10, S("12345" ), 5, 1, S("abcdefghij" )); |
| 1093 | test(S("abcdefghij" ), 10, S("12345" ), 6, 0, S("can't happen" )); |
| 1094 | test(S("abcdefghij" ), 10, S("1234567890" ), 0, 0, S("abcdefghij" )); |
| 1095 | test(S("abcdefghij" ), 10, S("1234567890" ), 0, 1, S("abcdefghij1" )); |
| 1096 | test(S("abcdefghij" ), 10, S("1234567890" ), 0, 5, S("abcdefghij12345" )); |
| 1097 | test(S("abcdefghij" ), 10, S("1234567890" ), 0, 9, S("abcdefghij123456789" )); |
| 1098 | test(S("abcdefghij" ), 10, S("1234567890" ), 0, 10, S("abcdefghij1234567890" )); |
| 1099 | test(S("abcdefghij" ), 10, S("1234567890" ), 0, 11, S("abcdefghij1234567890" )); |
| 1100 | test(S("abcdefghij" ), 10, S("1234567890" ), 1, 0, S("abcdefghij" )); |
| 1101 | test(S("abcdefghij" ), 10, S("1234567890" ), 1, 1, S("abcdefghij2" )); |
| 1102 | test(S("abcdefghij" ), 10, S("1234567890" ), 1, 4, S("abcdefghij2345" )); |
| 1103 | test(S("abcdefghij" ), 10, S("1234567890" ), 1, 8, S("abcdefghij23456789" )); |
| 1104 | test(S("abcdefghij" ), 10, S("1234567890" ), 1, 9, S("abcdefghij234567890" )); |
| 1105 | test(S("abcdefghij" ), 10, S("1234567890" ), 1, 10, S("abcdefghij234567890" )); |
| 1106 | test(S("abcdefghij" ), 10, S("1234567890" ), 5, 0, S("abcdefghij" )); |
| 1107 | test(S("abcdefghij" ), 10, S("1234567890" ), 5, 1, S("abcdefghij6" )); |
| 1108 | test(S("abcdefghij" ), 10, S("1234567890" ), 5, 2, S("abcdefghij67" )); |
| 1109 | test(S("abcdefghij" ), 10, S("1234567890" ), 5, 4, S("abcdefghij6789" )); |
| 1110 | test(S("abcdefghij" ), 10, S("1234567890" ), 5, 5, S("abcdefghij67890" )); |
| 1111 | test(S("abcdefghij" ), 10, S("1234567890" ), 5, 6, S("abcdefghij67890" )); |
| 1112 | test(S("abcdefghij" ), 10, S("1234567890" ), 9, 0, S("abcdefghij" )); |
| 1113 | test(S("abcdefghij" ), 10, S("1234567890" ), 9, 1, S("abcdefghij0" )); |
| 1114 | test(S("abcdefghij" ), 10, S("1234567890" ), 9, 2, S("abcdefghij0" )); |
| 1115 | test(S("abcdefghij" ), 10, S("1234567890" ), 10, 0, S("abcdefghij" )); |
| 1116 | test(S("abcdefghij" ), 10, S("1234567890" ), 10, 1, S("abcdefghij" )); |
| 1117 | test(S("abcdefghij" ), 10, S("1234567890" ), 11, 0, S("can't happen" )); |
| 1118 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 0, 0, S("abcdefghij" )); |
| 1119 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 0, 1, S("abcdefghij1" )); |
| 1120 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 0, 10, S("abcdefghij1234567890" )); |
| 1121 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 0, 19, S("abcdefghij1234567890123456789" )); |
| 1122 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 0, 20, S("abcdefghij12345678901234567890" )); |
| 1123 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 0, 21, S("abcdefghij12345678901234567890" )); |
| 1124 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 1, 0, S("abcdefghij" )); |
| 1125 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 1, 1, S("abcdefghij2" )); |
| 1126 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 1, 9, S("abcdefghij234567890" )); |
| 1127 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 1, 18, S("abcdefghij234567890123456789" )); |
| 1128 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 1, 19, S("abcdefghij2345678901234567890" )); |
| 1129 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 1, 20, S("abcdefghij2345678901234567890" )); |
| 1130 | |
| 1131 | return true; |
| 1132 | } |
| 1133 | |
| 1134 | template <class S> |
| 1135 | TEST_CONSTEXPR_CXX20 bool test19() { |
| 1136 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 10, 0, S("abcdefghij" )); |
| 1137 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 10, 1, S("abcdefghij1" )); |
| 1138 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 10, 5, S("abcdefghij12345" )); |
| 1139 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 10, 9, S("abcdefghij123456789" )); |
| 1140 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 10, 10, S("abcdefghij1234567890" )); |
| 1141 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 10, 11, S("abcdefghij1234567890" )); |
| 1142 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 19, 0, S("abcdefghij" )); |
| 1143 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 19, 1, S("abcdefghij0" )); |
| 1144 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 19, 2, S("abcdefghij0" )); |
| 1145 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 20, 0, S("abcdefghij" )); |
| 1146 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 20, 1, S("abcdefghij" )); |
| 1147 | test(S("abcdefghij" ), 10, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 1148 | test(S("abcdefghij" ), 11, S("" ), 0, 0, S("can't happen" )); |
| 1149 | test(S("abcdefghij" ), 11, S("" ), 0, 1, S("can't happen" )); |
| 1150 | test(S("abcdefghij" ), 11, S("" ), 1, 0, S("can't happen" )); |
| 1151 | test(S("abcdefghij" ), 11, S("12345" ), 0, 0, S("can't happen" )); |
| 1152 | test(S("abcdefghij" ), 11, S("12345" ), 0, 1, S("can't happen" )); |
| 1153 | test(S("abcdefghij" ), 11, S("12345" ), 0, 2, S("can't happen" )); |
| 1154 | test(S("abcdefghij" ), 11, S("12345" ), 0, 4, S("can't happen" )); |
| 1155 | test(S("abcdefghij" ), 11, S("12345" ), 0, 5, S("can't happen" )); |
| 1156 | test(S("abcdefghij" ), 11, S("12345" ), 0, 6, S("can't happen" )); |
| 1157 | test(S("abcdefghij" ), 11, S("12345" ), 1, 0, S("can't happen" )); |
| 1158 | test(S("abcdefghij" ), 11, S("12345" ), 1, 1, S("can't happen" )); |
| 1159 | test(S("abcdefghij" ), 11, S("12345" ), 1, 2, S("can't happen" )); |
| 1160 | test(S("abcdefghij" ), 11, S("12345" ), 1, 3, S("can't happen" )); |
| 1161 | test(S("abcdefghij" ), 11, S("12345" ), 1, 4, S("can't happen" )); |
| 1162 | test(S("abcdefghij" ), 11, S("12345" ), 1, 5, S("can't happen" )); |
| 1163 | test(S("abcdefghij" ), 11, S("12345" ), 2, 0, S("can't happen" )); |
| 1164 | test(S("abcdefghij" ), 11, S("12345" ), 2, 1, S("can't happen" )); |
| 1165 | test(S("abcdefghij" ), 11, S("12345" ), 2, 2, S("can't happen" )); |
| 1166 | test(S("abcdefghij" ), 11, S("12345" ), 2, 3, S("can't happen" )); |
| 1167 | test(S("abcdefghij" ), 11, S("12345" ), 2, 4, S("can't happen" )); |
| 1168 | test(S("abcdefghij" ), 11, S("12345" ), 4, 0, S("can't happen" )); |
| 1169 | test(S("abcdefghij" ), 11, S("12345" ), 4, 1, S("can't happen" )); |
| 1170 | test(S("abcdefghij" ), 11, S("12345" ), 4, 2, S("can't happen" )); |
| 1171 | test(S("abcdefghij" ), 11, S("12345" ), 5, 0, S("can't happen" )); |
| 1172 | test(S("abcdefghij" ), 11, S("12345" ), 5, 1, S("can't happen" )); |
| 1173 | test(S("abcdefghij" ), 11, S("12345" ), 6, 0, S("can't happen" )); |
| 1174 | test(S("abcdefghij" ), 11, S("1234567890" ), 0, 0, S("can't happen" )); |
| 1175 | test(S("abcdefghij" ), 11, S("1234567890" ), 0, 1, S("can't happen" )); |
| 1176 | test(S("abcdefghij" ), 11, S("1234567890" ), 0, 5, S("can't happen" )); |
| 1177 | test(S("abcdefghij" ), 11, S("1234567890" ), 0, 9, S("can't happen" )); |
| 1178 | test(S("abcdefghij" ), 11, S("1234567890" ), 0, 10, S("can't happen" )); |
| 1179 | test(S("abcdefghij" ), 11, S("1234567890" ), 0, 11, S("can't happen" )); |
| 1180 | test(S("abcdefghij" ), 11, S("1234567890" ), 1, 0, S("can't happen" )); |
| 1181 | test(S("abcdefghij" ), 11, S("1234567890" ), 1, 1, S("can't happen" )); |
| 1182 | test(S("abcdefghij" ), 11, S("1234567890" ), 1, 4, S("can't happen" )); |
| 1183 | test(S("abcdefghij" ), 11, S("1234567890" ), 1, 8, S("can't happen" )); |
| 1184 | test(S("abcdefghij" ), 11, S("1234567890" ), 1, 9, S("can't happen" )); |
| 1185 | test(S("abcdefghij" ), 11, S("1234567890" ), 1, 10, S("can't happen" )); |
| 1186 | |
| 1187 | return true; |
| 1188 | } |
| 1189 | |
| 1190 | template <class S> |
| 1191 | TEST_CONSTEXPR_CXX20 bool test20() { |
| 1192 | test(S("abcdefghij" ), 11, S("1234567890" ), 5, 0, S("can't happen" )); |
| 1193 | test(S("abcdefghij" ), 11, S("1234567890" ), 5, 1, S("can't happen" )); |
| 1194 | test(S("abcdefghij" ), 11, S("1234567890" ), 5, 2, S("can't happen" )); |
| 1195 | test(S("abcdefghij" ), 11, S("1234567890" ), 5, 4, S("can't happen" )); |
| 1196 | test(S("abcdefghij" ), 11, S("1234567890" ), 5, 5, S("can't happen" )); |
| 1197 | test(S("abcdefghij" ), 11, S("1234567890" ), 5, 6, S("can't happen" )); |
| 1198 | test(S("abcdefghij" ), 11, S("1234567890" ), 9, 0, S("can't happen" )); |
| 1199 | test(S("abcdefghij" ), 11, S("1234567890" ), 9, 1, S("can't happen" )); |
| 1200 | test(S("abcdefghij" ), 11, S("1234567890" ), 9, 2, S("can't happen" )); |
| 1201 | test(S("abcdefghij" ), 11, S("1234567890" ), 10, 0, S("can't happen" )); |
| 1202 | test(S("abcdefghij" ), 11, S("1234567890" ), 10, 1, S("can't happen" )); |
| 1203 | test(S("abcdefghij" ), 11, S("1234567890" ), 11, 0, S("can't happen" )); |
| 1204 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 0, 0, S("can't happen" )); |
| 1205 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 0, 1, S("can't happen" )); |
| 1206 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 0, 10, S("can't happen" )); |
| 1207 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 0, 19, S("can't happen" )); |
| 1208 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 0, 20, S("can't happen" )); |
| 1209 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 0, 21, S("can't happen" )); |
| 1210 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 1, 0, S("can't happen" )); |
| 1211 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 1, 1, S("can't happen" )); |
| 1212 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 1, 9, S("can't happen" )); |
| 1213 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 1, 18, S("can't happen" )); |
| 1214 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 1, 19, S("can't happen" )); |
| 1215 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 1, 20, S("can't happen" )); |
| 1216 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 10, 0, S("can't happen" )); |
| 1217 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 10, 1, S("can't happen" )); |
| 1218 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 10, 5, S("can't happen" )); |
| 1219 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 10, 9, S("can't happen" )); |
| 1220 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 10, 10, S("can't happen" )); |
| 1221 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 10, 11, S("can't happen" )); |
| 1222 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 19, 0, S("can't happen" )); |
| 1223 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 19, 1, S("can't happen" )); |
| 1224 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 19, 2, S("can't happen" )); |
| 1225 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 20, 0, S("can't happen" )); |
| 1226 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 20, 1, S("can't happen" )); |
| 1227 | test(S("abcdefghij" ), 11, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 1228 | test(S("abcdefghijklmnopqrst" ), 0, S("" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1229 | test(S("abcdefghijklmnopqrst" ), 0, S("" ), 0, 1, S("abcdefghijklmnopqrst" )); |
| 1230 | test(S("abcdefghijklmnopqrst" ), 0, S("" ), 1, 0, S("can't happen" )); |
| 1231 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1232 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 0, 1, S("1abcdefghijklmnopqrst" )); |
| 1233 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 0, 2, S("12abcdefghijklmnopqrst" )); |
| 1234 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 0, 4, S("1234abcdefghijklmnopqrst" )); |
| 1235 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 0, 5, S("12345abcdefghijklmnopqrst" )); |
| 1236 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 0, 6, S("12345abcdefghijklmnopqrst" )); |
| 1237 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1238 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 1, 1, S("2abcdefghijklmnopqrst" )); |
| 1239 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 1, 2, S("23abcdefghijklmnopqrst" )); |
| 1240 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 1, 3, S("234abcdefghijklmnopqrst" )); |
| 1241 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 1, 4, S("2345abcdefghijklmnopqrst" )); |
| 1242 | |
| 1243 | return true; |
| 1244 | } |
| 1245 | |
| 1246 | template <class S> |
| 1247 | TEST_CONSTEXPR_CXX20 bool test21() { |
| 1248 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 1, 5, S("2345abcdefghijklmnopqrst" )); |
| 1249 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 2, 0, S("abcdefghijklmnopqrst" )); |
| 1250 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 2, 1, S("3abcdefghijklmnopqrst" )); |
| 1251 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 2, 2, S("34abcdefghijklmnopqrst" )); |
| 1252 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 2, 3, S("345abcdefghijklmnopqrst" )); |
| 1253 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 2, 4, S("345abcdefghijklmnopqrst" )); |
| 1254 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 4, 0, S("abcdefghijklmnopqrst" )); |
| 1255 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 4, 1, S("5abcdefghijklmnopqrst" )); |
| 1256 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 4, 2, S("5abcdefghijklmnopqrst" )); |
| 1257 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 5, 0, S("abcdefghijklmnopqrst" )); |
| 1258 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 5, 1, S("abcdefghijklmnopqrst" )); |
| 1259 | test(S("abcdefghijklmnopqrst" ), 0, S("12345" ), 6, 0, S("can't happen" )); |
| 1260 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1261 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 0, 1, S("1abcdefghijklmnopqrst" )); |
| 1262 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 0, 5, S("12345abcdefghijklmnopqrst" )); |
| 1263 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 0, 9, S("123456789abcdefghijklmnopqrst" )); |
| 1264 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 0, 10, S("1234567890abcdefghijklmnopqrst" )); |
| 1265 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 0, 11, S("1234567890abcdefghijklmnopqrst" )); |
| 1266 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1267 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 1, 1, S("2abcdefghijklmnopqrst" )); |
| 1268 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 1, 4, S("2345abcdefghijklmnopqrst" )); |
| 1269 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 1, 8, S("23456789abcdefghijklmnopqrst" )); |
| 1270 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 1, 9, S("234567890abcdefghijklmnopqrst" )); |
| 1271 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 1, 10, S("234567890abcdefghijklmnopqrst" )); |
| 1272 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 5, 0, S("abcdefghijklmnopqrst" )); |
| 1273 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 5, 1, S("6abcdefghijklmnopqrst" )); |
| 1274 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 5, 2, S("67abcdefghijklmnopqrst" )); |
| 1275 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 5, 4, S("6789abcdefghijklmnopqrst" )); |
| 1276 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 5, 5, S("67890abcdefghijklmnopqrst" )); |
| 1277 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 5, 6, S("67890abcdefghijklmnopqrst" )); |
| 1278 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 9, 0, S("abcdefghijklmnopqrst" )); |
| 1279 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 9, 1, S("0abcdefghijklmnopqrst" )); |
| 1280 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 9, 2, S("0abcdefghijklmnopqrst" )); |
| 1281 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 10, 0, S("abcdefghijklmnopqrst" )); |
| 1282 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 10, 1, S("abcdefghijklmnopqrst" )); |
| 1283 | test(S("abcdefghijklmnopqrst" ), 0, S("1234567890" ), 11, 0, S("can't happen" )); |
| 1284 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1285 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 0, 1, S("1abcdefghijklmnopqrst" )); |
| 1286 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 0, 10, S("1234567890abcdefghijklmnopqrst" )); |
| 1287 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 0, 19, S("1234567890123456789abcdefghijklmnopqrst" )); |
| 1288 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 0, 20, S("12345678901234567890abcdefghijklmnopqrst" )); |
| 1289 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 0, 21, S("12345678901234567890abcdefghijklmnopqrst" )); |
| 1290 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1291 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 1, 1, S("2abcdefghijklmnopqrst" )); |
| 1292 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 1, 9, S("234567890abcdefghijklmnopqrst" )); |
| 1293 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 1, 18, S("234567890123456789abcdefghijklmnopqrst" )); |
| 1294 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 1, 19, S("2345678901234567890abcdefghijklmnopqrst" )); |
| 1295 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 1, 20, S("2345678901234567890abcdefghijklmnopqrst" )); |
| 1296 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 10, 0, S("abcdefghijklmnopqrst" )); |
| 1297 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 10, 1, S("1abcdefghijklmnopqrst" )); |
| 1298 | |
| 1299 | return true; |
| 1300 | } |
| 1301 | |
| 1302 | template <class S> |
| 1303 | TEST_CONSTEXPR_CXX20 bool test22() { |
| 1304 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 10, 5, S("12345abcdefghijklmnopqrst" )); |
| 1305 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 10, 9, S("123456789abcdefghijklmnopqrst" )); |
| 1306 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 10, 10, S("1234567890abcdefghijklmnopqrst" )); |
| 1307 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 10, 11, S("1234567890abcdefghijklmnopqrst" )); |
| 1308 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 19, 0, S("abcdefghijklmnopqrst" )); |
| 1309 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 19, 1, S("0abcdefghijklmnopqrst" )); |
| 1310 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 19, 2, S("0abcdefghijklmnopqrst" )); |
| 1311 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 20, 0, S("abcdefghijklmnopqrst" )); |
| 1312 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 20, 1, S("abcdefghijklmnopqrst" )); |
| 1313 | test(S("abcdefghijklmnopqrst" ), 0, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 1314 | test(S("abcdefghijklmnopqrst" ), 1, S("" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1315 | test(S("abcdefghijklmnopqrst" ), 1, S("" ), 0, 1, S("abcdefghijklmnopqrst" )); |
| 1316 | test(S("abcdefghijklmnopqrst" ), 1, S("" ), 1, 0, S("can't happen" )); |
| 1317 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1318 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 0, 1, S("a1bcdefghijklmnopqrst" )); |
| 1319 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 0, 2, S("a12bcdefghijklmnopqrst" )); |
| 1320 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 0, 4, S("a1234bcdefghijklmnopqrst" )); |
| 1321 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 0, 5, S("a12345bcdefghijklmnopqrst" )); |
| 1322 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 0, 6, S("a12345bcdefghijklmnopqrst" )); |
| 1323 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1324 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 1, 1, S("a2bcdefghijklmnopqrst" )); |
| 1325 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 1, 2, S("a23bcdefghijklmnopqrst" )); |
| 1326 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 1, 3, S("a234bcdefghijklmnopqrst" )); |
| 1327 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 1, 4, S("a2345bcdefghijklmnopqrst" )); |
| 1328 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 1, 5, S("a2345bcdefghijklmnopqrst" )); |
| 1329 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 2, 0, S("abcdefghijklmnopqrst" )); |
| 1330 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 2, 1, S("a3bcdefghijklmnopqrst" )); |
| 1331 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 2, 2, S("a34bcdefghijklmnopqrst" )); |
| 1332 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 2, 3, S("a345bcdefghijklmnopqrst" )); |
| 1333 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 2, 4, S("a345bcdefghijklmnopqrst" )); |
| 1334 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 4, 0, S("abcdefghijklmnopqrst" )); |
| 1335 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 4, 1, S("a5bcdefghijklmnopqrst" )); |
| 1336 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 4, 2, S("a5bcdefghijklmnopqrst" )); |
| 1337 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 5, 0, S("abcdefghijklmnopqrst" )); |
| 1338 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 5, 1, S("abcdefghijklmnopqrst" )); |
| 1339 | test(S("abcdefghijklmnopqrst" ), 1, S("12345" ), 6, 0, S("can't happen" )); |
| 1340 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1341 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 0, 1, S("a1bcdefghijklmnopqrst" )); |
| 1342 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 0, 5, S("a12345bcdefghijklmnopqrst" )); |
| 1343 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 0, 9, S("a123456789bcdefghijklmnopqrst" )); |
| 1344 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 0, 10, S("a1234567890bcdefghijklmnopqrst" )); |
| 1345 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 0, 11, S("a1234567890bcdefghijklmnopqrst" )); |
| 1346 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1347 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 1, 1, S("a2bcdefghijklmnopqrst" )); |
| 1348 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 1, 4, S("a2345bcdefghijklmnopqrst" )); |
| 1349 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 1, 8, S("a23456789bcdefghijklmnopqrst" )); |
| 1350 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 1, 9, S("a234567890bcdefghijklmnopqrst" )); |
| 1351 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 1, 10, S("a234567890bcdefghijklmnopqrst" )); |
| 1352 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 5, 0, S("abcdefghijklmnopqrst" )); |
| 1353 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 5, 1, S("a6bcdefghijklmnopqrst" )); |
| 1354 | |
| 1355 | return true; |
| 1356 | } |
| 1357 | |
| 1358 | template <class S> |
| 1359 | TEST_CONSTEXPR_CXX20 bool test23() { |
| 1360 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 5, 2, S("a67bcdefghijklmnopqrst" )); |
| 1361 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 5, 4, S("a6789bcdefghijklmnopqrst" )); |
| 1362 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 5, 5, S("a67890bcdefghijklmnopqrst" )); |
| 1363 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 5, 6, S("a67890bcdefghijklmnopqrst" )); |
| 1364 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 9, 0, S("abcdefghijklmnopqrst" )); |
| 1365 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 9, 1, S("a0bcdefghijklmnopqrst" )); |
| 1366 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 9, 2, S("a0bcdefghijklmnopqrst" )); |
| 1367 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 10, 0, S("abcdefghijklmnopqrst" )); |
| 1368 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 10, 1, S("abcdefghijklmnopqrst" )); |
| 1369 | test(S("abcdefghijklmnopqrst" ), 1, S("1234567890" ), 11, 0, S("can't happen" )); |
| 1370 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1371 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 0, 1, S("a1bcdefghijklmnopqrst" )); |
| 1372 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 0, 10, S("a1234567890bcdefghijklmnopqrst" )); |
| 1373 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 0, 19, S("a1234567890123456789bcdefghijklmnopqrst" )); |
| 1374 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 0, 20, S("a12345678901234567890bcdefghijklmnopqrst" )); |
| 1375 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 0, 21, S("a12345678901234567890bcdefghijklmnopqrst" )); |
| 1376 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1377 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 1, 1, S("a2bcdefghijklmnopqrst" )); |
| 1378 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 1, 9, S("a234567890bcdefghijklmnopqrst" )); |
| 1379 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 1, 18, S("a234567890123456789bcdefghijklmnopqrst" )); |
| 1380 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 1, 19, S("a2345678901234567890bcdefghijklmnopqrst" )); |
| 1381 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 1, 20, S("a2345678901234567890bcdefghijklmnopqrst" )); |
| 1382 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 10, 0, S("abcdefghijklmnopqrst" )); |
| 1383 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 10, 1, S("a1bcdefghijklmnopqrst" )); |
| 1384 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 10, 5, S("a12345bcdefghijklmnopqrst" )); |
| 1385 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 10, 9, S("a123456789bcdefghijklmnopqrst" )); |
| 1386 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 10, 10, S("a1234567890bcdefghijklmnopqrst" )); |
| 1387 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 10, 11, S("a1234567890bcdefghijklmnopqrst" )); |
| 1388 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 19, 0, S("abcdefghijklmnopqrst" )); |
| 1389 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 19, 1, S("a0bcdefghijklmnopqrst" )); |
| 1390 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 19, 2, S("a0bcdefghijklmnopqrst" )); |
| 1391 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 20, 0, S("abcdefghijklmnopqrst" )); |
| 1392 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 20, 1, S("abcdefghijklmnopqrst" )); |
| 1393 | test(S("abcdefghijklmnopqrst" ), 1, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 1394 | test(S("abcdefghijklmnopqrst" ), 10, S("" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1395 | test(S("abcdefghijklmnopqrst" ), 10, S("" ), 0, 1, S("abcdefghijklmnopqrst" )); |
| 1396 | test(S("abcdefghijklmnopqrst" ), 10, S("" ), 1, 0, S("can't happen" )); |
| 1397 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1398 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 0, 1, S("abcdefghij1klmnopqrst" )); |
| 1399 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 0, 2, S("abcdefghij12klmnopqrst" )); |
| 1400 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 0, 4, S("abcdefghij1234klmnopqrst" )); |
| 1401 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 0, 5, S("abcdefghij12345klmnopqrst" )); |
| 1402 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 0, 6, S("abcdefghij12345klmnopqrst" )); |
| 1403 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1404 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 1, 1, S("abcdefghij2klmnopqrst" )); |
| 1405 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 1, 2, S("abcdefghij23klmnopqrst" )); |
| 1406 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 1, 3, S("abcdefghij234klmnopqrst" )); |
| 1407 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 1, 4, S("abcdefghij2345klmnopqrst" )); |
| 1408 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 1, 5, S("abcdefghij2345klmnopqrst" )); |
| 1409 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 2, 0, S("abcdefghijklmnopqrst" )); |
| 1410 | |
| 1411 | return true; |
| 1412 | } |
| 1413 | |
| 1414 | template <class S> |
| 1415 | TEST_CONSTEXPR_CXX20 bool test24() { |
| 1416 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 2, 1, S("abcdefghij3klmnopqrst" )); |
| 1417 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 2, 2, S("abcdefghij34klmnopqrst" )); |
| 1418 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 2, 3, S("abcdefghij345klmnopqrst" )); |
| 1419 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 2, 4, S("abcdefghij345klmnopqrst" )); |
| 1420 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 4, 0, S("abcdefghijklmnopqrst" )); |
| 1421 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 4, 1, S("abcdefghij5klmnopqrst" )); |
| 1422 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 4, 2, S("abcdefghij5klmnopqrst" )); |
| 1423 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 5, 0, S("abcdefghijklmnopqrst" )); |
| 1424 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 5, 1, S("abcdefghijklmnopqrst" )); |
| 1425 | test(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 6, 0, S("can't happen" )); |
| 1426 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1427 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 0, 1, S("abcdefghij1klmnopqrst" )); |
| 1428 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 0, 5, S("abcdefghij12345klmnopqrst" )); |
| 1429 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 0, 9, S("abcdefghij123456789klmnopqrst" )); |
| 1430 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 0, 10, S("abcdefghij1234567890klmnopqrst" )); |
| 1431 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 0, 11, S("abcdefghij1234567890klmnopqrst" )); |
| 1432 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1433 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 1, 1, S("abcdefghij2klmnopqrst" )); |
| 1434 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 1, 4, S("abcdefghij2345klmnopqrst" )); |
| 1435 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 1, 8, S("abcdefghij23456789klmnopqrst" )); |
| 1436 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 1, 9, S("abcdefghij234567890klmnopqrst" )); |
| 1437 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 1, 10, S("abcdefghij234567890klmnopqrst" )); |
| 1438 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 5, 0, S("abcdefghijklmnopqrst" )); |
| 1439 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 5, 1, S("abcdefghij6klmnopqrst" )); |
| 1440 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 5, 2, S("abcdefghij67klmnopqrst" )); |
| 1441 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 5, 4, S("abcdefghij6789klmnopqrst" )); |
| 1442 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 5, 5, S("abcdefghij67890klmnopqrst" )); |
| 1443 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 5, 6, S("abcdefghij67890klmnopqrst" )); |
| 1444 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 9, 0, S("abcdefghijklmnopqrst" )); |
| 1445 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 9, 1, S("abcdefghij0klmnopqrst" )); |
| 1446 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 9, 2, S("abcdefghij0klmnopqrst" )); |
| 1447 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 10, 0, S("abcdefghijklmnopqrst" )); |
| 1448 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 10, 1, S("abcdefghijklmnopqrst" )); |
| 1449 | test(S("abcdefghijklmnopqrst" ), 10, S("1234567890" ), 11, 0, S("can't happen" )); |
| 1450 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1451 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 0, 1, S("abcdefghij1klmnopqrst" )); |
| 1452 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 0, 10, S("abcdefghij1234567890klmnopqrst" )); |
| 1453 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 0, 19, S("abcdefghij1234567890123456789klmnopqrst" )); |
| 1454 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 0, 20, S("abcdefghij12345678901234567890klmnopqrst" )); |
| 1455 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 0, 21, S("abcdefghij12345678901234567890klmnopqrst" )); |
| 1456 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1457 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 1, 1, S("abcdefghij2klmnopqrst" )); |
| 1458 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 1, 9, S("abcdefghij234567890klmnopqrst" )); |
| 1459 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 1, 18, S("abcdefghij234567890123456789klmnopqrst" )); |
| 1460 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 1, 19, S("abcdefghij2345678901234567890klmnopqrst" )); |
| 1461 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 1, 20, S("abcdefghij2345678901234567890klmnopqrst" )); |
| 1462 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 10, 0, S("abcdefghijklmnopqrst" )); |
| 1463 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 10, 1, S("abcdefghij1klmnopqrst" )); |
| 1464 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 10, 5, S("abcdefghij12345klmnopqrst" )); |
| 1465 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 10, 9, S("abcdefghij123456789klmnopqrst" )); |
| 1466 | |
| 1467 | return true; |
| 1468 | } |
| 1469 | |
| 1470 | template <class S> |
| 1471 | TEST_CONSTEXPR_CXX20 bool test25() { |
| 1472 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 10, 10, S("abcdefghij1234567890klmnopqrst" )); |
| 1473 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 10, 11, S("abcdefghij1234567890klmnopqrst" )); |
| 1474 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 19, 0, S("abcdefghijklmnopqrst" )); |
| 1475 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 19, 1, S("abcdefghij0klmnopqrst" )); |
| 1476 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 19, 2, S("abcdefghij0klmnopqrst" )); |
| 1477 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 20, 0, S("abcdefghijklmnopqrst" )); |
| 1478 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 20, 1, S("abcdefghijklmnopqrst" )); |
| 1479 | test(S("abcdefghijklmnopqrst" ), 10, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 1480 | test(S("abcdefghijklmnopqrst" ), 19, S("" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1481 | test(S("abcdefghijklmnopqrst" ), 19, S("" ), 0, 1, S("abcdefghijklmnopqrst" )); |
| 1482 | test(S("abcdefghijklmnopqrst" ), 19, S("" ), 1, 0, S("can't happen" )); |
| 1483 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1484 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 0, 1, S("abcdefghijklmnopqrs1t" )); |
| 1485 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 0, 2, S("abcdefghijklmnopqrs12t" )); |
| 1486 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 0, 4, S("abcdefghijklmnopqrs1234t" )); |
| 1487 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 0, 5, S("abcdefghijklmnopqrs12345t" )); |
| 1488 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 0, 6, S("abcdefghijklmnopqrs12345t" )); |
| 1489 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1490 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 1, 1, S("abcdefghijklmnopqrs2t" )); |
| 1491 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 1, 2, S("abcdefghijklmnopqrs23t" )); |
| 1492 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 1, 3, S("abcdefghijklmnopqrs234t" )); |
| 1493 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 1, 4, S("abcdefghijklmnopqrs2345t" )); |
| 1494 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 1, 5, S("abcdefghijklmnopqrs2345t" )); |
| 1495 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 2, 0, S("abcdefghijklmnopqrst" )); |
| 1496 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 2, 1, S("abcdefghijklmnopqrs3t" )); |
| 1497 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 2, 2, S("abcdefghijklmnopqrs34t" )); |
| 1498 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 2, 3, S("abcdefghijklmnopqrs345t" )); |
| 1499 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 2, 4, S("abcdefghijklmnopqrs345t" )); |
| 1500 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 4, 0, S("abcdefghijklmnopqrst" )); |
| 1501 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 4, 1, S("abcdefghijklmnopqrs5t" )); |
| 1502 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 4, 2, S("abcdefghijklmnopqrs5t" )); |
| 1503 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 5, 0, S("abcdefghijklmnopqrst" )); |
| 1504 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 5, 1, S("abcdefghijklmnopqrst" )); |
| 1505 | test(S("abcdefghijklmnopqrst" ), 19, S("12345" ), 6, 0, S("can't happen" )); |
| 1506 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1507 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 0, 1, S("abcdefghijklmnopqrs1t" )); |
| 1508 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 0, 5, S("abcdefghijklmnopqrs12345t" )); |
| 1509 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 0, 9, S("abcdefghijklmnopqrs123456789t" )); |
| 1510 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 0, 10, S("abcdefghijklmnopqrs1234567890t" )); |
| 1511 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 0, 11, S("abcdefghijklmnopqrs1234567890t" )); |
| 1512 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1513 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 1, 1, S("abcdefghijklmnopqrs2t" )); |
| 1514 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 1, 4, S("abcdefghijklmnopqrs2345t" )); |
| 1515 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 1, 8, S("abcdefghijklmnopqrs23456789t" )); |
| 1516 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 1, 9, S("abcdefghijklmnopqrs234567890t" )); |
| 1517 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 1, 10, S("abcdefghijklmnopqrs234567890t" )); |
| 1518 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 5, 0, S("abcdefghijklmnopqrst" )); |
| 1519 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 5, 1, S("abcdefghijklmnopqrs6t" )); |
| 1520 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 5, 2, S("abcdefghijklmnopqrs67t" )); |
| 1521 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 5, 4, S("abcdefghijklmnopqrs6789t" )); |
| 1522 | |
| 1523 | return true; |
| 1524 | } |
| 1525 | |
| 1526 | template <class S> |
| 1527 | TEST_CONSTEXPR_CXX20 bool test26() { |
| 1528 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 5, 5, S("abcdefghijklmnopqrs67890t" )); |
| 1529 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 5, 6, S("abcdefghijklmnopqrs67890t" )); |
| 1530 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 9, 0, S("abcdefghijklmnopqrst" )); |
| 1531 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 9, 1, S("abcdefghijklmnopqrs0t" )); |
| 1532 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 9, 2, S("abcdefghijklmnopqrs0t" )); |
| 1533 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 10, 0, S("abcdefghijklmnopqrst" )); |
| 1534 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 10, 1, S("abcdefghijklmnopqrst" )); |
| 1535 | test(S("abcdefghijklmnopqrst" ), 19, S("1234567890" ), 11, 0, S("can't happen" )); |
| 1536 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1537 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 0, 1, S("abcdefghijklmnopqrs1t" )); |
| 1538 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 0, 10, S("abcdefghijklmnopqrs1234567890t" )); |
| 1539 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 0, 19, S("abcdefghijklmnopqrs1234567890123456789t" )); |
| 1540 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 0, 20, S("abcdefghijklmnopqrs12345678901234567890t" )); |
| 1541 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 0, 21, S("abcdefghijklmnopqrs12345678901234567890t" )); |
| 1542 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1543 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 1, 1, S("abcdefghijklmnopqrs2t" )); |
| 1544 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 1, 9, S("abcdefghijklmnopqrs234567890t" )); |
| 1545 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 1, 18, S("abcdefghijklmnopqrs234567890123456789t" )); |
| 1546 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 1, 19, S("abcdefghijklmnopqrs2345678901234567890t" )); |
| 1547 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 1, 20, S("abcdefghijklmnopqrs2345678901234567890t" )); |
| 1548 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 10, 0, S("abcdefghijklmnopqrst" )); |
| 1549 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 10, 1, S("abcdefghijklmnopqrs1t" )); |
| 1550 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 10, 5, S("abcdefghijklmnopqrs12345t" )); |
| 1551 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 10, 9, S("abcdefghijklmnopqrs123456789t" )); |
| 1552 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 10, 10, S("abcdefghijklmnopqrs1234567890t" )); |
| 1553 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 10, 11, S("abcdefghijklmnopqrs1234567890t" )); |
| 1554 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 19, 0, S("abcdefghijklmnopqrst" )); |
| 1555 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 19, 1, S("abcdefghijklmnopqrs0t" )); |
| 1556 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 19, 2, S("abcdefghijklmnopqrs0t" )); |
| 1557 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 20, 0, S("abcdefghijklmnopqrst" )); |
| 1558 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 20, 1, S("abcdefghijklmnopqrst" )); |
| 1559 | test(S("abcdefghijklmnopqrst" ), 19, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 1560 | test(S("abcdefghijklmnopqrst" ), 20, S("" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1561 | test(S("abcdefghijklmnopqrst" ), 20, S("" ), 0, 1, S("abcdefghijklmnopqrst" )); |
| 1562 | test(S("abcdefghijklmnopqrst" ), 20, S("" ), 1, 0, S("can't happen" )); |
| 1563 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1564 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 0, 1, S("abcdefghijklmnopqrst1" )); |
| 1565 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 0, 2, S("abcdefghijklmnopqrst12" )); |
| 1566 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 0, 4, S("abcdefghijklmnopqrst1234" )); |
| 1567 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 0, 5, S("abcdefghijklmnopqrst12345" )); |
| 1568 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 0, 6, S("abcdefghijklmnopqrst12345" )); |
| 1569 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1570 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 1, 1, S("abcdefghijklmnopqrst2" )); |
| 1571 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 1, 2, S("abcdefghijklmnopqrst23" )); |
| 1572 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 1, 3, S("abcdefghijklmnopqrst234" )); |
| 1573 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 1, 4, S("abcdefghijklmnopqrst2345" )); |
| 1574 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 1, 5, S("abcdefghijklmnopqrst2345" )); |
| 1575 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 2, 0, S("abcdefghijklmnopqrst" )); |
| 1576 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 2, 1, S("abcdefghijklmnopqrst3" )); |
| 1577 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 2, 2, S("abcdefghijklmnopqrst34" )); |
| 1578 | |
| 1579 | return true; |
| 1580 | } |
| 1581 | |
| 1582 | template <class S> |
| 1583 | TEST_CONSTEXPR_CXX20 bool test27() { |
| 1584 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 2, 3, S("abcdefghijklmnopqrst345" )); |
| 1585 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 2, 4, S("abcdefghijklmnopqrst345" )); |
| 1586 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 4, 0, S("abcdefghijklmnopqrst" )); |
| 1587 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 4, 1, S("abcdefghijklmnopqrst5" )); |
| 1588 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 4, 2, S("abcdefghijklmnopqrst5" )); |
| 1589 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 5, 0, S("abcdefghijklmnopqrst" )); |
| 1590 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 5, 1, S("abcdefghijklmnopqrst" )); |
| 1591 | test(S("abcdefghijklmnopqrst" ), 20, S("12345" ), 6, 0, S("can't happen" )); |
| 1592 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1593 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 0, 1, S("abcdefghijklmnopqrst1" )); |
| 1594 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 0, 5, S("abcdefghijklmnopqrst12345" )); |
| 1595 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 0, 9, S("abcdefghijklmnopqrst123456789" )); |
| 1596 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 0, 10, S("abcdefghijklmnopqrst1234567890" )); |
| 1597 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 0, 11, S("abcdefghijklmnopqrst1234567890" )); |
| 1598 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1599 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 1, 1, S("abcdefghijklmnopqrst2" )); |
| 1600 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 1, 4, S("abcdefghijklmnopqrst2345" )); |
| 1601 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 1, 8, S("abcdefghijklmnopqrst23456789" )); |
| 1602 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 1, 9, S("abcdefghijklmnopqrst234567890" )); |
| 1603 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 1, 10, S("abcdefghijklmnopqrst234567890" )); |
| 1604 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 5, 0, S("abcdefghijklmnopqrst" )); |
| 1605 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 5, 1, S("abcdefghijklmnopqrst6" )); |
| 1606 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 5, 2, S("abcdefghijklmnopqrst67" )); |
| 1607 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 5, 4, S("abcdefghijklmnopqrst6789" )); |
| 1608 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 5, 5, S("abcdefghijklmnopqrst67890" )); |
| 1609 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 5, 6, S("abcdefghijklmnopqrst67890" )); |
| 1610 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 9, 0, S("abcdefghijklmnopqrst" )); |
| 1611 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 9, 1, S("abcdefghijklmnopqrst0" )); |
| 1612 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 9, 2, S("abcdefghijklmnopqrst0" )); |
| 1613 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 10, 0, S("abcdefghijklmnopqrst" )); |
| 1614 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 10, 1, S("abcdefghijklmnopqrst" )); |
| 1615 | test(S("abcdefghijklmnopqrst" ), 20, S("1234567890" ), 11, 0, S("can't happen" )); |
| 1616 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 0, 0, S("abcdefghijklmnopqrst" )); |
| 1617 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 0, 1, S("abcdefghijklmnopqrst1" )); |
| 1618 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 0, 10, S("abcdefghijklmnopqrst1234567890" )); |
| 1619 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 0, 19, S("abcdefghijklmnopqrst1234567890123456789" )); |
| 1620 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 0, 20, S("abcdefghijklmnopqrst12345678901234567890" )); |
| 1621 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 0, 21, S("abcdefghijklmnopqrst12345678901234567890" )); |
| 1622 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 1, 0, S("abcdefghijklmnopqrst" )); |
| 1623 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 1, 1, S("abcdefghijklmnopqrst2" )); |
| 1624 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 1, 9, S("abcdefghijklmnopqrst234567890" )); |
| 1625 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 1, 18, S("abcdefghijklmnopqrst234567890123456789" )); |
| 1626 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 1, 19, S("abcdefghijklmnopqrst2345678901234567890" )); |
| 1627 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 1, 20, S("abcdefghijklmnopqrst2345678901234567890" )); |
| 1628 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 10, 0, S("abcdefghijklmnopqrst" )); |
| 1629 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 10, 1, S("abcdefghijklmnopqrst1" )); |
| 1630 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 10, 5, S("abcdefghijklmnopqrst12345" )); |
| 1631 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 10, 9, S("abcdefghijklmnopqrst123456789" )); |
| 1632 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 10, 10, S("abcdefghijklmnopqrst1234567890" )); |
| 1633 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 10, 11, S("abcdefghijklmnopqrst1234567890" )); |
| 1634 | |
| 1635 | return true; |
| 1636 | } |
| 1637 | |
| 1638 | template <class S> |
| 1639 | TEST_CONSTEXPR_CXX20 bool test28() { |
| 1640 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 19, 0, S("abcdefghijklmnopqrst" )); |
| 1641 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 19, 1, S("abcdefghijklmnopqrst0" )); |
| 1642 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 19, 2, S("abcdefghijklmnopqrst0" )); |
| 1643 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 20, 0, S("abcdefghijklmnopqrst" )); |
| 1644 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 20, 1, S("abcdefghijklmnopqrst" )); |
| 1645 | test(S("abcdefghijklmnopqrst" ), 20, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 1646 | test(S("abcdefghijklmnopqrst" ), 21, S("" ), 0, 0, S("can't happen" )); |
| 1647 | test(S("abcdefghijklmnopqrst" ), 21, S("" ), 0, 1, S("can't happen" )); |
| 1648 | test(S("abcdefghijklmnopqrst" ), 21, S("" ), 1, 0, S("can't happen" )); |
| 1649 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 0, 0, S("can't happen" )); |
| 1650 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 0, 1, S("can't happen" )); |
| 1651 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 0, 2, S("can't happen" )); |
| 1652 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 0, 4, S("can't happen" )); |
| 1653 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 0, 5, S("can't happen" )); |
| 1654 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 0, 6, S("can't happen" )); |
| 1655 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 1, 0, S("can't happen" )); |
| 1656 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 1, 1, S("can't happen" )); |
| 1657 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 1, 2, S("can't happen" )); |
| 1658 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 1, 3, S("can't happen" )); |
| 1659 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 1, 4, S("can't happen" )); |
| 1660 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 1, 5, S("can't happen" )); |
| 1661 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 2, 0, S("can't happen" )); |
| 1662 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 2, 1, S("can't happen" )); |
| 1663 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 2, 2, S("can't happen" )); |
| 1664 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 2, 3, S("can't happen" )); |
| 1665 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 2, 4, S("can't happen" )); |
| 1666 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 4, 0, S("can't happen" )); |
| 1667 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 4, 1, S("can't happen" )); |
| 1668 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 4, 2, S("can't happen" )); |
| 1669 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 5, 0, S("can't happen" )); |
| 1670 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 5, 1, S("can't happen" )); |
| 1671 | test(S("abcdefghijklmnopqrst" ), 21, S("12345" ), 6, 0, S("can't happen" )); |
| 1672 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 0, 0, S("can't happen" )); |
| 1673 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 0, 1, S("can't happen" )); |
| 1674 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 0, 5, S("can't happen" )); |
| 1675 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 0, 9, S("can't happen" )); |
| 1676 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 0, 10, S("can't happen" )); |
| 1677 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 0, 11, S("can't happen" )); |
| 1678 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 1, 0, S("can't happen" )); |
| 1679 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 1, 1, S("can't happen" )); |
| 1680 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 1, 4, S("can't happen" )); |
| 1681 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 1, 8, S("can't happen" )); |
| 1682 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 1, 9, S("can't happen" )); |
| 1683 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 1, 10, S("can't happen" )); |
| 1684 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 5, 0, S("can't happen" )); |
| 1685 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 5, 1, S("can't happen" )); |
| 1686 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 5, 2, S("can't happen" )); |
| 1687 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 5, 4, S("can't happen" )); |
| 1688 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 5, 5, S("can't happen" )); |
| 1689 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 5, 6, S("can't happen" )); |
| 1690 | |
| 1691 | return true; |
| 1692 | } |
| 1693 | |
| 1694 | template <class S> |
| 1695 | TEST_CONSTEXPR_CXX20 bool test29() { |
| 1696 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 9, 0, S("can't happen" )); |
| 1697 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 9, 1, S("can't happen" )); |
| 1698 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 9, 2, S("can't happen" )); |
| 1699 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 10, 0, S("can't happen" )); |
| 1700 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 10, 1, S("can't happen" )); |
| 1701 | test(S("abcdefghijklmnopqrst" ), 21, S("1234567890" ), 11, 0, S("can't happen" )); |
| 1702 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 0, 0, S("can't happen" )); |
| 1703 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 0, 1, S("can't happen" )); |
| 1704 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 0, 10, S("can't happen" )); |
| 1705 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 0, 19, S("can't happen" )); |
| 1706 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 0, 20, S("can't happen" )); |
| 1707 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 0, 21, S("can't happen" )); |
| 1708 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 1, 0, S("can't happen" )); |
| 1709 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 1, 1, S("can't happen" )); |
| 1710 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 1, 9, S("can't happen" )); |
| 1711 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 1, 18, S("can't happen" )); |
| 1712 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 1, 19, S("can't happen" )); |
| 1713 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 1, 20, S("can't happen" )); |
| 1714 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 10, 0, S("can't happen" )); |
| 1715 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 10, 1, S("can't happen" )); |
| 1716 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 10, 5, S("can't happen" )); |
| 1717 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 10, 9, S("can't happen" )); |
| 1718 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 10, 10, S("can't happen" )); |
| 1719 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 10, 11, S("can't happen" )); |
| 1720 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 19, 0, S("can't happen" )); |
| 1721 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 19, 1, S("can't happen" )); |
| 1722 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 19, 2, S("can't happen" )); |
| 1723 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 20, 0, S("can't happen" )); |
| 1724 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 20, 1, S("can't happen" )); |
| 1725 | test(S("abcdefghijklmnopqrst" ), 21, S("12345678901234567890" ), 21, 0, S("can't happen" )); |
| 1726 | |
| 1727 | return true; |
| 1728 | } |
| 1729 | |
| 1730 | template <class S> |
| 1731 | TEST_CONSTEXPR_CXX20 bool test30() { |
| 1732 | test_npos(S("" ), 0, S("12345678901234567890" ), 0, S("12345678901234567890" )); |
| 1733 | test_npos(S("" ), 0, S("12345678901234567890" ), 1, S("2345678901234567890" )); |
| 1734 | test_npos(S("" ), 0, S("12345678901234567890" ), 2, S("345678901234567890" )); |
| 1735 | test_npos(S("" ), 0, S("12345678901234567890" ), 3, S("45678901234567890" )); |
| 1736 | test_npos(S("" ), 0, S("12345678901234567890" ), 5, S("678901234567890" )); |
| 1737 | test_npos(S("" ), 0, S("12345678901234567890" ), 10, S("1234567890" )); |
| 1738 | test_npos(S("" ), 0, S("12345678901234567890" ), 21, S("can't happen" )); |
| 1739 | test_npos(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 0, S("abcdefghij12345klmnopqrst" )); |
| 1740 | test_npos(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 1, S("abcdefghij2345klmnopqrst" )); |
| 1741 | test_npos(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 3, S("abcdefghij45klmnopqrst" )); |
| 1742 | test_npos(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 5, S("abcdefghijklmnopqrst" )); |
| 1743 | test_npos(S("abcdefghijklmnopqrst" ), 10, S("12345" ), 6, S("can't happen" )); |
| 1744 | |
| 1745 | return true; |
| 1746 | } |
| 1747 | |
| 1748 | template <class S> |
| 1749 | void test() { |
| 1750 | test0<S>(); |
| 1751 | test1<S>(); |
| 1752 | test2<S>(); |
| 1753 | test3<S>(); |
| 1754 | test4<S>(); |
| 1755 | test5<S>(); |
| 1756 | test6<S>(); |
| 1757 | test7<S>(); |
| 1758 | test8<S>(); |
| 1759 | test9<S>(); |
| 1760 | test10<S>(); |
| 1761 | test11<S>(); |
| 1762 | test12<S>(); |
| 1763 | test13<S>(); |
| 1764 | test14<S>(); |
| 1765 | test15<S>(); |
| 1766 | test16<S>(); |
| 1767 | test17<S>(); |
| 1768 | test18<S>(); |
| 1769 | test19<S>(); |
| 1770 | test20<S>(); |
| 1771 | test21<S>(); |
| 1772 | test22<S>(); |
| 1773 | test23<S>(); |
| 1774 | test24<S>(); |
| 1775 | test25<S>(); |
| 1776 | test26<S>(); |
| 1777 | test27<S>(); |
| 1778 | test28<S>(); |
| 1779 | test29<S>(); |
| 1780 | test30<S>(); |
| 1781 | |
| 1782 | #if TEST_STD_VER > 17 |
| 1783 | static_assert(test0<S>()); |
| 1784 | static_assert(test1<S>()); |
| 1785 | static_assert(test2<S>()); |
| 1786 | static_assert(test3<S>()); |
| 1787 | static_assert(test4<S>()); |
| 1788 | static_assert(test5<S>()); |
| 1789 | static_assert(test6<S>()); |
| 1790 | static_assert(test7<S>()); |
| 1791 | static_assert(test8<S>()); |
| 1792 | static_assert(test9<S>()); |
| 1793 | static_assert(test10<S>()); |
| 1794 | static_assert(test11<S>()); |
| 1795 | static_assert(test12<S>()); |
| 1796 | static_assert(test13<S>()); |
| 1797 | static_assert(test14<S>()); |
| 1798 | static_assert(test15<S>()); |
| 1799 | static_assert(test16<S>()); |
| 1800 | static_assert(test17<S>()); |
| 1801 | static_assert(test18<S>()); |
| 1802 | static_assert(test19<S>()); |
| 1803 | static_assert(test20<S>()); |
| 1804 | static_assert(test21<S>()); |
| 1805 | static_assert(test22<S>()); |
| 1806 | static_assert(test23<S>()); |
| 1807 | static_assert(test24<S>()); |
| 1808 | static_assert(test25<S>()); |
| 1809 | static_assert(test26<S>()); |
| 1810 | static_assert(test27<S>()); |
| 1811 | static_assert(test28<S>()); |
| 1812 | static_assert(test29<S>()); |
| 1813 | static_assert(test30<S>()); |
| 1814 | #endif |
| 1815 | } |
| 1816 | |
| 1817 | int main(int, char**) { |
| 1818 | test<std::string>(); |
| 1819 | #if TEST_STD_VER >= 11 |
| 1820 | test<std::basic_string<char, std::char_traits<char>, min_allocator<char>>>(); |
| 1821 | test<std::basic_string<char, std::char_traits<char>, safe_allocator<char>>>(); |
| 1822 | #endif |
| 1823 | |
| 1824 | return 0; |
| 1825 | } |
| 1826 | |