[ 0:01] compiling /home/xrockai/src/divine/nightly/test/libcxx/strings/iter_iter_pointer_size.pass.cpp [ 0:01] In file included from /home/xrockai/src/divine/nightly/test/libcxx/strings/iter_iter_pointer_size.pass.cpp:17: [ 0:01] In file included from /dios/libcxx/include/string:504: [ 0:01] In file included from /dios/libcxx/include/string_view:175: [ 0:01] In file included from /dios/libcxx/include/__string:56: [ 0:01] In file included from /dios/libcxx/include/algorithm:639: [ 0:01] In file included from /dios/libcxx/include/initializer_list:46: [ 0:01] In file included from /dios/libcxx/include/cstddef:44: [ 0:01] In file included from /dios/include/stddef.h:10: [ 0:01] In file included from /dios/include/_PDCLIB/int.h:16: [ 0:01] /dios/include/_PDCLIB/cdefs.h:69:10: warning: Unsupported _ _cplusplus (__cplusplus) (too new) (supported: ISO/IEC 14882:1997, ISO/IEC 14882:2011). [ 0:01] #warning Unsupported _ _cplusplus (__cplusplus) (too new) (supported: ISO/IEC 14882:1997, ISO/IEC 14882:2011). [ 0:01] ^ [ 0:01] 1 warning generated. [ 0:03] compiling /dios/lib/config/seqklee.bc [ 0:03] setting up pass: functionmeta, options = [ 0:06] setting up pass: fuse-ctors, options = [ 0:06] KLEE: output directory is "/var/obj/divine-nightly/semidbg/test/__test_work_dir.20/_klee_out" [ 0:12] KLEE: Using Z3 solver backend [ 0:12] WARNING: this target does not support the llvm.stacksave intrinsic. [ 0:12] warning: Linking two modules of different target triples: klee_div_zero_check.bc' is 'x86_64-unknown-linux-gnu' whereas 'klee.bc' is 'x86_64-unknown-none-elf' [ 0:13] [ 0:13] KLEE: WARNING: undefined reference to function: _Z10klee_abortv [ 0:24] KLEE: WARNING: undefined reference to function: __dios_tainted_init [ 0:24] KLEE: WARNING: undefined reference to function: klee_free [ 0:24] KLEE: WARNING: undefined reference to function: klee_malloc [ 0:24] KLEE: WARNING ONCE: Using zero size array fix for landingpad instruction filter [ 0:24] i:1 [ 0:24] KLEE: WARNING ONCE: Alignment of memory from call "klee_malloc" is not modelled. Using alignment of 8. [ 0:24] about to __boot:0 [ 0:24] about to run the scheduler:0 [ 0:24] KLEE: WARNING ONCE: calling external: __dios_tainted_init() at /dios/libc/sys/start.cpp:49 5 [ 0:24] KLEE: ERROR: /dios/libc/sys/start.cpp:87: failed external call: __dios_tainted_init [ 0:24] KLEE: NOTE: now ignoring this error at this location [ 0:24] KLEE: ERROR: EXITING ON ERROR: [ 0:24] Error: failed external call: __dios_tainted_init [ 0:24] File: /dios/libc/sys/start.cpp [ 0:24] Line: 87 [ 0:24] assembly.ll line: 245335 [ 0:24] Stack: [ 0:24] #000245335 in __dios_start (l=2, argc=1, argv=94794080060424, envp=94794080129544) at /dios/libc/sys/start.cpp:87 [ 0:24] #100193337 in _ZN6__dios10sched_nullINS_5ClockINS_10NondetKleeINS_4BaseEEEEEE13run_schedulerINS_7ContextEEEvv () at /dios/sys/sched_null.hpp:163 [ 0:24] #200253915 in klee_boot (argc=2, argv=94794006814208) at /dios/arch/klee/boot.c:41 [ 0:24] [ 0:24] [ 0:24] 1 /* TAGS: c++ fin */ [ 0:24] 2 /* CC_OPTS: -std=c++2a */ [ 0:24] 3 /* VERIFY_OPTS: -o nofail:malloc */ [ 0:24] 4 //===----------------------------------------------------------------------===// [ 0:24] 5 // [ 0:24] 6 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. [ 0:24] 7 // See https://llvm.org/LICENSE.txt for license information. [ 0:24] 8 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception [ 0:24] 9 // [ 0:24] 10 //===----------------------------------------------------------------------===// [ 0:24] 11 [ 0:24] 12 // [ 0:24] 13 [ 0:24] 14 // basic_string& [ 0:24] 15 // replace(const_iterator i1, const_iterator i2, const charT* s, size_type n); [ 0:24] 16 [ 0:24] 17 #include [ 0:24] 18 #include [ 0:24] 19 #include [ 0:24] 20 [ 0:24] 21 #include "test_macros.h" [ 0:24] 22 #include "min_allocator.h" [ 0:24] 23 [ 0:24] 24 template [ 0:24] 25 void [ 0:24] 26 test(S s, typename S::size_type pos1, typename S::size_type n1, const typename S::value_type* str, [ 0:24] 27 typename S::size_type n2, S expected) [ 0:24] 28 { [ 0:24] 29 typename S::size_type old_size = s.size(); [ 0:24] 30 typename S::const_iterator first = s.begin() + pos1; [ 0:24] 31 typename S::const_iterator last = s.begin() + pos1 + n1; [ 0:24] 32 typename S::size_type xlen = last - first; [ 0:24] 33 s.replace(first, last, str, n2); [ 0:24] 34 LIBCPP_ASSERT(s.__invariants()); [ 0:24] 35 assert(s == expected); [ 0:24] 36 typename S::size_type rlen = n2; [ 0:24] 37 assert(s.size() == old_size - xlen + rlen); [ 0:24] 38 } [ 0:24] 39 [ 0:24] 40 template [ 0:24] 41 void test0() [ 0:24] 42 { [ 0:24] 43 test(S(""), 0, 0, "", 0, S("")); [ 0:24] 44 test(S(""), 0, 0, "12345", 0, S("")); [ 0:24] 45 test(S(""), 0, 0, "12345", 1, S("1")); [ 0:24] 46 test(S(""), 0, 0, "12345", 2, S("12")); [ 0:24] 47 test(S(""), 0, 0, "12345", 4, S("1234")); [ 0:24] 48 test(S(""), 0, 0, "12345", 5, S("12345")); [ 0:24] 49 test(S(""), 0, 0, "1234567890", 0, S("")); [ 0:24] 50 test(S(""), 0, 0, "1234567890", 1, S("1")); [ 0:24] 51 test(S(""), 0, 0, "1234567890", 5, S("12345")); [ 0:24] 52 test(S(""), 0, 0, "1234567890", 9, S("123456789")); [ 0:24] 53 test(S(""), 0, 0, "1234567890", 10, S("1234567890")); [ 0:24] 54 test(S(""), 0, 0, "12345678901234567890", 0, S("")); [ 0:24] 55 test(S(""), 0, 0, "12345678901234567890", 1, S("1")); [ 0:24] 56 test(S(""), 0, 0, "12345678901234567890", 10, S("1234567890")); [ 0:24] 57 test(S(""), 0, 0, "12345678901234567890", 19, S("1234567890123456789")); [ 0:24] 58 test(S(""), 0, 0, "12345678901234567890", 20, S("12345678901234567890")); [ 0:24] 59 test(S("abcde"), 0, 0, "", 0, S("abcde")); [ 0:24] 60 test(S("abcde"), 0, 0, "12345", 0, S("abcde")); [ 0:24] 61 test(S("abcde"), 0, 0, "12345", 1, S("1abcde")); [ 0:24] 62 test(S("abcde"), 0, 0, "12345", 2, S("12abcde")); [ 0:24] 63 test(S("abcde"), 0, 0, "12345", 4, S("1234abcde")); [ 0:24] 64 test(S("abcde"), 0, 0, "12345", 5, S("12345abcde")); [ 0:24] 65 test(S("abcde"), 0, 0, "1234567890", 0, S("abcde")); [ 0:24] 66 test(S("abcde"), 0, 0, "1234567890", 1, S("1abcde")); [ 0:24] 67 test(S("abcde"), 0, 0, "1234567890", 5, S("12345abcde")); [ 0:24] 68 test(S("abcde"), 0, 0, "1234567890", 9, S("123456789abcde")); [ 0:24] 69 test(S("abcde"), 0, 0, "1234567890", 10, S("1234567890abcde")); [ 0:24] 70 test(S("abcde"), 0, 0, "12345678901234567890", 0, S("abcde")); [ 0:24] 71 test(S("abcde"), 0, 0, "12345678901234567890", 1, S("1abcde")); [ 0:24] 72 test(S("abcde"), 0, 0, "12345678901234567890", 10, S("1234567890abcde")); [ 0:24] 73 test(S("abcde"), 0, 0, "12345678901234567890", 19, S("1234567890123456789abcde")); [ 0:24] 74 test(S("abcde"), 0, 0, "12345678901234567890", 20, S("12345678901234567890abcde")); [ 0:24] 75 test(S("abcde"), 0, 1, "", 0, S("bcde")); [ 0:24] 76 test(S("abcde"), 0, 1, "12345", 0, S("bcde")); [ 0:24] 77 test(S("abcde"), 0, 1, "12345", 1, S("1bcde")); [ 0:24] 78 test(S("abcde"), 0, 1, "12345", 2, S("12bcde")); [ 0:24] 79 test(S("abcde"), 0, 1, "12345", 4, S("1234bcde")); [ 0:24] 80 test(S("abcde"), 0, 1, "12345", 5, S("12345bcde")); [ 0:24] 81 test(S("abcde"), 0, 1, "1234567890", 0, S("bcde")); [ 0:24] 82 test(S("abcde"), 0, 1, "1234567890", 1, S("1bcde")); [ 0:24] 83 test(S("abcde"), 0, 1, "1234567890", 5, S("12345bcde")); [ 0:24] 84 test(S("abcde"), 0, 1, "1234567890", 9, S("123456789bcde")); [ 0:24] 85 test(S("abcde"), 0, 1, "1234567890", 10, S("1234567890bcde")); [ 0:24] 86 test(S("abcde"), 0, 1, "12345678901234567890", 0, S("bcde")); [ 0:24] 87 test(S("abcde"), 0, 1, "12345678901234567890", 1, S("1bcde")); [ 0:24] 88 test(S("abcde"), 0, 1, "12345678901234567890", 10, S("1234567890bcde")); [ 0:24] 89 test(S("abcde"), 0, 1, "12345678901234567890", 19, S("1234567890123456789bcde")); [ 0:24] 90 test(S("abcde"), 0, 1, "12345678901234567890", 20, S("12345678901234567890bcde")); [ 0:24] 91 test(S("abcde"), 0, 2, "", 0, S("cde")); [ 0:24] 92 test(S("abcde"), 0, 2, "12345", 0, S("cde")); [ 0:24] 93 test(S("abcde"), 0, 2, "12345", 1, S("1cde")); [ 0:24] 94 test(S("abcde"), 0, 2, "12345", 2, S("12cde")); [ 0:24] 95 test(S("abcde"), 0, 2, "12345", 4, S("1234cde")); [ 0:24] 96 test(S("abcde"), 0, 2, "12345", 5, S("12345cde")); [ 0:24] 97 test(S("abcde"), 0, 2, "1234567890", 0, S("cde")); [ 0:24] 98 test(S("abcde"), 0, 2, "1234567890", 1, S("1cde")); [ 0:24] 99 test(S("abcde"), 0, 2, "1234567890", 5, S("12345cde")); [ 0:24] 100 test(S("abcde"), 0, 2, "1234567890", 9, S("123456789cde")); [ 0:24] 101 test(S("abcde"), 0, 2, "1234567890", 10, S("1234567890cde")); [ 0:24] 102 test(S("abcde"), 0, 2, "12345678901234567890", 0, S("cde")); [ 0:24] 103 test(S("abcde"), 0, 2, "12345678901234567890", 1, S("1cde")); [ 0:24] 104 test(S("abcde"), 0, 2, "12345678901234567890", 10, S("1234567890cde")); [ 0:24] 105 test(S("abcde"), 0, 2, "12345678901234567890", 19, S("1234567890123456789cde")); [ 0:24] 106 test(S("abcde"), 0, 2, "12345678901234567890", 20, S("12345678901234567890cde")); [ 0:24] 107 test(S("abcde"), 0, 4, "", 0, S("e")); [ 0:24] 108 test(S("abcde"), 0, 4, "12345", 0, S("e")); [ 0:24] 109 test(S("abcde"), 0, 4, "12345", 1, S("1e")); [ 0:24] 110 test(S("abcde"), 0, 4, "12345", 2, S("12e")); [ 0:24] 111 test(S("abcde"), 0, 4, "12345", 4, S("1234e")); [ 0:24] 112 test(S("abcde"), 0, 4, "12345", 5, S("12345e")); [ 0:24] 113 test(S("abcde"), 0, 4, "1234567890", 0, S("e")); [ 0:24] 114 test(S("abcde"), 0, 4, "1234567890", 1, S("1e")); [ 0:24] 115 test(S("abcde"), 0, 4, "1234567890", 5, S("12345e")); [ 0:24] 116 test(S("abcde"), 0, 4, "1234567890", 9, S("123456789e")); [ 0:24] 117 test(S("abcde"), 0, 4, "1234567890", 10, S("1234567890e")); [ 0:24] 118 test(S("abcde"), 0, 4, "12345678901234567890", 0, S("e")); [ 0:24] 119 test(S("abcde"), 0, 4, "12345678901234567890", 1, S("1e")); [ 0:24] 120 test(S("abcde"), 0, 4, "12345678901234567890", 10, S("1234567890e")); [ 0:24] 121 test(S("abcde"), 0, 4, "12345678901234567890", 19, S("1234567890123456789e")); [ 0:24] 122 test(S("abcde"), 0, 4, "12345678901234567890", 20, S("12345678901234567890e")); [ 0:24] 123 test(S("abcde"), 0, 5, "", 0, S("")); [ 0:24] 124 test(S("abcde"), 0, 5, "12345", 0, S("")); [ 0:24] 125 test(S("abcde"), 0, 5, "12345", 1, S("1")); [ 0:24] 126 test(S("abcde"), 0, 5, "12345", 2, S("12")); [ 0:24] 127 test(S("abcde"), 0, 5, "12345", 4, S("1234")); [ 0:24] 128 test(S("abcde"), 0, 5, "12345", 5, S("12345")); [ 0:24] 129 test(S("abcde"), 0, 5, "1234567890", 0, S("")); [ 0:24] 130 test(S("abcde"), 0, 5, "1234567890", 1, S("1")); [ 0:24] 131 test(S("abcde"), 0, 5, "1234567890", 5, S("12345")); [ 0:24] 132 test(S("abcde"), 0, 5, "1234567890", 9, S("123456789")); [ 0:24] 133 test(S("abcde"), 0, 5, "1234567890", 10, S("1234567890")); [ 0:24] 134 test(S("abcde"), 0, 5, "12345678901234567890", 0, S("")); [ 0:24] 135 test(S("abcde"), 0, 5, "12345678901234567890", 1, S("1")); [ 0:24] 136 test(S("abcde"), 0, 5, "12345678901234567890", 10, S("1234567890")); [ 0:24] 137 test(S("abcde"), 0, 5, "12345678901234567890", 19, S("1234567890123456789")); [ 0:24] 138 test(S("abcde"), 0, 5, "12345678901234567890", 20, S("12345678901234567890")); [ 0:24] 139 test(S("abcde"), 1, 0, "", 0, S("abcde")); [ 0:24] 140 test(S("abcde"), 1, 0, "12345", 0, S("abcde")); [ 0:24] 141 test(S("abcde"), 1, 0, "12345", 1, S("a1bcde")); [ 0:24] 142 test(S("abcde"), 1, 0, "12345", 2, S("a12bcde")); [ 0:24] 143 } [ 0:24] 144 [ 0:24] 145 template [ 0:24] 146 void test1() [ 0:24] 147 { [ 0:24] 148 test(S("abcde"), 1, 0, "12345", 4, S("a1234bcde")); [ 0:24] 149 test(S("abcde"), 1, 0, "12345", 5, S("a12345bcde")); [ 0:24] 150 test(S("abcde"), 1, 0, "1234567890", 0, S("abcde")); [ 0:24] 151 test(S("abcde"), 1, 0, "1234567890", 1, S("a1bcde")); [ 0:24] 152 test(S("abcde"), 1, 0, "1234567890", 5, S("a12345bcde")); [ 0:24] 153 test(S("abcde"), 1, 0, "1234567890", 9, S("a123456789bcde")); [ 0:24] 154 test(S("abcde"), 1, 0, "1234567890", 10, S("a1234567890bcde")); [ 0:24] 155 test(S("abcde"), 1, 0, "12345678901234567890", 0, S("abcde")); [ 0:24] 156 test(S("abcde"), 1, 0, "12345678901234567890", 1, S("a1bcde")); [ 0:24] 157 test(S("abcde"), 1, 0, "12345678901234567890", 10, S("a1234567890bcde")); [ 0:24] 158 test(S("abcde"), 1, 0, "12345678901234567890", 19, S("a1234567890123456789bcde")); [ 0:24] 159 test(S("abcde"), 1, 0, "12345678901234567890", 20, S("a12345678901234567890bcde")); [ 0:24] 160 test(S("abcde"), 1, 1, "", 0, S("acde")); [ 0:24] 161 test(S("abcde"), 1, 1, "12345", 0, S("acde")); [ 0:24] 162 test(S("abcde"), 1, 1, "12345", 1, S("a1cde")); [ 0:24] 163 test(S("abcde"), 1, 1, "12345", 2, S("a12cde")); [ 0:24] 164 test(S("abcde"), 1, 1, "12345", 4, S("a1234cde")); [ 0:24] 165 test(S("abcde"), 1, 1, "12345", 5, S("a12345cde")); [ 0:24] 166 test(S("abcde"), 1, 1, "1234567890", 0, S("acde")); [ 0:24] 167 test(S("abcde"), 1, 1, "1234567890", 1, S("a1cde")); [ 0:24] 168 test(S("abcde"), 1, 1, "1234567890", 5, S("a12345cde")); [ 0:24] 169 test(S("abcde"), 1, 1, "1234567890", 9, S("a123456789cde")); [ 0:24] 170 test(S("abcde"), 1, 1, "1234567890", 10, S("a1234567890cde")); [ 0:24] 171 test(S("abcde"), 1, 1, "12345678901234567890", 0, S("acde")); [ 0:24] 172 test(S("abcde"), 1, 1, "12345678901234567890", 1, S("a1cde")); [ 0:24] 173 test(S("abcde"), 1, 1, "12345678901234567890", 10, S("a1234567890cde")); [ 0:24] 174 test(S("abcde"), 1, 1, "12345678901234567890", 19, S("a1234567890123456789cde")); [ 0:24] 175 test(S("abcde"), 1, 1, "12345678901234567890", 20, S("a12345678901234567890cde")); [ 0:24] 176 test(S("abcde"), 1, 2, "", 0, S("ade")); [ 0:24] 177 test(S("abcde"), 1, 2, "12345", 0, S("ade")); [ 0:24] 178 test(S("abcde"), 1, 2, "12345", 1, S("a1de")); [ 0:24] 179 test(S("abcde"), 1, 2, "12345", 2, S("a12de")); [ 0:24] 180 test(S("abcde"), 1, 2, "12345", 4, S("a1234de")); [ 0:24] 181 test(S("abcde"), 1, 2, "12345", 5, S("a12345de")); [ 0:24] 182 test(S("abcde"), 1, 2, "1234567890", 0, S("ade")); [ 0:24] 183 test(S("abcde"), 1, 2, "1234567890", 1, S("a1de")); [ 0:24] 184 test(S("abcde"), 1, 2, "1234567890", 5, S("a12345de")); [ 0:24] 185 test(S("abcde"), 1, 2, "1234567890", 9, S("a123456789de")); [ 0:24] 186 test(S("abcde"), 1, 2, "1234567890", 10, S("a1234567890de")); [ 0:24] 187 test(S("abcde"), 1, 2, "12345678901234567890", 0, S("ade")); [ 0:24] 188 test(S("abcde"), 1, 2, "12345678901234567890", 1, S("a1de")); [ 0:24] 189 test(S("abcde"), 1, 2, "12345678901234567890", 10, S("a1234567890de")); [ 0:24] 190 test(S("abcde"), 1, 2, "12345678901234567890", 19, S("a1234567890123456789de")); [ 0:24] 191 test(S("abcde"), 1, 2, "12345678901234567890", 20, S("a12345678901234567890de")); [ 0:24] 192 test(S("abcde"), 1, 3, "", 0, S("ae")); [ 0:24] 193 test(S("abcde"), 1, 3, "12345", 0, S("ae")); [ 0:24] 194 test(S("abcde"), 1, 3, "12345", 1, S("a1e")); [ 0:24] 195 test(S("abcde"), 1, 3, "12345", 2, S("a12e")); [ 0:24] 196 test(S("abcde"), 1, 3, "12345", 4, S("a1234e")); [ 0:24] 197 test(S("abcde"), 1, 3, "12345", 5, S("a12345e")); [ 0:24] 198 test(S("abcde"), 1, 3, "1234567890", 0, S("ae")); [ 0:24] 199 test(S("abcde"), 1, 3, "1234567890", 1, S("a1e")); [ 0:24] 200 test(S("abcde"), 1, 3, "1234567890", 5, S("a12345e")); [ 0:24] 201 test(S("abcde"), 1, 3, "1234567890", 9, S("a123456789e")); [ 0:24] 202 test(S("abcde"), 1, 3, "1234567890", 10, S("a1234567890e")); [ 0:24] 203 test(S("abcde"), 1, 3, "12345678901234567890", 0, S("ae")); [ 0:24] 204 test(S("abcde"), 1, 3, "12345678901234567890", 1, S("a1e")); [ 0:24] 205 test(S("abcde"), 1, 3, "12345678901234567890", 10, S("a1234567890e")); [ 0:24] 206 test(S("abcde"), 1, 3, "12345678901234567890", 19, S("a1234567890123456789e")); [ 0:24] 207 test(S("abcde"), 1, 3, "12345678901234567890", 20, S("a12345678901234567890e")); [ 0:24] 208 test(S("abcde"), 1, 4, "", 0, S("a")); [ 0:24] 209 test(S("abcde"), 1, 4, "12345", 0, S("a")); [ 0:24] 210 test(S("abcde"), 1, 4, "12345", 1, S("a1")); [ 0:24] 211 test(S("abcde"), 1, 4, "12345", 2, S("a12")); [ 0:24] 212 test(S("abcde"), 1, 4, "12345", 4, S("a1234")); [ 0:24] 213 test(S("abcde"), 1, 4, "12345", 5, S("a12345")); [ 0:24] 214 test(S("abcde"), 1, 4, "1234567890", 0, S("a")); [ 0:24] 215 test(S("abcde"), 1, 4, "1234567890", 1, S("a1")); [ 0:24] 216 test(S("abcde"), 1, 4, "1234567890", 5, S("a12345")); [ 0:24] 217 test(S("abcde"), 1, 4, "1234567890", 9, S("a123456789")); [ 0:24] 218 test(S("abcde"), 1, 4, "1234567890", 10, S("a1234567890")); [ 0:24] 219 test(S("abcde"), 1, 4, "12345678901234567890", 0, S("a")); [ 0:24] 220 test(S("abcde"), 1, 4, "12345678901234567890", 1, S("a1")); [ 0:24] 221 test(S("abcde"), 1, 4, "12345678901234567890", 10, S("a1234567890")); [ 0:24] 222 test(S("abcde"), 1, 4, "12345678901234567890", 19, S("a1234567890123456789")); [ 0:24] 223 test(S("abcde"), 1, 4, "12345678901234567890", 20, S("a12345678901234567890")); [ 0:24] 224 test(S("abcde"), 2, 0, "", 0, S("abcde")); [ 0:24] 225 test(S("abcde"), 2, 0, "12345", 0, S("abcde")); [ 0:24] 226 test(S("abcde"), 2, 0, "12345", 1, S("ab1cde")); [ 0:24] 227 test(S("abcde"), 2, 0, "12345", 2, S("ab12cde")); [ 0:24] 228 test(S("abcde"), 2, 0, "12345", 4, S("ab1234cde")); [ 0:24] 229 test(S("abcde"), 2, 0, "12345", 5, S("ab12345cde")); [ 0:24] 230 test(S("abcde"), 2, 0, "1234567890", 0, S("abcde")); [ 0:24] 231 test(S("abcde"), 2, 0, "1234567890", 1, S("ab1cde")); [ 0:24] 232 test(S("abcde"), 2, 0, "1234567890", 5, S("ab12345cde")); [ 0:24] 233 test(S("abcde"), 2, 0, "1234567890", 9, S("ab123456789cde")); [ 0:24] 234 test(S("abcde"), 2, 0, "1234567890", 10, S("ab1234567890cde")); [ 0:24] 235 test(S("abcde"), 2, 0, "12345678901234567890", 0, S("abcde")); [ 0:24] 236 test(S("abcde"), 2, 0, "12345678901234567890", 1, S("ab1cde")); [ 0:24] 237 test(S("abcde"), 2, 0, "12345678901234567890", 10, S("ab1234567890cde")); [ 0:24] 238 test(S("abcde"), 2, 0, "12345678901234567890", 19, S("ab1234567890123456789cde")); [ 0:24] 239 test(S("abcde"), 2, 0, "12345678901234567890", 20, S("ab12345678901234567890cde")); [ 0:24] 240 test(S("abcde"), 2, 1, "", 0, S("abde")); [ 0:24] 241 test(S("abcde"), 2, 1, "12345", 0, S("abde")); [ 0:24] 242 test(S("abcde"), 2, 1, "12345", 1, S("ab1de")); [ 0:24] 243 test(S("abcde"), 2, 1, "12345", 2, S("ab12de")); [ 0:24] 244 test(S("abcde"), 2, 1, "12345", 4, S("ab1234de")); [ 0:24] 245 test(S("abcde"), 2, 1, "12345", 5, S("ab12345de")); [ 0:24] 246 test(S("abcde"), 2, 1, "1234567890", 0, S("abde")); [ 0:24] 247 test(S("abcde"), 2, 1, "1234567890", 1, S("ab1de")); [ 0:24] 248 } [ 0:24] 249 [ 0:24] 250 template [ 0:24] 251 void test2() [ 0:24] 252 { [ 0:24] 253 test(S("abcde"), 2, 1, "1234567890", 5, S("ab12345de")); [ 0:24] 254 test(S("abcde"), 2, 1, "1234567890", 9, S("ab123456789de")); [ 0:24] 255 test(S("abcde"), 2, 1, "1234567890", 10, S("ab1234567890de")); [ 0:24] 256 test(S("abcde"), 2, 1, "12345678901234567890", 0, S("abde")); [ 0:24] 257 test(S("abcde"), 2, 1, "12345678901234567890", 1, S("ab1de")); [ 0:24] 258 test(S("abcde"), 2, 1, "12345678901234567890", 10, S("ab1234567890de")); [ 0:24] 259 test(S("abcde"), 2, 1, "12345678901234567890", 19, S("ab1234567890123456789de")); [ 0:24] 260 test(S("abcde"), 2, 1, "12345678901234567890", 20, S("ab12345678901234567890de")); [ 0:24] 261 test(S("abcde"), 2, 2, "", 0, S("abe")); [ 0:24] 262 test(S("abcde"), 2, 2, "12345", 0, S("abe")); [ 0:24] 263 test(S("abcde"), 2, 2, "12345", 1, S("ab1e")); [ 0:24] 264 test(S("abcde"), 2, 2, "12345", 2, S("ab12e")); [ 0:24] 265 test(S("abcde"), 2, 2, "12345", 4, S("ab1234e")); [ 0:24] 266 test(S("abcde"), 2, 2, "12345", 5, S("ab12345e")); [ 0:24] 267 test(S("abcde"), 2, 2, "1234567890", 0, S("abe")); [ 0:24] 268 test(S("abcde"), 2, 2, "1234567890", 1, S("ab1e")); [ 0:24] 269 test(S("abcde"), 2, 2, "1234567890", 5, S("ab12345e")); [ 0:24] 270 test(S("abcde"), 2, 2, "1234567890", 9, S("ab123456789e")); [ 0:24] 271 test(S("abcde"), 2, 2, "1234567890", 10, S("ab1234567890e")); [ 0:24] 272 test(S("abcde"), 2, 2, "12345678901234567890", 0, S("abe")); [ 0:24] 273 test(S("abcde"), 2, 2, "12345678901234567890", 1, S("ab1e")); [ 0:24] 274 test(S("abcde"), 2, 2, "12345678901234567890", 10, S("ab1234567890e")); [ 0:24] 275 test(S("abcde"), 2, 2, "12345678901234567890", 19, S("ab1234567890123456789e")); [ 0:24] 276 test(S("abcde"), 2, 2, "12345678901234567890", 20, S("ab12345678901234567890e")); [ 0:24] 277 test(S("abcde"), 2, 3, "", 0, S("ab")); [ 0:24] 278 test(S("abcde"), 2, 3, "12345", 0, S("ab")); [ 0:24] 279 test(S("abcde"), 2, 3, "12345", 1, S("ab1")); [ 0:24] 280 test(S("abcde"), 2, 3, "12345", 2, S("ab12")); [ 0:24] 281 test(S("abcde"), 2, 3, "12345", 4, S("ab1234")); [ 0:24] 282 test(S("abcde"), 2, 3, "12345", 5, S("ab12345")); [ 0:24] 283 test(S("abcde"), 2, 3, "1234567890", 0, S("ab")); [ 0:24] 284 test(S("abcde"), 2, 3, "1234567890", 1, S("ab1")); [ 0:24] 285 test(S("abcde"), 2, 3, "1234567890", 5, S("ab12345")); [ 0:24] 286 test(S("abcde"), 2, 3, "1234567890", 9, S("ab123456789")); [ 0:24] 287 test(S("abcde"), 2, 3, "1234567890", 10, S("ab1234567890")); [ 0:24] 288 test(S("abcde"), 2, 3, "12345678901234567890", 0, S("ab")); [ 0:24] 289 test(S("abcde"), 2, 3, "12345678901234567890", 1, S("ab1")); [ 0:24] 290 test(S("abcde"), 2, 3, "12345678901234567890", 10, S("ab1234567890")); [ 0:24] 291 test(S("abcde"), 2, 3, "12345678901234567890", 19, S("ab1234567890123456789")); [ 0:24] 292 test(S("abcde"), 2, 3, "12345678901234567890", 20, S("ab12345678901234567890")); [ 0:24] 293 test(S("abcde"), 4, 0, "", 0, S("abcde")); [ 0:24] 294 test(S("abcde"), 4, 0, "12345", 0, S("abcde")); [ 0:24] 295 test(S("abcde"), 4, 0, "12345", 1, S("abcd1e")); [ 0:24] 296 test(S("abcde"), 4, 0, "12345", 2, S("abcd12e")); [ 0:24] 297 test(S("abcde"), 4, 0, "12345", 4, S("abcd1234e")); [ 0:24] 298 test(S("abcde"), 4, 0, "12345", 5, S("abcd12345e")); [ 0:24] 299 test(S("abcde"), 4, 0, "1234567890", 0, S("abcde")); [ 0:24] 300 test(S("abcde"), 4, 0, "1234567890", 1, S("abcd1e")); [ 0:24] 301 test(S("abcde"), 4, 0, "1234567890", 5, S("abcd12345e")); [ 0:24] 302 test(S("abcde"), 4, 0, "1234567890", 9, S("abcd123456789e")); [ 0:24] 303 test(S("abcde"), 4, 0, "1234567890", 10, S("abcd1234567890e")); [ 0:24] 304 test(S("abcde"), 4, 0, "12345678901234567890", 0, S("abcde")); [ 0:24] 305 test(S("abcde"), 4, 0, "12345678901234567890", 1, S("abcd1e")); [ 0:24] 306 test(S("abcde"), 4, 0, "12345678901234567890", 10, S("abcd1234567890e")); [ 0:24] 307 test(S("abcde"), 4, 0, "12345678901234567890", 19, S("abcd1234567890123456789e")); [ 0:24] 308 test(S("abcde"), 4, 0, "12345678901234567890", 20, S("abcd12345678901234567890e")); [ 0:24] 309 test(S("abcde"), 4, 1, "", 0, S("abcd")); [ 0:24] 310 test(S("abcde"), 4, 1, "12345", 0, S("abcd")); [ 0:24] 311 test(S("abcde"), 4, 1, "12345", 1, S("abcd1")); [ 0:24] 312 test(S("abcde"), 4, 1, "12345", 2, S("abcd12")); [ 0:24] 313 test(S("abcde"), 4, 1, "12345", 4, S("abcd1234")); [ 0:24] 314 test(S("abcde"), 4, 1, "12345", 5, S("abcd12345")); [ 0:24] 315 test(S("abcde"), 4, 1, "1234567890", 0, S("abcd")); [ 0:24] 316 test(S("abcde"), 4, 1, "1234567890", 1, S("abcd1")); [ 0:24] 317 test(S("abcde"), 4, 1, "1234567890", 5, S("abcd12345")); [ 0:24] 318 test(S("abcde"), 4, 1, "1234567890", 9, S("abcd123456789")); [ 0:24] 319 test(S("abcde"), 4, 1, "1234567890", 10, S("abcd1234567890")); [ 0:24] 320 test(S("abcde"), 4, 1, "12345678901234567890", 0, S("abcd")); [ 0:24] 321 test(S("abcde"), 4, 1, "12345678901234567890", 1, S("abcd1")); [ 0:24] 322 test(S("abcde"), 4, 1, "12345678901234567890", 10, S("abcd1234567890")); [ 0:24] 323 test(S("abcde"), 4, 1, "12345678901234567890", 19, S("abcd1234567890123456789")); [ 0:24] 324 test(S("abcde"), 4, 1, "12345678901234567890", 20, S("abcd12345678901234567890")); [ 0:24] 325 test(S("abcde"), 5, 0, "", 0, S("abcde")); [ 0:24] 326 test(S("abcde"), 5, 0, "12345", 0, S("abcde")); [ 0:24] 327 test(S("abcde"), 5, 0, "12345", 1, S("abcde1")); [ 0:24] 328 test(S("abcde"), 5, 0, "12345", 2, S("abcde12")); [ 0:24] 329 test(S("abcde"), 5, 0, "12345", 4, S("abcde1234")); [ 0:24] 330 test(S("abcde"), 5, 0, "12345", 5, S("abcde12345")); [ 0:24] 331 test(S("abcde"), 5, 0, "1234567890", 0, S("abcde")); [ 0:24] 332 test(S("abcde"), 5, 0, "1234567890", 1, S("abcde1")); [ 0:24] 333 test(S("abcde"), 5, 0, "1234567890", 5, S("abcde12345")); [ 0:24] 334 test(S("abcde"), 5, 0, "1234567890", 9, S("abcde123456789")); [ 0:24] 335 test(S("abcde"), 5, 0, "1234567890", 10, S("abcde1234567890")); [ 0:24] 336 test(S("abcde"), 5, 0, "12345678901234567890", 0, S("abcde")); [ 0:24] 337 test(S("abcde"), 5, 0, "12345678901234567890", 1, S("abcde1")); [ 0:24] 338 test(S("abcde"), 5, 0, "12345678901234567890", 10, S("abcde1234567890")); [ 0:24] 339 test(S("abcde"), 5, 0, "12345678901234567890", 19, S("abcde1234567890123456789")); [ 0:24] 340 test(S("abcde"), 5, 0, "12345678901234567890", 20, S("abcde12345678901234567890")); [ 0:24] 341 test(S("abcdefghij"), 0, 0, "", 0, S("abcdefghij")); [ 0:24] 342 test(S("abcdefghij"), 0, 0, "12345", 0, S("abcdefghij")); [ 0:24] 343 test(S("abcdefghij"), 0, 0, "12345", 1, S("1abcdefghij")); [ 0:24] 344 test(S("abcdefghij"), 0, 0, "12345", 2, S("12abcdefghij")); [ 0:24] 345 test(S("abcdefghij"), 0, 0, "12345", 4, S("1234abcdefghij")); [ 0:24] 346 test(S("abcdefghij"), 0, 0, "12345", 5, S("12345abcdefghij")); [ 0:24] 347 test(S("abcdefghij"), 0, 0, "1234567890", 0, S("abcdefghij")); [ 0:24] 348 test(S("abcdefghij"), 0, 0, "1234567890", 1, S("1abcdefghij")); [ 0:24] 349 test(S("abcdefghij"), 0, 0, "1234567890", 5, S("12345abcdefghij")); [ 0:24] 350 test(S("abcdefghij"), 0, 0, "1234567890", 9, S("123456789abcdefghij")); [ 0:24] 351 test(S("abcdefghij"), 0, 0, "1234567890", 10, S("1234567890abcdefghij")); [ 0:24] 352 test(S("abcdefghij"), 0, 0, "12345678901234567890", 0, S("abcdefghij")); [ 0:24] 353 } [ 0:24] 354 [ 0:24] 355 template [ 0:24] 356 void test3() [ 0:24] 357 { [ 0:24] 358 test(S("abcdefghij"), 0, 0, "12345678901234567890", 1, S("1abcdefghij")); [ 0:24] 359 test(S("abcdefghij"), 0, 0, "12345678901234567890", 10, S("1234567890abcdefghij")); [ 0:24] 360 test(S("abcdefghij"), 0, 0, "12345678901234567890", 19, S("1234567890123456789abcdefghij")); [ 0:24] 361 test(S("abcdefghij"), 0, 0, "12345678901234567890", 20, S("12345678901234567890abcdefghij")); [ 0:24] 362 test(S("abcdefghij"), 0, 1, "", 0, S("bcdefghij")); [ 0:24] 363 test(S("abcdefghij"), 0, 1, "12345", 0, S("bcdefghij")); [ 0:24] 364 test(S("abcdefghij"), 0, 1, "12345", 1, S("1bcdefghij")); [ 0:24] 365 test(S("abcdefghij"), 0, 1, "12345", 2, S("12bcdefghij")); [ 0:24] 366 test(S("abcdefghij"), 0, 1, "12345", 4, S("1234bcdefghij")); [ 0:24] 367 test(S("abcdefghij"), 0, 1, "12345", 5, S("12345bcdefghij")); [ 0:24] 368 test(S("abcdefghij"), 0, 1, "1234567890", 0, S("bcdefghij")); [ 0:24] 369 test(S("abcdefghij"), 0, 1, "1234567890", 1, S("1bcdefghij")); [ 0:24] 370 test(S("abcdefghij"), 0, 1, "1234567890", 5, S("12345bcdefghij")); [ 0:24] 371 test(S("abcdefghij"), 0, 1, "1234567890", 9, S("123456789bcdefghij")); [ 0:24] 372 test(S("abcdefghij"), 0, 1, "1234567890", 10, S("1234567890bcdefghij")); [ 0:24] 373 test(S("abcdefghij"), 0, 1, "12345678901234567890", 0, S("bcdefghij")); [ 0:24] 374 test(S("abcdefghij"), 0, 1, "12345678901234567890", 1, S("1bcdefghij")); [ 0:24] 375 test(S("abcdefghij"), 0, 1, "12345678901234567890", 10, S("1234567890bcdefghij")); [ 0:24] 376 test(S("abcdefghij"), 0, 1, "12345678901234567890", 19, S("1234567890123456789bcdefghij")); [ 0:24] 377 test(S("abcdefghij"), 0, 1, "12345678901234567890", 20, S("12345678901234567890bcdefghij")); [ 0:24] 378 test(S("abcdefghij"), 0, 5, "", 0, S("fghij")); [ 0:24] 379 test(S("abcdefghij"), 0, 5, "12345", 0, S("fghij")); [ 0:24] 380 test(S("abcdefghij"), 0, 5, "12345", 1, S("1fghij")); [ 0:24] 381 test(S("abcdefghij"), 0, 5, "12345", 2, S("12fghij")); [ 0:24] 382 test(S("abcdefghij"), 0, 5, "12345", 4, S("1234fghij")); [ 0:24] 383 test(S("abcdefghij"), 0, 5, "12345", 5, S("12345fghij")); [ 0:24] 384 test(S("abcdefghij"), 0, 5, "1234567890", 0, S("fghij")); [ 0:24] 385 test(S("abcdefghij"), 0, 5, "1234567890", 1, S("1fghij")); [ 0:24] 386 test(S("abcdefghij"), 0, 5, "1234567890", 5, S("12345fghij")); [ 0:24] 387 test(S("abcdefghij"), 0, 5, "1234567890", 9, S("123456789fghij")); [ 0:24] 388 test(S("abcdefghij"), 0, 5, "1234567890", 10, S("1234567890fghij")); [ 0:24] 389 test(S("abcdefghij"), 0, 5, "12345678901234567890", 0, S("fghij")); [ 0:24] 390 test(S("abcdefghij"), 0, 5, "12345678901234567890", 1, S("1fghij")); [ 0:24] 391 test(S("abcdefghij"), 0, 5, "12345678901234567890", 10, S("1234567890fghij")); [ 0:24] 392 test(S("abcdefghij"), 0, 5, "12345678901234567890", 19, S("1234567890123456789fghij")); [ 0:24] 393 test(S("abcdefghij"), 0, 5, "12345678901234567890", 20, S("12345678901234567890fghij")); [ 0:24] 394 test(S("abcdefghij"), 0, 9, "", 0, S("j")); [ 0:24] 395 test(S("abcdefghij"), 0, 9, "12345", 0, S("j")); [ 0:24] 396 test(S("abcdefghij"), 0, 9, "12345", 1, S("1j")); [ 0:24] 397 test(S("abcdefghij"), 0, 9, "12345", 2, S("12j")); [ 0:24] 398 test(S("abcdefghij"), 0, 9, "12345", 4, S("1234j")); [ 0:24] 399 test(S("abcdefghij"), 0, 9, "12345", 5, S("12345j")); [ 0:24] 400 test(S("abcdefghij"), 0, 9, "1234567890", 0, S("j")); [ 0:24] 401 test(S("abcdefghij"), 0, 9, "1234567890", 1, S("1j")); [ 0:24] 402 test(S("abcdefghij"), 0, 9, "1234567890", 5, S("12345j")); [ 0:24] 403 test(S("abcdefghij"), 0, 9, "1234567890", 9, S("123456789j")); [ 0:24] 404 test(S("abcdefghij"), 0, 9, "1234567890", 10, S("1234567890j")); [ 0:24] 405 test(S("abcdefghij"), 0, 9, "12345678901234567890", 0, S("j")); [ 0:24] 406 test(S("abcdefghij"), 0, 9, "12345678901234567890", 1, S("1j")); [ 0:24] 407 test(S("abcdefghij"), 0, 9, "12345678901234567890", 10, S("1234567890j")); [ 0:24] 408 test(S("abcdefghij"), 0, 9, "12345678901234567890", 19, S("1234567890123456789j")); [ 0:24] 409 test(S("abcdefghij"), 0, 9, "12345678901234567890", 20, S("12345678901234567890j")); [ 0:24] 410 test(S("abcdefghij"), 0, 10, "", 0, S("")); [ 0:24] 411 test(S("abcdefghij"), 0, 10, "12345", 0, S("")); [ 0:24] 412 test(S("abcdefghij"), 0, 10, "12345", 1, S("1")); [ 0:24] 413 test(S("abcdefghij"), 0, 10, "12345", 2, S("12")); [ 0:24] 414 test(S("abcdefghij"), 0, 10, "12345", 4, S("1234")); [ 0:24] 415 test(S("abcdefghij"), 0, 10, "12345", 5, S("12345")); [ 0:24] 416 test(S("abcdefghij"), 0, 10, "1234567890", 0, S("")); [ 0:24] 417 test(S("abcdefghij"), 0, 10, "1234567890", 1, S("1")); [ 0:24] 418 test(S("abcdefghij"), 0, 10, "1234567890", 5, S("12345")); [ 0:24] 419 test(S("abcdefghij"), 0, 10, "1234567890", 9, S("123456789")); [ 0:24] 420 test(S("abcdefghij"), 0, 10, "1234567890", 10, S("1234567890")); [ 0:24] 421 test(S("abcdefghij"), 0, 10, "12345678901234567890", 0, S("")); [ 0:24] 422 test(S("abcdefghij"), 0, 10, "12345678901234567890", 1, S("1")); [ 0:24] 423 test(S("abcdefghij"), 0, 10, "12345678901234567890", 10, S("1234567890")); [ 0:24] 424 test(S("abcdefghij"), 0, 10, "12345678901234567890", 19, S("1234567890123456789")); [ 0:24] 425 test(S("abcdefghij"), 0, 10, "12345678901234567890", 20, S("12345678901234567890")); [ 0:24] 426 test(S("abcdefghij"), 1, 0, "", 0, S("abcdefghij")); [ 0:24] 427 test(S("abcdefghij"), 1, 0, "12345", 0, S("abcdefghij")); [ 0:24] 428 test(S("abcdefghij"), 1, 0, "12345", 1, S("a1bcdefghij")); [ 0:24] 429 test(S("abcdefghij"), 1, 0, "12345", 2, S("a12bcdefghij")); [ 0:24] 430 test(S("abcdefghij"), 1, 0, "12345", 4, S("a1234bcdefghij")); [ 0:24] 431 test(S("abcdefghij"), 1, 0, "12345", 5, S("a12345bcdefghij")); [ 0:24] 432 test(S("abcdefghij"), 1, 0, "1234567890", 0, S("abcdefghij")); [ 0:24] 433 test(S("abcdefghij"), 1, 0, "1234567890", 1, S("a1bcdefghij")); [ 0:24] 434 test(S("abcdefghij"), 1, 0, "1234567890", 5, S("a12345bcdefghij")); [ 0:24] 435 test(S("abcdefghij"), 1, 0, "1234567890", 9, S("a123456789bcdefghij")); [ 0:24] 436 test(S("abcdefghij"), 1, 0, "1234567890", 10, S("a1234567890bcdefghij")); [ 0:24] 437 test(S("abcdefghij"), 1, 0, "12345678901234567890", 0, S("abcdefghij")); [ 0:24] 438 test(S("abcdefghij"), 1, 0, "12345678901234567890", 1, S("a1bcdefghij")); [ 0:24] 439 test(S("abcdefghij"), 1, 0, "12345678901234567890", 10, S("a1234567890bcdefghij")); [ 0:24] 440 test(S("abcdefghij"), 1, 0, "12345678901234567890", 19, S("a1234567890123456789bcdefghij")); [ 0:24] 441 test(S("abcdefghij"), 1, 0, "12345678901234567890", 20, S("a12345678901234567890bcdefghij")); [ 0:24] 442 test(S("abcdefghij"), 1, 1, "", 0, S("acdefghij")); [ 0:24] 443 test(S("abcdefghij"), 1, 1, "12345", 0, S("acdefghij")); [ 0:24] 444 test(S("abcdefghij"), 1, 1, "12345", 1, S("a1cdefghij")); [ 0:24] 445 test(S("abcdefghij"), 1, 1, "12345", 2, S("a12cdefghij")); [ 0:24] 446 test(S("abcdefghij"), 1, 1, "12345", 4, S("a1234cdefghij")); [ 0:24] 447 test(S("abcdefghij"), 1, 1, "12345", 5, S("a12345cdefghij")); [ 0:24] 448 test(S("abcdefghij"), 1, 1, "1234567890", 0, S("acdefghij")); [ 0:24] 449 test(S("abcdefghij"), 1, 1, "1234567890", 1, S("a1cdefghij")); [ 0:24] 450 test(S("abcdefghij"), 1, 1, "1234567890", 5, S("a12345cdefghij")); [ 0:24] 451 test(S("abcdefghij"), 1, 1, "1234567890", 9, S("a123456789cdefghij")); [ 0:24] 452 test(S("abcdefghij"), 1, 1, "1234567890", 10, S("a1234567890cdefghij")); [ 0:24] 453 test(S("abcdefghij"), 1, 1, "12345678901234567890", 0, S("acdefghij")); [ 0:24] 454 test(S("abcdefghij"), 1, 1, "12345678901234567890", 1, S("a1cdefghij")); [ 0:24] 455 test(S("abcdefghij"), 1, 1, "12345678901234567890", 10, S("a1234567890cdefghij")); [ 0:24] 456 test(S("abcdefghij"), 1, 1, "12345678901234567890", 19, S("a1234567890123456789cdefghij")); [ 0:24] 457 test(S("abcdefghij"), 1, 1, "12345678901234567890", 20, S("a12345678901234567890cdefghij")); [ 0:24] 458 } [ 0:24] 459 [ 0:24] 460 template [ 0:24] 461 void test4() [ 0:24] 462 { [ 0:24] 463 test(S("abcdefghij"), 1, 4, "", 0, S("afghij")); [ 0:24] 464 test(S("abcdefghij"), 1, 4, "12345", 0, S("afghij")); [ 0:24] 465 test(S("abcdefghij"), 1, 4, "12345", 1, S("a1fghij")); [ 0:24] 466 test(S("abcdefghij"), 1, 4, "12345", 2, S("a12fghij")); [ 0:24] 467 test(S("abcdefghij"), 1, 4, "12345", 4, S("a1234fghij")); [ 0:24] 468 test(S("abcdefghij"), 1, 4, "12345", 5, S("a12345fghij")); [ 0:24] 469 test(S("abcdefghij"), 1, 4, "1234567890", 0, S("afghij")); [ 0:24] 470 test(S("abcdefghij"), 1, 4, "1234567890", 1, S("a1fghij")); [ 0:24] 471 test(S("abcdefghij"), 1, 4, "1234567890", 5, S("a12345fghij")); [ 0:24] 472 test(S("abcdefghij"), 1, 4, "1234567890", 9, S("a123456789fghij")); [ 0:24] 473 test(S("abcdefghij"), 1, 4, "1234567890", 10, S("a1234567890fghij")); [ 0:24] 474 test(S("abcdefghij"), 1, 4, "12345678901234567890", 0, S("afghij")); [ 0:24] 475 test(S("abcdefghij"), 1, 4, "12345678901234567890", 1, S("a1fghij")); [ 0:24] 476 test(S("abcdefghij"), 1, 4, "12345678901234567890", 10, S("a1234567890fghij")); [ 0:24] 477 test(S("abcdefghij"), 1, 4, "12345678901234567890", 19, S("a1234567890123456789fghij")); [ 0:24] 478 test(S("abcdefghij"), 1, 4, "12345678901234567890", 20, S("a12345678901234567890fghij")); [ 0:24] 479 test(S("abcdefghij"), 1, 8, "", 0, S("aj")); [ 0:24] 480 test(S("abcdefghij"), 1, 8, "12345", 0, S("aj")); [ 0:24] 481 test(S("abcdefghij"), 1, 8, "12345", 1, S("a1j")); [ 0:24] 482 test(S("abcdefghij"), 1, 8, "12345", 2, S("a12j")); [ 0:24] 483 test(S("abcdefghij"), 1, 8, "12345", 4, S("a1234j")); [ 0:24] 484 test(S("abcdefghij"), 1, 8, "12345", 5, S("a12345j")); [ 0:24] 485 test(S("abcdefghij"), 1, 8, "1234567890", 0, S("aj")); [ 0:24] 486 test(S("abcdefghij"), 1, 8, "1234567890", 1, S("a1j")); [ 0:24] 487 test(S("abcdefghij"), 1, 8, "1234567890", 5, S("a12345j")); [ 0:24] 488 test(S("abcdefghij"), 1, 8, "1234567890", 9, S("a123456789j")); [ 0:24] 489 test(S("abcdefghij"), 1, 8, "1234567890", 10, S("a1234567890j")); [ 0:24] 490 test(S("abcdefghij"), 1, 8, "12345678901234567890", 0, S("aj")); [ 0:24] 491 test(S("abcdefghij"), 1, 8, "12345678901234567890", 1, S("a1j")); [ 0:24] 492 test(S("abcdefghij"), 1, 8, "12345678901234567890", 10, S("a1234567890j")); [ 0:24] 493 test(S("abcdefghij"), 1, 8, "12345678901234567890", 19, S("a1234567890123456789j")); [ 0:24] 494 test(S("abcdefghij"), 1, 8, "12345678901234567890", 20, S("a12345678901234567890j")); [ 0:24] 495 test(S("abcdefghij"), 1, 9, "", 0, S("a")); [ 0:24] 496 test(S("abcdefghij"), 1, 9, "12345", 0, S("a")); [ 0:24] 497 test(S("abcdefghij"), 1, 9, "12345", 1, S("a1")); [ 0:24] 498 test(S("abcdefghij"), 1, 9, "12345", 2, S("a12")); [ 0:24] 499 test(S("abcdefghij"), 1, 9, "12345", 4, S("a1234")); [ 0:24] 500 test(S("abcdefghij"), 1, 9, "12345", 5, S("a12345")); [ 0:24] 501 test(S("abcdefghij"), 1, 9, "1234567890", 0, S("a")); [ 0:24] 502 test(S("abcdefghij"), 1, 9, "1234567890", 1, S("a1")); [ 0:24] 503 test(S("abcdefghij"), 1, 9, "1234567890", 5, S("a12345")); [ 0:24] 504 test(S("abcdefghij"), 1, 9, "1234567890", 9, S("a123456789")); [ 0:24] 505 test(S("abcdefghij"), 1, 9, "1234567890", 10, S("a1234567890")); [ 0:24] 506 test(S("abcdefghij"), 1, 9, "12345678901234567890", 0, S("a")); [ 0:24] 507 test(S("abcdefghij"), 1, 9, "12345678901234567890", 1, S("a1")); [ 0:24] 508 test(S("abcdefghij"), 1, 9, "12345678901234567890", 10, S("a1234567890")); [ 0:24] 509 test(S("abcdefghij"), 1, 9, "12345678901234567890", 19, S("a1234567890123456789")); [ 0:24] 510 test(S("abcdefghij"), 1, 9, "12345678901234567890", 20, S("a12345678901234567890")); [ 0:24] 511 test(S("abcdefghij"), 5, 0, "", 0, S("abcdefghij")); [ 0:24] 512 test(S("abcdefghij"), 5, 0, "12345", 0, S("abcdefghij")); [ 0:24] 513 test(S("abcdefghij"), 5, 0, "12345", 1, S("abcde1fghij")); [ 0:24] 514 test(S("abcdefghij"), 5, 0, "12345", 2, S("abcde12fghij")); [ 0:24] 515 test(S("abcdefghij"), 5, 0, "12345", 4, S("abcde1234fghij")); [ 0:24] 516 test(S("abcdefghij"), 5, 0, "12345", 5, S("abcde12345fghij")); [ 0:24] 517 test(S("abcdefghij"), 5, 0, "1234567890", 0, S("abcdefghij")); [ 0:24] 518 test(S("abcdefghij"), 5, 0, "1234567890", 1, S("abcde1fghij")); [ 0:24] 519 test(S("abcdefghij"), 5, 0, "1234567890", 5, S("abcde12345fghij")); [ 0:24] 520 test(S("abcdefghij"), 5, 0, "1234567890", 9, S("abcde123456789fghij")); [ 0:24] 521 test(S("abcdefghij"), 5, 0, "1234567890", 10, S("abcde1234567890fghij")); [ 0:24] 522 test(S("abcdefghij"), 5, 0, "12345678901234567890", 0, S("abcdefghij")); [ 0:24] 523 test(S("abcdefghij"), 5, 0, "12345678901234567890", 1, S("abcde1fghij")); [ 0:24] 524 test(S("abcdefghij"), 5, 0, "12345678901234567890", 10, S("abcde1234567890fghij")); [ 0:24] 525 test(S("abcdefghij"), 5, 0, "12345678901234567890", 19, S("abcde1234567890123456789fghij")); [ 0:24] 526 test(S("abcdefghij"), 5, 0, "12345678901234567890", 20, S("abcde12345678901234567890fghij")); [ 0:24] 527 test(S("abcdefghij"), 5, 1, "", 0, S("abcdeghij")); [ 0:24] 528 test(S("abcdefghij"), 5, 1, "12345", 0, S("abcdeghij")); [ 0:24] 529 test(S("abcdefghij"), 5, 1, "12345", 1, S("abcde1ghij")); [ 0:24] 530 test(S("abcdefghij"), 5, 1, "12345", 2, S("abcde12ghij")); [ 0:24] 531 test(S("abcdefghij"), 5, 1, "12345", 4, S("abcde1234ghij")); [ 0:24] 532 test(S("abcdefghij"), 5, 1, "12345", 5, S("abcde12345ghij")); [ 0:24] 533 test(S("abcdefghij"), 5, 1, "1234567890", 0, S("abcdeghij")); [ 0:24] 534 test(S("abcdefghij"), 5, 1, "1234567890", 1, S("abcde1ghij")); [ 0:24] 535 test(S("abcdefghij"), 5, 1, "1234567890", 5, S("abcde12345ghij")); [ 0:24] 536 test(S("abcdefghij"), 5, 1, "1234567890", 9, S("abcde123456789ghij")); [ 0:24] 537 test(S("abcdefghij"), 5, 1, "1234567890", 10, S("abcde1234567890ghij")); [ 0:24] 538 test(S("abcdefghij"), 5, 1, "12345678901234567890", 0, S("abcdeghij")); [ 0:24] 539 test(S("abcdefghij"), 5, 1, "12345678901234567890", 1, S("abcde1ghij")); [ 0:24] 540 test(S("abcdefghij"), 5, 1, "12345678901234567890", 10, S("abcde1234567890ghij")); [ 0:24] 541 test(S("abcdefghij"), 5, 1, "12345678901234567890", 19, S("abcde1234567890123456789ghij")); [ 0:24] 542 test(S("abcdefghij"), 5, 1, "12345678901234567890", 20, S("abcde12345678901234567890ghij")); [ 0:24] 543 test(S("abcdefghij"), 5, 2, "", 0, S("abcdehij")); [ 0:24] 544 test(S("abcdefghij"), 5, 2, "12345", 0, S("abcdehij")); [ 0:24] 545 test(S("abcdefghij"), 5, 2, "12345", 1, S("abcde1hij")); [ 0:24] 546 test(S("abcdefghij"), 5, 2, "12345", 2, S("abcde12hij")); [ 0:24] 547 test(S("abcdefghij"), 5, 2, "12345", 4, S("abcde1234hij")); [ 0:24] 548 test(S("abcdefghij"), 5, 2, "12345", 5, S("abcde12345hij")); [ 0:24] 549 test(S("abcdefghij"), 5, 2, "1234567890", 0, S("abcdehij")); [ 0:24] 550 test(S("abcdefghij"), 5, 2, "1234567890", 1, S("abcde1hij")); [ 0:24] 551 test(S("abcdefghij"), 5, 2, "1234567890", 5, S("abcde12345hij")); [ 0:24] 552 test(S("abcdefghij"), 5, 2, "1234567890", 9, S("abcde123456789hij")); [ 0:24] 553 test(S("abcdefghij"), 5, 2, "1234567890", 10, S("abcde1234567890hij")); [ 0:24] 554 test(S("abcdefghij"), 5, 2, "12345678901234567890", 0, S("abcdehij")); [ 0:24] 555 test(S("abcdefghij"), 5, 2, "12345678901234567890", 1, S("abcde1hij")); [ 0:24] 556 test(S("abcdefghij"), 5, 2, "12345678901234567890", 10, S("abcde1234567890hij")); [ 0:24] 557 test(S("abcdefghij"), 5, 2, "12345678901234567890", 19, S("abcde1234567890123456789hij")); [ 0:24] 558 test(S("abcdefghij"), 5, 2, "12345678901234567890", 20, S("abcde12345678901234567890hij")); [ 0:24] 559 test(S("abcdefghij"), 5, 4, "", 0, S("abcdej")); [ 0:24] 560 test(S("abcdefghij"), 5, 4, "12345", 0, S("abcdej")); [ 0:24] 561 test(S("abcdefghij"), 5, 4, "12345", 1, S("abcde1j")); [ 0:24] 562 test(S("abcdefghij"), 5, 4, "12345", 2, S("abcde12j")); [ 0:24] 563 } [ 0:24] 564 [ 0:24] 565 template [ 0:24] 566 void test5() [ 0:24] 567 { [ 0:24] 568 test(S("abcdefghij"), 5, 4, "12345", 4, S("abcde1234j")); [ 0:24] 569 test(S("abcdefghij"), 5, 4, "12345", 5, S("abcde12345j")); [ 0:24] 570 test(S("abcdefghij"), 5, 4, "1234567890", 0, S("abcdej")); [ 0:24] 571 test(S("abcdefghij"), 5, 4, "1234567890", 1, S("abcde1j")); [ 0:24] 572 test(S("abcdefghij"), 5, 4, "1234567890", 5, S("abcde12345j")); [ 0:24] 573 test(S("abcdefghij"), 5, 4, "1234567890", 9, S("abcde123456789j")); [ 0:24] 574 test(S("abcdefghij"), 5, 4, "1234567890", 10, S("abcde1234567890j")); [ 0:24] 575 test(S("abcdefghij"), 5, 4, "12345678901234567890", 0, S("abcdej")); [ 0:24] 576 test(S("abcdefghij"), 5, 4, "12345678901234567890", 1, S("abcde1j")); [ 0:24] 577 test(S("abcdefghij"), 5, 4, "12345678901234567890", 10, S("abcde1234567890j")); [ 0:24] 578 test(S("abcdefghij"), 5, 4, "12345678901234567890", 19, S("abcde1234567890123456789j")); [ 0:24] 579 test(S("abcdefghij"), 5, 4, "12345678901234567890", 20, S("abcde12345678901234567890j")); [ 0:24] 580 test(S("abcdefghij"), 5, 5, "", 0, S("abcde")); [ 0:24] 581 test(S("abcdefghij"), 5, 5, "12345", 0, S("abcde")); [ 0:24] 582 test(S("abcdefghij"), 5, 5, "12345", 1, S("abcde1")); [ 0:24] 583 test(S("abcdefghij"), 5, 5, "12345", 2, S("abcde12")); [ 0:24] 584 test(S("abcdefghij"), 5, 5, "12345", 4, S("abcde1234")); [ 0:24] 585 test(S("abcdefghij"), 5, 5, "12345", 5, S("abcde12345")); [ 0:24] 586 test(S("abcdefghij"), 5, 5, "1234567890", 0, S("abcde")); [ 0:24] 587 test(S("abcdefghij"), 5, 5, "1234567890", 1, S("abcde1")); [ 0:24] 588 test(S("abcdefghij"), 5, 5, "1234567890", 5, S("abcde12345")); [ 0:24] 589 test(S("abcdefghij"), 5, 5, "1234567890", 9, S("abcde123456789")); [ 0:24] 590 test(S("abcdefghij"), 5, 5, "1234567890", 10, S("abcde1234567890")); [ 0:24] 591 test(S("abcdefghij"), 5, 5, "12345678901234567890", 0, S("abcde")); [ 0:24] 592 test(S("abcdefghij"), 5, 5, "12345678901234567890", 1, S("abcde1")); [ 0:24] 593 test(S("abcdefghij"), 5, 5, "12345678901234567890", 10, S("abcde1234567890")); [ 0:24] 594 test(S("abcdefghij"), 5, 5, "12345678901234567890", 19, S("abcde1234567890123456789")); [ 0:24] 595 test(S("abcdefghij"), 5, 5, "12345678901234567890", 20, S("abcde12345678901234567890")); [ 0:24] 596 test(S("abcdefghij"), 9, 0, "", 0, S("abcdefghij")); [ 0:24] 597 test(S("abcdefghij"), 9, 0, "12345", 0, S("abcdefghij")); [ 0:24] 598 test(S("abcdefghij"), 9, 0, "12345", 1, S("abcdefghi1j")); [ 0:24] 599 test(S("abcdefghij"), 9, 0, "12345", 2, S("abcdefghi12j")); [ 0:24] 600 test(S("abcdefghij"), 9, 0, "12345", 4, S("abcdefghi1234j")); [ 0:24] 601 test(S("abcdefghij"), 9, 0, "12345", 5, S("abcdefghi12345j")); [ 0:24] 602 test(S("abcdefghij"), 9, 0, "1234567890", 0, S("abcdefghij")); [ 0:24] 603 test(S("abcdefghij"), 9, 0, "1234567890", 1, S("abcdefghi1j")); [ 0:24] 604 test(S("abcdefghij"), 9, 0, "1234567890", 5, S("abcdefghi12345j")); [ 0:24] 605 test(S("abcdefghij"), 9, 0, "1234567890", 9, S("abcdefghi123456789j")); [ 0:24] 606 test(S("abcdefghij"), 9, 0, "1234567890", 10, S("abcdefghi1234567890j")); [ 0:24] 607 test(S("abcdefghij"), 9, 0, "12345678901234567890", 0, S("abcdefghij")); [ 0:24] 608 test(S("abcdefghij"), 9, 0, "12345678901234567890", 1, S("abcdefghi1j")); [ 0:24] 609 test(S("abcdefghij"), 9, 0, "12345678901234567890", 10, S("abcdefghi1234567890j")); [ 0:24] 610 test(S("abcdefghij"), 9, 0, "12345678901234567890", 19, S("abcdefghi1234567890123456789j")); [ 0:24] 611 test(S("abcdefghij"), 9, 0, "12345678901234567890", 20, S("abcdefghi12345678901234567890j")); [ 0:24] 612 test(S("abcdefghij"), 9, 1, "", 0, S("abcdefghi")); [ 0:24] 613 test(S("abcdefghij"), 9, 1, "12345", 0, S("abcdefghi")); [ 0:24] 614 test(S("abcdefghij"), 9, 1, "12345", 1, S("abcdefghi1")); [ 0:24] 615 test(S("abcdefghij"), 9, 1, "12345", 2, S("abcdefghi12")); [ 0:24] 616 test(S("abcdefghij"), 9, 1, "12345", 4, S("abcdefghi1234")); [ 0:24] 617 test(S("abcdefghij"), 9, 1, "12345", 5, S("abcdefghi12345")); [ 0:24] 618 test(S("abcdefghij"), 9, 1, "1234567890", 0, S("abcdefghi")); [ 0:24] 619 test(S("abcdefghij"), 9, 1, "1234567890", 1, S("abcdefghi1")); [ 0:24] 620 test(S("abcdefghij"), 9, 1, "1234567890", 5, S("abcdefghi12345")); [ 0:24] 621 test(S("abcdefghij"), 9, 1, "1234567890", 9, S("abcdefghi123456789")); [ 0:24] 622 test(S("abcdefghij"), 9, 1, "1234567890", 10, S("abcdefghi1234567890")); [ 0:24] 623 test(S("abcdefghij"), 9, 1, "12345678901234567890", 0, S("abcdefghi")); [ 0:24] 624 test(S("abcdefghij"), 9, 1, "12345678901234567890", 1, S("abcdefghi1")); [ 0:24] 625 test(S("abcdefghij"), 9, 1, "12345678901234567890", 10, S("abcdefghi1234567890")); [ 0:24] 626 test(S("abcdefghij"), 9, 1, "12345678901234567890", 19, S("abcdefghi1234567890123456789")); [ 0:24] 627 test(S("abcdefghij"), 9, 1, "12345678901234567890", 20, S("abcdefghi12345678901234567890")); [ 0:24] 628 test(S("abcdefghij"), 10, 0, "", 0, S("abcdefghij")); [ 0:24] 629 test(S("abcdefghij"), 10, 0, "12345", 0, S("abcdefghij")); [ 0:24] 630 test(S("abcdefghij"), 10, 0, "12345", 1, S("abcdefghij1")); [ 0:24] 631 test(S("abcdefghij"), 10, 0, "12345", 2, S("abcdefghij12")); [ 0:24] 632 test(S("abcdefghij"), 10, 0, "12345", 4, S("abcdefghij1234")); [ 0:24] 633 test(S("abcdefghij"), 10, 0, "12345", 5, S("abcdefghij12345")); [ 0:24] 634 test(S("abcdefghij"), 10, 0, "1234567890", 0, S("abcdefghij")); [ 0:24] 635 test(S("abcdefghij"), 10, 0, "1234567890", 1, S("abcdefghij1")); [ 0:24] 636 test(S("abcdefghij"), 10, 0, "1234567890", 5, S("abcdefghij12345")); [ 0:24] 637 test(S("abcdefghij"), 10, 0, "1234567890", 9, S("abcdefghij123456789")); [ 0:24] 638 test(S("abcdefghij"), 10, 0, "1234567890", 10, S("abcdefghij1234567890")); [ 0:24] 639 test(S("abcdefghij"), 10, 0, "12345678901234567890", 0, S("abcdefghij")); [ 0:24] 640 test(S("abcdefghij"), 10, 0, "12345678901234567890", 1, S("abcdefghij1")); [ 0:24] 641 test(S("abcdefghij"), 10, 0, "12345678901234567890", 10, S("abcdefghij1234567890")); [ 0:24] 642 test(S("abcdefghij"), 10, 0, "12345678901234567890", 19, S("abcdefghij1234567890123456789")); [ 0:24] 643 test(S("abcdefghij"), 10, 0, "12345678901234567890", 20, S("abcdefghij12345678901234567890")); [ 0:24] 644 test(S("abcdefghijklmnopqrst"), 0, 0, "", 0, S("abcdefghijklmnopqrst")); [ 0:24] 645 test(S("abcdefghijklmnopqrst"), 0, 0, "12345", 0, S("abcdefghijklmnopqrst")); [ 0:24] 646 test(S("abcdefghijklmnopqrst"), 0, 0, "12345", 1, S("1abcdefghijklmnopqrst")); [ 0:24] 647 test(S("abcdefghijklmnopqrst"), 0, 0, "12345", 2, S("12abcdefghijklmnopqrst")); [ 0:24] 648 test(S("abcdefghijklmnopqrst"), 0, 0, "12345", 4, S("1234abcdefghijklmnopqrst")); [ 0:24] 649 test(S("abcdefghijklmnopqrst"), 0, 0, "12345", 5, S("12345abcdefghijklmnopqrst")); [ 0:24] 650 test(S("abcdefghijklmnopqrst"), 0, 0, "1234567890", 0, S("abcdefghijklmnopqrst")); [ 0:24] 651 test(S("abcdefghijklmnopqrst"), 0, 0, "1234567890", 1, S("1abcdefghijklmnopqrst")); [ 0:24] 652 test(S("abcdefghijklmnopqrst"), 0, 0, "1234567890", 5, S("12345abcdefghijklmnopqrst")); [ 0:24] 653 test(S("abcdefghijklmnopqrst"), 0, 0, "1234567890", 9, S("123456789abcdefghijklmnopqrst")); [ 0:24] 654 test(S("abcdefghijklmnopqrst"), 0, 0, "1234567890", 10, S("1234567890abcdefghijklmnopqrst")); [ 0:24] 655 test(S("abcdefghijklmnopqrst"), 0, 0, "12345678901234567890", 0, S("abcdefghijklmnopqrst")); [ 0:24] 656 test(S("abcdefghijklmnopqrst"), 0, 0, "12345678901234567890", 1, S("1abcdefghijklmnopqrst")); [ 0:24] 657 test(S("abcdefghijklmnopqrst"), 0, 0, "12345678901234567890", 10, S("1234567890abcdefghijklmnopqrst")); [ 0:24] 658 test(S("abcdefghijklmnopqrst"), 0, 0, "12345678901234567890", 19, S("1234567890123456789abcdefghijklmnopqrst")); [ 0:24] 659 test(S("abcdefghijklmnopqrst"), 0, 0, "12345678901234567890", 20, S("12345678901234567890abcdefghijklmnopqrst")); [ 0:24] 660 test(S("abcdefghijklmnopqrst"), 0, 1, "", 0, S("bcdefghijklmnopqrst")); [ 0:24] 661 test(S("abcdefghijklmnopqrst"), 0, 1, "12345", 0, S("bcdefghijklmnopqrst")); [ 0:24] 662 test(S("abcdefghijklmnopqrst"), 0, 1, "12345", 1, S("1bcdefghijklmnopqrst")); [ 0:24] 663 test(S("abcdefghijklmnopqrst"), 0, 1, "12345", 2, S("12bcdefghijklmnopqrst")); [ 0:24] 664 test(S("abcdefghijklmnopqrst"), 0, 1, "12345", 4, S("1234bcdefghijklmnopqrst")); [ 0:24] 665 test(S("abcdefghijklmnopqrst"), 0, 1, "12345", 5, S("12345bcdefghijklmnopqrst")); [ 0:24] 666 test(S("abcdefghijklmnopqrst"), 0, 1, "1234567890", 0, S("bcdefghijklmnopqrst")); [ 0:24] 667 test(S("abcdefghijklmnopqrst"), 0, 1, "1234567890", 1, S("1bcdefghijklmnopqrst")); [ 0:24] 668 } [ 0:24] 669 [ 0:24] 670 template [ 0:24] 671 void test6() [ 0:24] 672 { [ 0:24] 673 test(S("abcdefghijklmnopqrst"), 0, 1, "1234567890", 5, S("12345bcdefghijklmnopqrst")); [ 0:24] 674 test(S("abcdefghijklmnopqrst"), 0, 1, "1234567890", 9, S("123456789bcdefghijklmnopqrst")); [ 0:24] 675 test(S("abcdefghijklmnopqrst"), 0, 1, "1234567890", 10, S("1234567890bcdefghijklmnopqrst")); [ 0:24] 676 test(S("abcdefghijklmnopqrst"), 0, 1, "12345678901234567890", 0, S("bcdefghijklmnopqrst")); [ 0:24] 677 test(S("abcdefghijklmnopqrst"), 0, 1, "12345678901234567890", 1, S("1bcdefghijklmnopqrst")); [ 0:24] 678 test(S("abcdefghijklmnopqrst"), 0, 1, "12345678901234567890", 10, S("1234567890bcdefghijklmnopqrst")); [ 0:24] 679 test(S("abcdefghijklmnopqrst"), 0, 1, "12345678901234567890", 19, S("1234567890123456789bcdefghijklmnopqrst")); [ 0:24] 680 test(S("abcdefghijklmnopqrst"), 0, 1, "12345678901234567890", 20, S("12345678901234567890bcdefghijklmnopqrst")); [ 0:24] 681 test(S("abcdefghijklmnopqrst"), 0, 10, "", 0, S("klmnopqrst")); [ 0:24] 682 test(S("abcdefghijklmnopqrst"), 0, 10, "12345", 0, S("klmnopqrst")); [ 0:24] 683 test(S("abcdefghijklmnopqrst"), 0, 10, "12345", 1, S("1klmnopqrst")); [ 0:24] 684 test(S("abcdefghijklmnopqrst"), 0, 10, "12345", 2, S("12klmnopqrst")); [ 0:24] 685 test(S("abcdefghijklmnopqrst"), 0, 10, "12345", 4, S("1234klmnopqrst")); [ 0:24] 686 test(S("abcdefghijklmnopqrst"), 0, 10, "12345", 5, S("12345klmnopqrst")); [ 0:24] 687 test(S("abcdefghijklmnopqrst"), 0, 10, "1234567890", 0, S("klmnopqrst")); [ 0:24] 688 test(S("abcdefghijklmnopqrst"), 0, 10, "1234567890", 1, S("1klmnopqrst")); [ 0:24] 689 test(S("abcdefghijklmnopqrst"), 0, 10, "1234567890", 5, S("12345klmnopqrst")); [ 0:24] 690 test(S("abcdefghijklmnopqrst"), 0, 10, "1234567890", 9, S("123456789klmnopqrst")); [ 0:24] 691 test(S("abcdefghijklmnopqrst"), 0, 10, "1234567890", 10, S("1234567890klmnopqrst")); [ 0:24] 692 test(S("abcdefghijklmnopqrst"), 0, 10, "12345678901234567890", 0, S("klmnopqrst")); [ 0:24] 693 test(S("abcdefghijklmnopqrst"), 0, 10, "12345678901234567890", 1, S("1klmnopqrst")); [ 0:24] 694 test(S("abcdefghijklmnopqrst"), 0, 10, "12345678901234567890", 10, S("1234567890klmnopqrst")); [ 0:24] 695 test(S("abcdefghijklmnopqrst"), 0, 10, "12345678901234567890", 19, S("1234567890123456789klmnopqrst")); [ 0:24] 696 test(S("abcdefghijklmnopqrst"), 0, 10, "12345678901234567890", 20, S("12345678901234567890klmnopqrst")); [ 0:24] 697 test(S("abcdefghijklmnopqrst"), 0, 19, "", 0, S("t")); [ 0:24] 698 test(S("abcdefghijklmnopqrst"), 0, 19, "12345", 0, S("t")); [ 0:24] 699 test(S("abcdefghijklmnopqrst"), 0, 19, "12345", 1, S("1t")); [ 0:24] 700 test(S("abcdefghijklmnopqrst"), 0, 19, "12345", 2, S("12t")); [ 0:24] 701 test(S("abcdefghijklmnopqrst"), 0, 19, "12345", 4, S("1234t")); [ 0:24] 702 test(S("abcdefghijklmnopqrst"), 0, 19, "12345", 5, S("12345t")); [ 0:24] 703 test(S("abcdefghijklmnopqrst"), 0, 19, "1234567890", 0, S("t")); [ 0:24] 704 test(S("abcdefghijklmnopqrst"), 0, 19, "1234567890", 1, S("1t")); [ 0:24] 705 test(S("abcdefghijklmnopqrst"), 0, 19, "1234567890", 5, S("12345t")); [ 0:24] 706 test(S("abcdefghijklmnopqrst"), 0, 19, "1234567890", 9, S("123456789t")); [ 0:24] 707 test(S("abcdefghijklmnopqrst"), 0, 19, "1234567890", 10, S("1234567890t")); [ 0:24] 708 test(S("abcdefghijklmnopqrst"), 0, 19, "12345678901234567890", 0, S("t")); [ 0:24] 709 test(S("abcdefghijklmnopqrst"), 0, 19, "12345678901234567890", 1, S("1t")); [ 0:24] 710 test(S("abcdefghijklmnopqrst"), 0, 19, "12345678901234567890", 10, S("1234567890t")); [ 0:24] 711 test(S("abcdefghijklmnopqrst"), 0, 19, "12345678901234567890", 19, S("1234567890123456789t")); [ 0:24] 712 test(S("abcdefghijklmnopqrst"), 0, 19, "12345678901234567890", 20, S("12345678901234567890t")); [ 0:24] 713 test(S("abcdefghijklmnopqrst"), 0, 20, "", 0, S("")); [ 0:24] 714 test(S("abcdefghijklmnopqrst"), 0, 20, "12345", 0, S("")); [ 0:24] 715 test(S("abcdefghijklmnopqrst"), 0, 20, "12345", 1, S("1")); [ 0:24] 716 test(S("abcdefghijklmnopqrst"), 0, 20, "12345", 2, S("12")); [ 0:24] 717 test(S("abcdefghijklmnopqrst"), 0, 20, "12345", 4, S("1234")); [ 0:24] 718 test(S("abcdefghijklmnopqrst"), 0, 20, "12345", 5, S("12345")); [ 0:24] 719 test(S("abcdefghijklmnopqrst"), 0, 20, "1234567890", 0, S("")); [ 0:24] 720 test(S("abcdefghijklmnopqrst"), 0, 20, "1234567890", 1, S("1")); [ 0:24] 721 test(S("abcdefghijklmnopqrst"), 0, 20, "1234567890", 5, S("12345")); [ 0:24] 722 test(S("abcdefghijklmnopqrst"), 0, 20, "1234567890", 9, S("123456789")); [ 0:24] 723 test(S("abcdefghijklmnopqrst"), 0, 20, "1234567890", 10, S("1234567890")); [ 0:24] 724 test(S("abcdefghijklmnopqrst"), 0, 20, "12345678901234567890", 0, S("")); [ 0:24] 725 test(S("abcdefghijklmnopqrst"), 0, 20, "12345678901234567890", 1, S("1")); [ 0:24] 726 test(S("abcdefghijklmnopqrst"), 0, 20, "12345678901234567890", 10, S("1234567890")); [ 0:24] 727 test(S("abcdefghijklmnopqrst"), 0, 20, "12345678901234567890", 19, S("1234567890123456789")); [ 0:24] 728 test(S("abcdefghijklmnopqrst"), 0, 20, "12345678901234567890", 20, S("12345678901234567890")); [ 0:24] 729 test(S("abcdefghijklmnopqrst"), 1, 0, "", 0, S("abcdefghijklmnopqrst")); [ 0:24] 730 test(S("abcdefghijklmnopqrst"), 1, 0, "12345", 0, S("abcdefghijklmnopqrst")); [ 0:24] 731 test(S("abcdefghijklmnopqrst"), 1, 0, "12345", 1, S("a1bcdefghijklmnopqrst")); [ 0:24] 732 test(S("abcdefghijklmnopqrst"), 1, 0, "12345", 2, S("a12bcdefghijklmnopqrst")); [ 0:24] 733 test(S("abcdefghijklmnopqrst"), 1, 0, "12345", 4, S("a1234bcdefghijklmnopqrst")); [ 0:24] 734 test(S("abcdefghijklmnopqrst"), 1, 0, "12345", 5, S("a12345bcdefghijklmnopqrst")); [ 0:24] 735 test(S("abcdefghijklmnopqrst"), 1, 0, "1234567890", 0, S("abcdefghijklmnopqrst")); [ 0:24] 736 test(S("abcdefghijklmnopqrst"), 1, 0, "1234567890", 1, S("a1bcdefghijklmnopqrst")); [ 0:24] 737 test(S("abcdefghijklmnopqrst"), 1, 0, "1234567890", 5, S("a12345bcdefghijklmnopqrst")); [ 0:24] 738 test(S("abcdefghijklmnopqrst"), 1, 0, "1234567890", 9, S("a123456789bcdefghijklmnopqrst")); [ 0:24] 739 test(S("abcdefghijklmnopqrst"), 1, 0, "1234567890", 10, S("a1234567890bcdefghijklmnopqrst")); [ 0:24] 740 test(S("abcdefghijklmnopqrst"), 1, 0, "12345678901234567890", 0, S("abcdefghijklmnopqrst")); [ 0:24] 741 test(S("abcdefghijklmnopqrst"), 1, 0, "12345678901234567890", 1, S("a1bcdefghijklmnopqrst")); [ 0:24] 742 test(S("abcdefghijklmnopqrst"), 1, 0, "12345678901234567890", 10, S("a1234567890bcdefghijklmnopqrst")); [ 0:24] 743 test(S("abcdefghijklmnopqrst"), 1, 0, "12345678901234567890", 19, S("a1234567890123456789bcdefghijklmnopqrst")); [ 0:24] 744 test(S("abcdefghijklmnopqrst"), 1, 0, "12345678901234567890", 20, S("a12345678901234567890bcdefghijklmnopqrst")); [ 0:24] 745 test(S("abcdefghijklmnopqrst"), 1, 1, "", 0, S("acdefghijklmnopqrst")); [ 0:24] 746 test(S("abcdefghijklmnopqrst"), 1, 1, "12345", 0, S("acdefghijklmnopqrst")); [ 0:24] 747 test(S("abcdefghijklmnopqrst"), 1, 1, "12345", 1, S("a1cdefghijklmnopqrst")); [ 0:24] 748 test(S("abcdefghijklmnopqrst"), 1, 1, "12345", 2, S("a12cdefghijklmnopqrst")); [ 0:24] 749 test(S("abcdefghijklmnopqrst"), 1, 1, "12345", 4, S("a1234cdefghijklmnopqrst")); [ 0:24] 750 test(S("abcdefghijklmnopqrst"), 1, 1, "12345", 5, S("a12345cdefghijklmnopqrst")); [ 0:24] 751 test(S("abcdefghijklmnopqrst"), 1, 1, "1234567890", 0, S("acdefghijklmnopqrst")); [ 0:24] 752 test(S("abcdefghijklmnopqrst"), 1, 1, "1234567890", 1, S("a1cdefghijklmnopqrst")); [ 0:24] 753 test(S("abcdefghijklmnopqrst"), 1, 1, "1234567890", 5, S("a12345cdefghijklmnopqrst")); [ 0:24] 754 test(S("abcdefghijklmnopqrst"), 1, 1, "1234567890", 9, S("a123456789cdefghijklmnopqrst")); [ 0:24] 755 test(S("abcdefghijklmnopqrst"), 1, 1, "1234567890", 10, S("a1234567890cdefghijklmnopqrst")); [ 0:24] 756 test(S("abcdefghijklmnopqrst"), 1, 1, "12345678901234567890", 0, S("acdefghijklmnopqrst")); [ 0:24] 757 test(S("abcdefghijklmnopqrst"), 1, 1, "12345678901234567890", 1, S("a1cdefghijklmnopqrst")); [ 0:24] 758 test(S("abcdefghijklmnopqrst"), 1, 1, "12345678901234567890", 10, S("a1234567890cdefghijklmnopqrst")); [ 0:24] 759 test(S("abcdefghijklmnopqrst"), 1, 1, "12345678901234567890", 19, S("a1234567890123456789cdefghijklmnopqrst")); [ 0:24] 760 test(S("abcdefghijklmnopqrst"), 1, 1, "12345678901234567890", 20, S("a12345678901234567890cdefghijklmnopqrst")); [ 0:24] 761 test(S("abcdefghijklmnopqrst"), 1, 9, "", 0, S("aklmnopqrst")); [ 0:24] 762 test(S("abcdefghijklmnopqrst"), 1, 9, "12345", 0, S("aklmnopqrst")); [ 0:24] 763 test(S("abcdefghijklmnopqrst"), 1, 9, "12345", 1, S("a1klmnopqrst")); [ 0:24] 764 test(S("abcdefghijklmnopqrst"), 1, 9, "12345", 2, S("a12klmnopqrst")); [ 0:24] 765 test(S("abcdefghijklmnopqrst"), 1, 9, "12345", 4, S("a1234klmnopqrst")); [ 0:24] 766 test(S("abcdefghijklmnopqrst"), 1, 9, "12345", 5, S("a12345klmnopqrst")); [ 0:24] 767 test(S("abcdefghijklmnopqrst"), 1, 9, "1234567890", 0, S("aklmnopqrst")); [ 0:24] 768 test(S("abcdefghijklmnopqrst"), 1, 9, "1234567890", 1, S("a1klmnopqrst")); [ 0:24] 769 test(S("abcdefghijklmnopqrst"), 1, 9, "1234567890", 5, S("a12345klmnopqrst")); [ 0:24] 770 test(S("abcdefghijklmnopqrst"), 1, 9, "1234567890", 9, S("a123456789klmnopqrst")); [ 0:24] 771 test(S("abcdefghijklmnopqrst"), 1, 9, "1234567890", 10, S("a1234567890klmnopqrst")); [ 0:24] 772 test(S("abcdefghijklmnopqrst"), 1, 9, "12345678901234567890", 0, S("aklmnopqrst")); [ 0:24] 773 } [ 0:24] 774 [ 0:24] 775 template [ 0:24] 776 void test7() [ 0:24] 777 { [ 0:24] 778 test(S("abcdefghijklmnopqrst"), 1, 9, "12345678901234567890", 1, S("a1klmnopqrst")); [ 0:24] 779 test(S("abcdefghijklmnopqrst"), 1, 9, "12345678901234567890", 10, S("a1234567890klmnopqrst")); [ 0:24] 780 test(S("abcdefghijklmnopqrst"), 1, 9, "12345678901234567890", 19, S("a1234567890123456789klmnopqrst")); [ 0:24] 781 test(S("abcdefghijklmnopqrst"), 1, 9, "12345678901234567890", 20, S("a12345678901234567890klmnopqrst")); [ 0:24] 782 test(S("abcdefghijklmnopqrst"), 1, 18, "", 0, S("at")); [ 0:24] 783 test(S("abcdefghijklmnopqrst"), 1, 18, "12345", 0, S("at")); [ 0:24] 784 test(S("abcdefghijklmnopqrst"), 1, 18, "12345", 1, S("a1t")); [ 0:24] 785 test(S("abcdefghijklmnopqrst"), 1, 18, "12345", 2, S("a12t")); [ 0:24] 786 test(S("abcdefghijklmnopqrst"), 1, 18, "12345", 4, S("a1234t")); [ 0:24] 787 test(S("abcdefghijklmnopqrst"), 1, 18, "12345", 5, S("a12345t")); [ 0:24] 788 test(S("abcdefghijklmnopqrst"), 1, 18, "1234567890", 0, S("at")); [ 0:24] 789 test(S("abcdefghijklmnopqrst"), 1, 18, "1234567890", 1, S("a1t")); [ 0:24] 790 test(S("abcdefghijklmnopqrst"), 1, 18, "1234567890", 5, S("a12345t")); [ 0:24] 791 test(S("abcdefghijklmnopqrst"), 1, 18, "1234567890", 9, S("a123456789t")); [ 0:24] 792 test(S("abcdefghijklmnopqrst"), 1, 18, "1234567890", 10, S("a1234567890t")); [ 0:24] 793 test(S("abcdefghijklmnopqrst"), 1, 18, "12345678901234567890", 0, S("at")); [ 0:24] 794 test(S("abcdefghijklmnopqrst"), 1, 18, "12345678901234567890", 1, S("a1t")); [ 0:24] 795 test(S("abcdefghijklmnopqrst"), 1, 18, "12345678901234567890", 10, S("a1234567890t")); [ 0:24] 796 test(S("abcdefghijklmnopqrst"), 1, 18, "12345678901234567890", 19, S("a1234567890123456789t")); [ 0:24] 797 test(S("abcdefghijklmnopqrst"), 1, 18, "12345678901234567890", 20, S("a12345678901234567890t")); [ 0:24] 798 test(S("abcdefghijklmnopqrst"), 1, 19, "", 0, S("a")); [ 0:24] 799 test(S("abcdefghijklmnopqrst"), 1, 19, "12345", 0, S("a")); [ 0:24] 800 test(S("abcdefghijklmnopqrst"), 1, 19, "12345", 1, S("a1")); [ 0:24] 801 test(S("abcdefghijklmnopqrst"), 1, 19, "12345", 2, S("a12")); [ 0:24] 802 test(S("abcdefghijklmnopqrst"), 1, 19, "12345", 4, S("a1234")); [ 0:24] 803 test(S("abcdefghijklmnopqrst"), 1, 19, "12345", 5, S("a12345")); [ 0:24] 804 test(S("abcdefghijklmnopqrst"), 1, 19, "1234567890", 0, S("a")); [ 0:24] 805 test(S("abcdefghijklmnopqrst"), 1, 19, "1234567890", 1, S("a1")); [ 0:24] 806 test(S("abcdefghijklmnopqrst"), 1, 19, "1234567890", 5, S("a12345")); [ 0:24] 807 test(S("abcdefghijklmnopqrst"), 1, 19, "1234567890", 9, S("a123456789")); [ 0:24] 808 test(S("abcdefghijklmnopqrst"), 1, 19, "1234567890", 10, S("a1234567890")); [ 0:24] 809 test(S("abcdefghijklmnopqrst"), 1, 19, "12345678901234567890", 0, S("a")); [ 0:24] 810 test(S("abcdefghijklmnopqrst"), 1, 19, "12345678901234567890", 1, S("a1")); [ 0:24] 811 test(S("abcdefghijklmnopqrst"), 1, 19, "12345678901234567890", 10, S("a1234567890")); [ 0:24] 812 test(S("abcdefghijklmnopqrst"), 1, 19, "12345678901234567890", 19, S("a1234567890123456789")); [ 0:24] 813 test(S("abcdefghijklmnopqrst"), 1, 19, "12345678901234567890", 20, S("a12345678901234567890")); [ 0:24] 814 test(S("abcdefghijklmnopqrst"), 10, 0, "", 0, S("abcdefghijklmnopqrst")); [ 0:24] 815 test(S("abcdefghijklmnopqrst"), 10, 0, "12345", 0, S("abcdefghijklmnopqrst")); [ 0:24] 816 test(S("abcdefghijklmnopqrst"), 10, 0, "12345", 1, S("abcdefghij1klmnopqrst")); [ 0:24] 817 test(S("abcdefghijklmnopqrst"), 10, 0, "12345", 2, S("abcdefghij12klmnopqrst")); [ 0:24] 818 test(S("abcdefghijklmnopqrst"), 10, 0, "12345", 4, S("abcdefghij1234klmnopqrst")); [ 0:24] 819 test(S("abcdefghijklmnopqrst"), 10, 0, "12345", 5, S("abcdefghij12345klmnopqrst")); [ 0:24] 820 test(S("abcdefghijklmnopqrst"), 10, 0, "1234567890", 0, S("abcdefghijklmnopqrst")); [ 0:24] 821 test(S("abcdefghijklmnopqrst"), 10, 0, "1234567890", 1, S("abcdefghij1klmnopqrst")); [ 0:24] 822 test(S("abcdefghijklmnopqrst"), 10, 0, "1234567890", 5, S("abcdefghij12345klmnopqrst")); [ 0:24] 823 test(S("abcdefghijklmnopqrst"), 10, 0, "1234567890", 9, S("abcdefghij123456789klmnopqrst")); [ 0:24] 824 test(S("abcdefghijklmnopqrst"), 10, 0, "1234567890", 10, S("abcdefghij1234567890klmnopqrst")); [ 0:24] 825 test(S("abcdefghijklmnopqrst"), 10, 0, "12345678901234567890", 0, S("abcdefghijklmnopqrst")); [ 0:24] 826 test(S("abcdefghijklmnopqrst"), 10, 0, "12345678901234567890", 1, S("abcdefghij1klmnopqrst")); [ 0:24] 827 test(S("abcdefghijklmnopqrst"), 10, 0, "12345678901234567890", 10, S("abcdefghij1234567890klmnopqrst")); [ 0:24] 828 test(S("abcdefghijklmnopqrst"), 10, 0, "12345678901234567890", 19, S("abcdefghij1234567890123456789klmnopqrst")); [ 0:24] 829 test(S("abcdefghijklmnopqrst"), 10, 0, "12345678901234567890", 20, S("abcdefghij12345678901234567890klmnopqrst")); [ 0:24] 830 test(S("abcdefghijklmnopqrst"), 10, 1, "", 0, S("abcdefghijlmnopqrst")); [ 0:24] 831 test(S("abcdefghijklmnopqrst"), 10, 1, "12345", 0, S("abcdefghijlmnopqrst")); [ 0:24] 832 test(S("abcdefghijklmnopqrst"), 10, 1, "12345", 1, S("abcdefghij1lmnopqrst")); [ 0:24] 833 test(S("abcdefghijklmnopqrst"), 10, 1, "12345", 2, S("abcdefghij12lmnopqrst")); [ 0:24] 834 test(S("abcdefghijklmnopqrst"), 10, 1, "12345", 4, S("abcdefghij1234lmnopqrst")); [ 0:24] 835 test(S("abcdefghijklmnopqrst"), 10, 1, "12345", 5, S("abcdefghij12345lmnopqrst")); [ 0:24] 836 test(S("abcdefghijklmnopqrst"), 10, 1, "1234567890", 0, S("abcdefghijlmnopqrst")); [ 0:24] 837 test(S("abcdefghijklmnopqrst"), 10, 1, "1234567890", 1, S("abcdefghij1lmnopqrst")); [ 0:24] 838 test(S("abcdefghijklmnopqrst"), 10, 1, "1234567890", 5, S("abcdefghij12345lmnopqrst")); [ 0:24] 839 test(S("abcdefghijklmnopqrst"), 10, 1, "1234567890", 9, S("abcdefghij123456789lmnopqrst")); [ 0:24] 840 test(S("abcdefghijklmnopqrst"), 10, 1, "1234567890", 10, S("abcdefghij1234567890lmnopqrst")); [ 0:24] 841 test(S("abcdefghijklmnopqrst"), 10, 1, "12345678901234567890", 0, S("abcdefghijlmnopqrst")); [ 0:24] 842 test(S("abcdefghijklmnopqrst"), 10, 1, "12345678901234567890", 1, S("abcdefghij1lmnopqrst")); [ 0:24] 843 test(S("abcdefghijklmnopqrst"), 10, 1, "12345678901234567890", 10, S("abcdefghij1234567890lmnopqrst")); [ 0:24] 844 test(S("abcdefghijklmnopqrst"), 10, 1, "12345678901234567890", 19, S("abcdefghij1234567890123456789lmnopqrst")); [ 0:24] 845 test(S("abcdefghijklmnopqrst"), 10, 1, "12345678901234567890", 20, S("abcdefghij12345678901234567890lmnopqrst")); [ 0:24] 846 test(S("abcdefghijklmnopqrst"), 10, 5, "", 0, S("abcdefghijpqrst")); [ 0:24] 847 test(S("abcdefghijklmnopqrst"), 10, 5, "12345", 0, S("abcdefghijpqrst")); [ 0:24] 848 test(S("abcdefghijklmnopqrst"), 10, 5, "12345", 1, S("abcdefghij1pqrst")); [ 0:24] 849 test(S("abcdefghijklmnopqrst"), 10, 5, "12345", 2, S("abcdefghij12pqrst")); [ 0:24] 850 test(S("abcdefghijklmnopqrst"), 10, 5, "12345", 4, S("abcdefghij1234pqrst")); [ 0:24] 851 test(S("abcdefghijklmnopqrst"), 10, 5, "12345", 5, S("abcdefghij12345pqrst")); [ 0:24] 852 test(S("abcdefghijklmnopqrst"), 10, 5, "1234567890", 0, S("abcdefghijpqrst")); [ 0:24] 853 test(S("abcdefghijklmnopqrst"), 10, 5, "1234567890", 1, S("abcdefghij1pqrst")); [ 0:24] 854 test(S("abcdefghijklmnopqrst"), 10, 5, "1234567890", 5, S("abcdefghij12345pqrst")); [ 0:24] 855 test(S("abcdefghijklmnopqrst"), 10, 5, "1234567890", 9, S("abcdefghij123456789pqrst")); [ 0:24] 856 test(S("abcdefghijklmnopqrst"), 10, 5, "1234567890", 10, S("abcdefghij1234567890pqrst")); [ 0:24] 857 test(S("abcdefghijklmnopqrst"), 10, 5, "12345678901234567890", 0, S("abcdefghijpqrst")); [ 0:24] 858 test(S("abcdefghijklmnopqrst"), 10, 5, "12345678901234567890", 1, S("abcdefghij1pqrst")); [ 0:24] 859 test(S("abcdefghijklmnopqrst"), 10, 5, "12345678901234567890", 10, S("abcdefghij1234567890pqrst")); [ 0:24] 860 test(S("abcdefghijklmnopqrst"), 10, 5, "12345678901234567890", 19, S("abcdefghij1234567890123456789pqrst")); [ 0:24] 861 test(S("abcdefghijklmnopqrst"), 10, 5, "12345678901234567890", 20, S("abcdefghij12345678901234567890pqrst")); [ 0:24] 862 test(S("abcdefghijklmnopqrst"), 10, 9, "", 0, S("abcdefghijt")); [ 0:24] 863 test(S("abcdefghijklmnopqrst"), 10, 9, "12345", 0, S("abcdefghijt")); [ 0:24] 864 test(S("abcdefghijklmnopqrst"), 10, 9, "12345", 1, S("abcdefghij1t")); [ 0:24] 865 test(S("abcdefghijklmnopqrst"), 10, 9, "12345", 2, S("abcdefghij12t")); [ 0:24] 866 test(S("abcdefghijklmnopqrst"), 10, 9, "12345", 4, S("abcdefghij1234t")); [ 0:24] 867 test(S("abcdefghijklmnopqrst"), 10, 9, "12345", 5, S("abcdefghij12345t")); [ 0:24] 868 test(S("abcdefghijklmnopqrst"), 10, 9, "1234567890", 0, S("abcdefghijt")); [ 0:24] 869 test(S("abcdefghijklmnopqrst"), 10, 9, "1234567890", 1, S("abcdefghij1t")); [ 0:24] 870 test(S("abcdefghijklmnopqrst"), 10, 9, "1234567890", 5, S("abcdefghij12345t")); [ 0:24] 871 test(S("abcdefghijklmnopqrst"), 10, 9, "1234567890", 9, S("abcdefghij123456789t")); [ 0:24] 872 test(S("abcdefghijklmnopqrst"), 10, 9, "1234567890", 10, S("abcdefghij1234567890t")); [ 0:24] 873 test(S("abcdefghijklmnopqrst"), 10, 9, "12345678901234567890", 0, S("abcdefghijt")); [ 0:24] 874 test(S("abcdefghijklmnopqrst"), 10, 9, "12345678901234567890", 1, S("abcdefghij1t")); [ 0:24] 875 test(S("abcdefghijklmnopqrst"), 10, 9, "12345678901234567890", 10, S("abcdefghij1234567890t")); [ 0:24] 876 test(S("abcdefghijklmnopqrst"), 10, 9, "12345678901234567890", 19, S("abcdefghij1234567890123456789t")); [ 0:24] 877 test(S("abcdefghijklmnopqrst"), 10, 9, "12345678901234567890", 20, S("abcdefghij12345678901234567890t")); [ 0:24] 878 } [ 0:24] 879 [ 0:24] 880 template [ 0:24] 881 void test8() [ 0:24] 882 { [ 0:24] 883 test(S("abcdefghijklmnopqrst"), 10, 10, "", 0, S("abcdefghij")); [ 0:24] 884 test(S("abcdefghijklmnopqrst"), 10, 10, "12345", 0, S("abcdefghij")); [ 0:24] 885 test(S("abcdefghijklmnopqrst"), 10, 10, "12345", 1, S("abcdefghij1")); [ 0:24] 886 test(S("abcdefghijklmnopqrst"), 10, 10, "12345", 2, S("abcdefghij12")); [ 0:24] 887 test(S("abcdefghijklmnopqrst"), 10, 10, "12345", 4, S("abcdefghij1234")); [ 0:24] 888 test(S("abcdefghijklmnopqrst"), 10, 10, "12345", 5, S("abcdefghij12345")); [ 0:24] 889 test(S("abcdefghijklmnopqrst"), 10, 10, "1234567890", 0, S("abcdefghij")); [ 0:24] 890 test(S("abcdefghijklmnopqrst"), 10, 10, "1234567890", 1, S("abcdefghij1")); [ 0:24] 891 test(S("abcdefghijklmnopqrst"), 10, 10, "1234567890", 5, S("abcdefghij12345")); [ 0:24] 892 test(S("abcdefghijklmnopqrst"), 10, 10, "1234567890", 9, S("abcdefghij123456789")); [ 0:24] 893 test(S("abcdefghijklmnopqrst"), 10, 10, "1234567890", 10, S("abcdefghij1234567890")); [ 0:24] 894 test(S("abcdefghijklmnopqrst"), 10, 10, "12345678901234567890", 0, S("abcdefghij")); [ 0:24] 895 test(S("abcdefghijklmnopqrst"), 10, 10, "12345678901234567890", 1, S("abcdefghij1")); [ 0:24] 896 test(S("abcdefghijklmnopqrst"), 10, 10, "12345678901234567890", 10, S("abcdefghij1234567890")); [ 0:24] 897 test(S("abcdefghijklmnopqrst"), 10, 10, "12345678901234567890", 19, S("abcdefghij1234567890123456789")); [ 0:24] 898 test(S("abcdefghijklmnopqrst"), 10, 10, "12345678901234567890", 20, S("abcdefghij12345678901234567890")); [ 0:24] 899 test(S("abcdefghijklmnopqrst"), 19, 0, "", 0, S("abcdefghijklmnopqrst")); [ 0:24] 900 test(S("abcdefghijklmnopqrst"), 19, 0, "12345", 0, S("abcdefghijklmnopqrst")); [ 0:24] 901 test(S("abcdefghijklmnopqrst"), 19, 0, "12345", 1, S("abcdefghijklmnopqrs1t")); [ 0:24] 902 test(S("abcdefghijklmnopqrst"), 19, 0, "12345", 2, S("abcdefghijklmnopqrs12t")); [ 0:24] 903 test(S("abcdefghijklmnopqrst"), 19, 0, "12345", 4, S("abcdefghijklmnopqrs1234t")); [ 0:24] 904 test(S("abcdefghijklmnopqrst"), 19, 0, "12345", 5, S("abcdefghijklmnopqrs12345t")); [ 0:24] 905 test(S("abcdefghijklmnopqrst"), 19, 0, "1234567890", 0, S("abcdefghijklmnopqrst")); [ 0:24] 906 test(S("abcdefghijklmnopqrst"), 19, 0, "1234567890", 1, S("abcdefghijklmnopqrs1t")); [ 0:24] 907 test(S("abcdefghijklmnopqrst"), 19, 0, "1234567890", 5, S("abcdefghijklmnopqrs12345t")); [ 0:24] 908 test(S("abcdefghijklmnopqrst"), 19, 0, "1234567890", 9, S("abcdefghijklmnopqrs123456789t")); [ 0:24] 909 test(S("abcdefghijklmnopqrst"), 19, 0, "1234567890", 10, S("abcdefghijklmnopqrs1234567890t")); [ 0:24] 910 test(S("abcdefghijklmnopqrst"), 19, 0, "12345678901234567890", 0, S("abcdefghijklmnopqrst")); [ 0:24] 911 test(S("abcdefghijklmnopqrst"), 19, 0, "12345678901234567890", 1, S("abcdefghijklmnopqrs1t")); [ 0:24] 912 test(S("abcdefghijklmnopqrst"), 19, 0, "12345678901234567890", 10, S("abcdefghijklmnopqrs1234567890t")); [ 0:24] 913 test(S("abcdefghijklmnopqrst"), 19, 0, "12345678901234567890", 19, S("abcdefghijklmnopqrs1234567890123456789t")); [ 0:24] 914 test(S("abcdefghijklmnopqrst"), 19, 0, "12345678901234567890", 20, S("abcdefghijklmnopqrs12345678901234567890t")); [ 0:24] 915 test(S("abcdefghijklmnopqrst"), 19, 1, "", 0, S("abcdefghijklmnopqrs")); [ 0:24] 916 test(S("abcdefghijklmnopqrst"), 19, 1, "12345", 0, S("abcdefghijklmnopqrs")); [ 0:24] 917 test(S("abcdefghijklmnopqrst"), 19, 1, "12345", 1, S("abcdefghijklmnopqrs1")); [ 0:24] 918 test(S("abcdefghijklmnopqrst"), 19, 1, "12345", 2, S("abcdefghijklmnopqrs12")); [ 0:24] 919 test(S("abcdefghijklmnopqrst"), 19, 1, "12345", 4, S("abcdefghijklmnopqrs1234")); [ 0:24] 920 test(S("abcdefghijklmnopqrst"), 19, 1, "12345", 5, S("abcdefghijklmnopqrs12345")); [ 0:24] 921 test(S("abcdefghijklmnopqrst"), 19, 1, "1234567890", 0, S("abcdefghijklmnopqrs")); [ 0:24] 922 test(S("abcdefghijklmnopqrst"), 19, 1, "1234567890", 1, S("abcdefghijklmnopqrs1")); [ 0:24] 923 test(S("abcdefghijklmnopqrst"), 19, 1, "1234567890", 5, S("abcdefghijklmnopqrs12345")); [ 0:24] 924 test(S("abcdefghijklmnopqrst"), 19, 1, "1234567890", 9, S("abcdefghijklmnopqrs123456789")); [ 0:24] 925 test(S("abcdefghijklmnopqrst"), 19, 1, "1234567890", 10, S("abcdefghijklmnopqrs1234567890")); [ 0:24] 926 test(S("abcdefghijklmnopqrst"), 19, 1, "12345678901234567890", 0, S("abcdefghijklmnopqrs")); [ 0:24] 927 test(S("abcdefghijklmnopqrst"), 19, 1, "12345678901234567890", 1, S("abcdefghijklmnopqrs1")); [ 0:24] 928 test(S("abcdefghijklmnopqrst"), 19, 1, "12345678901234567890", 10, S("abcdefghijklmnopqrs1234567890")); [ 0:24] 929 test(S("abcdefghijklmnopqrst"), 19, 1, "12345678901234567890", 19, S("abcdefghijklmnopqrs1234567890123456789")); [ 0:24] 930 test(S("abcdefghijklmnopqrst"), 19, 1, "12345678901234567890", 20, S("abcdefghijklmnopqrs12345678901234567890")); [ 0:24] 931 test(S("abcdefghijklmnopqrst"), 20, 0, "", 0, S("abcdefghijklmnopqrst")); [ 0:24] 932 test(S("abcdefghijklmnopqrst"), 20, 0, "12345", 0, S("abcdefghijklmnopqrst")); [ 0:24] 933 test(S("abcdefghijklmnopqrst"), 20, 0, "12345", 1, S("abcdefghijklmnopqrst1")); [ 0:24] 934 test(S("abcdefghijklmnopqrst"), 20, 0, "12345", 2, S("abcdefghijklmnopqrst12")); [ 0:24] 935 test(S("abcdefghijklmnopqrst"), 20, 0, "12345", 4, S("abcdefghijklmnopqrst1234")); [ 0:24] 936 test(S("abcdefghijklmnopqrst"), 20, 0, "12345", 5, S("abcdefghijklmnopqrst12345")); [ 0:24] 937 test(S("abcdefghijklmnopqrst"), 20, 0, "1234567890", 0, S("abcdefghijklmnopqrst")); [ 0:24] 938 test(S("abcdefghijklmnopqrst"), 20, 0, "1234567890", 1, S("abcdefghijklmnopqrst1")); [ 0:24] 939 test(S("abcdefghijklmnopqrst"), 20, 0, "1234567890", 5, S("abcdefghijklmnopqrst12345")); [ 0:24] 940 test(S("abcdefghijklmnopqrst"), 20, 0, "1234567890", 9, S("abcdefghijklmnopqrst123456789")); [ 0:24] 941 test(S("abcdefghijklmnopqrst"), 20, 0, "1234567890", 10, S("abcdefghijklmnopqrst1234567890")); [ 0:24] 942 test(S("abcdefghijklmnopqrst"), 20, 0, "12345678901234567890", 0, S("abcdefghijklmnopqrst")); [ 0:24] 943 test(S("abcdefghijklmnopqrst"), 20, 0, "12345678901234567890", 1, S("abcdefghijklmnopqrst1")); [ 0:24] 944 test(S("abcdefghijklmnopqrst"), 20, 0, "12345678901234567890", 10, S("abcdefghijklmnopqrst1234567890")); [ 0:24] 945 test(S("abcdefghijklmnopqrst"), 20, 0, "12345678901234567890", 19, S("abcdefghijklmnopqrst1234567890123456789")); [ 0:24] 946 test(S("abcdefghijklmnopqrst"), 20, 0, "12345678901234567890", 20, S("abcdefghijklmnopqrst12345678901234567890")); [ 0:24] 947 } [ 0:24] 948 [ 0:24] 949 int main(int, char**) [ 0:24] 950 { [ 0:24] 951 { [ 0:24] 952 typedef std::string S; [ 0:24] 953 test0(); [ 0:24] 954 test1(); [ 0:24] 955 test2(); [ 0:24] 956 test3(); [ 0:24] 957 test4(); [ 0:24] 958 test5(); [ 0:24] 959 test6(); [ 0:24] 960 test7(); [ 0:24] 961 test8(); [ 0:24] 962 } [ 0:24] 963 #if TEST_STD_VER >= 11 [ 0:24] 964 { [ 0:24] 965 typedef std::basic_string, min_allocator> S; [ 0:24] 966 test0(); [ 0:24] 967 test1(); [ 0:24] 968 test2(); [ 0:24] 969 test3(); [ 0:24] 970 test4(); [ 0:24] 971 test5(); [ 0:24] 972 test6(); [ 0:24] 973 test7(); [ 0:24] 974 test8(); [ 0:24] 975 } [ 0:24] 976 #endif [ 0:24] 977 [ 0:24] 978 { // test replacing into self [ 0:24] 979 typedef std::string S; [ 0:24] 980 S s_short = "123/"; [ 0:24] 981 S s_long = "Lorem ipsum dolor sit amet, consectetur/"; [ 0:24] 982 [ 0:24] 983 s_short.replace(s_short.begin(), s_short.begin(), s_short.data(), s_short.size()); [ 0:24] 984 assert(s_short == "123/123/"); [ 0:24] 985 s_short.replace(s_short.begin(), s_short.begin(), s_short.data(), s_short.size()); [ 0:24] 986 assert(s_short == "123/123/123/123/"); [ 0:24] 987 s_short.replace(s_short.begin(), s_short.begin(), s_short.data(), s_short.size()); [ 0:24] 988 assert(s_short == "123/123/123/123/123/123/123/123/"); [ 0:24] 989 [ 0:24] 990 s_long.replace(s_long.begin(), s_long.begin(), s_long.data(), s_long.size()); [ 0:24] 991 assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); [ 0:24] 992 } [ 0:24] 993 [ 0:24] 994 return 0; [ 0:24] 995 } [ 0:24] # no errors were expected but one was found anyway