[ 0:01] compiling /home/xrockai/src/divine/nightly/test/libcxx/strings/iter_iter_size_char.pass.cpp [ 0:01] In file included from /home/xrockai/src/divine/nightly/test/libcxx/strings/iter_iter_size_char.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:02] compiling /dios/lib/config/seqklee.bc [ 0:02] setting up pass: functionmeta, options = [ 0:04] setting up pass: fuse-ctors, options = [ 0:04] KLEE: output directory is "/var/obj/divine-nightly/semidbg/test/__test_work_dir.13/_klee_out" [ 0:09] KLEE: Using Z3 solver backend [ 0:09] WARNING: this target does not support the llvm.stacksave intrinsic. [ 0:09] 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:09] [ 0:09] KLEE: WARNING: undefined reference to function: _Z10klee_abortv [ 0:16] KLEE: WARNING: undefined reference to function: __dios_tainted_init [ 0:16] KLEE: WARNING: undefined reference to function: klee_free [ 0:16] KLEE: WARNING: undefined reference to function: klee_malloc [ 0:16] KLEE: WARNING ONCE: Using zero size array fix for landingpad instruction filter [ 0:16] i:1 [ 0:16] KLEE: WARNING ONCE: Alignment of memory from call "klee_malloc" is not modelled. Using alignment of 8. [ 0:16] about to __boot:0 [ 0:16] about to run the scheduler:0 [ 0:16] KLEE: WARNING ONCE: calling external: __dios_tainted_init() at /dios/libc/sys/start.cpp:49 5 [ 0:16] KLEE: ERROR: /dios/libc/sys/start.cpp:87: failed external call: __dios_tainted_init [ 0:16] KLEE: NOTE: now ignoring this error at this location [ 0:16] KLEE: ERROR: EXITING ON ERROR: [ 0:17] Error: failed external call: __dios_tainted_init [ 0:17] File: /dios/libc/sys/start.cpp [ 0:17] Line: 87 [ 0:17] assembly.ll line: 114643 [ 0:17] Stack: [ 0:17] #000114643 in __dios_start (l=2, argc=1, argv=94923490899464, envp=94923490984968) at /dios/libc/sys/start.cpp:87 [ 0:17] #100062645 in _ZN6__dios10sched_nullINS_5ClockINS_10NondetKleeINS_4BaseEEEEEE13run_schedulerINS_7ContextEEEvv () at /dios/sys/sched_null.hpp:163 [ 0:17] #200123223 in klee_boot (argc=2, argv=94923432107520) at /dios/arch/klee/boot.c:41 [ 0:17] [ 0:17] [ 0:17] 1 /* TAGS: c++ fin */ [ 0:17] 2 /* CC_OPTS: -std=c++2a */ [ 0:17] 3 /* VERIFY_OPTS: -o nofail:malloc */ [ 0:17] 4 //===----------------------------------------------------------------------===// [ 0:17] 5 // [ 0:17] 6 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. [ 0:17] 7 // See https://llvm.org/LICENSE.txt for license information. [ 0:17] 8 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception [ 0:17] 9 // [ 0:17] 10 //===----------------------------------------------------------------------===// [ 0:17] 11 [ 0:17] 12 // [ 0:17] 13 [ 0:17] 14 // basic_string& [ 0:17] 15 // replace(const_iterator i1, const_iterator i2, size_type n, charT c); [ 0:17] 16 [ 0:17] 17 #include [ 0:17] 18 #include [ 0:17] 19 #include [ 0:17] 20 [ 0:17] 21 #include "test_macros.h" [ 0:17] 22 #include "min_allocator.h" [ 0:17] 23 [ 0:17] 24 template [ 0:17] 25 void [ 0:17] 26 test(S s, typename S::size_type pos1, typename S::size_type n1, typename S::size_type n2, [ 0:17] 27 typename S::value_type c, S expected) [ 0:17] 28 { [ 0:17] 29 typename S::size_type old_size = s.size(); [ 0:17] 30 typename S::const_iterator first = s.begin() + pos1; [ 0:17] 31 typename S::const_iterator last = s.begin() + pos1 + n1; [ 0:17] 32 typename S::size_type xlen = last - first; [ 0:17] 33 s.replace(first, last, n2, c); [ 0:17] 34 LIBCPP_ASSERT(s.__invariants()); [ 0:17] 35 assert(s == expected); [ 0:17] 36 typename S::size_type rlen = n2; [ 0:17] 37 assert(s.size() == old_size - xlen + rlen); [ 0:17] 38 } [ 0:17] 39 [ 0:17] 40 template [ 0:17] 41 void test0() [ 0:17] 42 { [ 0:17] 43 test(S(""), 0, 0, 0, '3', S("")); [ 0:17] 44 test(S(""), 0, 0, 5, '3', S("33333")); [ 0:17] 45 test(S(""), 0, 0, 10, '3', S("3333333333")); [ 0:17] 46 test(S(""), 0, 0, 20, '3', S("33333333333333333333")); [ 0:17] 47 test(S("abcde"), 0, 0, 0, '3', S("abcde")); [ 0:17] 48 test(S("abcde"), 0, 0, 5, '3', S("33333abcde")); [ 0:17] 49 test(S("abcde"), 0, 0, 10, '3', S("3333333333abcde")); [ 0:17] 50 test(S("abcde"), 0, 0, 20, '3', S("33333333333333333333abcde")); [ 0:17] 51 test(S("abcde"), 0, 1, 0, '3', S("bcde")); [ 0:17] 52 test(S("abcde"), 0, 1, 5, '3', S("33333bcde")); [ 0:17] 53 test(S("abcde"), 0, 1, 10, '3', S("3333333333bcde")); [ 0:17] 54 test(S("abcde"), 0, 1, 20, '3', S("33333333333333333333bcde")); [ 0:17] 55 test(S("abcde"), 0, 2, 0, '3', S("cde")); [ 0:17] 56 test(S("abcde"), 0, 2, 5, '3', S("33333cde")); [ 0:17] 57 test(S("abcde"), 0, 2, 10, '3', S("3333333333cde")); [ 0:17] 58 test(S("abcde"), 0, 2, 20, '3', S("33333333333333333333cde")); [ 0:17] 59 test(S("abcde"), 0, 4, 0, '3', S("e")); [ 0:17] 60 test(S("abcde"), 0, 4, 5, '3', S("33333e")); [ 0:17] 61 test(S("abcde"), 0, 4, 10, '3', S("3333333333e")); [ 0:17] 62 test(S("abcde"), 0, 4, 20, '3', S("33333333333333333333e")); [ 0:17] 63 test(S("abcde"), 0, 5, 0, '3', S("")); [ 0:17] 64 test(S("abcde"), 0, 5, 5, '3', S("33333")); [ 0:17] 65 test(S("abcde"), 0, 5, 10, '3', S("3333333333")); [ 0:17] 66 test(S("abcde"), 0, 5, 20, '3', S("33333333333333333333")); [ 0:17] 67 test(S("abcde"), 1, 0, 0, '3', S("abcde")); [ 0:17] 68 test(S("abcde"), 1, 0, 5, '3', S("a33333bcde")); [ 0:17] 69 test(S("abcde"), 1, 0, 10, '3', S("a3333333333bcde")); [ 0:17] 70 test(S("abcde"), 1, 0, 20, '3', S("a33333333333333333333bcde")); [ 0:17] 71 test(S("abcde"), 1, 1, 0, '3', S("acde")); [ 0:17] 72 test(S("abcde"), 1, 1, 5, '3', S("a33333cde")); [ 0:17] 73 test(S("abcde"), 1, 1, 10, '3', S("a3333333333cde")); [ 0:17] 74 test(S("abcde"), 1, 1, 20, '3', S("a33333333333333333333cde")); [ 0:17] 75 test(S("abcde"), 1, 2, 0, '3', S("ade")); [ 0:17] 76 test(S("abcde"), 1, 2, 5, '3', S("a33333de")); [ 0:17] 77 test(S("abcde"), 1, 2, 10, '3', S("a3333333333de")); [ 0:17] 78 test(S("abcde"), 1, 2, 20, '3', S("a33333333333333333333de")); [ 0:17] 79 test(S("abcde"), 1, 3, 0, '3', S("ae")); [ 0:17] 80 test(S("abcde"), 1, 3, 5, '3', S("a33333e")); [ 0:17] 81 test(S("abcde"), 1, 3, 10, '3', S("a3333333333e")); [ 0:17] 82 test(S("abcde"), 1, 3, 20, '3', S("a33333333333333333333e")); [ 0:17] 83 test(S("abcde"), 1, 4, 0, '3', S("a")); [ 0:17] 84 test(S("abcde"), 1, 4, 5, '3', S("a33333")); [ 0:17] 85 test(S("abcde"), 1, 4, 10, '3', S("a3333333333")); [ 0:17] 86 test(S("abcde"), 1, 4, 20, '3', S("a33333333333333333333")); [ 0:17] 87 test(S("abcde"), 2, 0, 0, '3', S("abcde")); [ 0:17] 88 test(S("abcde"), 2, 0, 5, '3', S("ab33333cde")); [ 0:17] 89 test(S("abcde"), 2, 0, 10, '3', S("ab3333333333cde")); [ 0:17] 90 test(S("abcde"), 2, 0, 20, '3', S("ab33333333333333333333cde")); [ 0:17] 91 test(S("abcde"), 2, 1, 0, '3', S("abde")); [ 0:17] 92 test(S("abcde"), 2, 1, 5, '3', S("ab33333de")); [ 0:17] 93 test(S("abcde"), 2, 1, 10, '3', S("ab3333333333de")); [ 0:17] 94 test(S("abcde"), 2, 1, 20, '3', S("ab33333333333333333333de")); [ 0:17] 95 test(S("abcde"), 2, 2, 0, '3', S("abe")); [ 0:17] 96 test(S("abcde"), 2, 2, 5, '3', S("ab33333e")); [ 0:17] 97 test(S("abcde"), 2, 2, 10, '3', S("ab3333333333e")); [ 0:17] 98 test(S("abcde"), 2, 2, 20, '3', S("ab33333333333333333333e")); [ 0:17] 99 test(S("abcde"), 2, 3, 0, '3', S("ab")); [ 0:17] 100 test(S("abcde"), 2, 3, 5, '3', S("ab33333")); [ 0:17] 101 test(S("abcde"), 2, 3, 10, '3', S("ab3333333333")); [ 0:17] 102 test(S("abcde"), 2, 3, 20, '3', S("ab33333333333333333333")); [ 0:17] 103 test(S("abcde"), 4, 0, 0, '3', S("abcde")); [ 0:17] 104 test(S("abcde"), 4, 0, 5, '3', S("abcd33333e")); [ 0:17] 105 test(S("abcde"), 4, 0, 10, '3', S("abcd3333333333e")); [ 0:17] 106 test(S("abcde"), 4, 0, 20, '3', S("abcd33333333333333333333e")); [ 0:17] 107 test(S("abcde"), 4, 1, 0, '3', S("abcd")); [ 0:17] 108 test(S("abcde"), 4, 1, 5, '3', S("abcd33333")); [ 0:17] 109 test(S("abcde"), 4, 1, 10, '3', S("abcd3333333333")); [ 0:17] 110 test(S("abcde"), 4, 1, 20, '3', S("abcd33333333333333333333")); [ 0:17] 111 test(S("abcde"), 5, 0, 0, '3', S("abcde")); [ 0:17] 112 test(S("abcde"), 5, 0, 5, '3', S("abcde33333")); [ 0:17] 113 test(S("abcde"), 5, 0, 10, '3', S("abcde3333333333")); [ 0:17] 114 test(S("abcde"), 5, 0, 20, '3', S("abcde33333333333333333333")); [ 0:17] 115 test(S("abcdefghij"), 0, 0, 0, '3', S("abcdefghij")); [ 0:17] 116 test(S("abcdefghij"), 0, 0, 5, '3', S("33333abcdefghij")); [ 0:17] 117 test(S("abcdefghij"), 0, 0, 10, '3', S("3333333333abcdefghij")); [ 0:17] 118 test(S("abcdefghij"), 0, 0, 20, '3', S("33333333333333333333abcdefghij")); [ 0:17] 119 test(S("abcdefghij"), 0, 1, 0, '3', S("bcdefghij")); [ 0:17] 120 test(S("abcdefghij"), 0, 1, 5, '3', S("33333bcdefghij")); [ 0:17] 121 test(S("abcdefghij"), 0, 1, 10, '3', S("3333333333bcdefghij")); [ 0:17] 122 test(S("abcdefghij"), 0, 1, 20, '3', S("33333333333333333333bcdefghij")); [ 0:17] 123 test(S("abcdefghij"), 0, 5, 0, '3', S("fghij")); [ 0:17] 124 test(S("abcdefghij"), 0, 5, 5, '3', S("33333fghij")); [ 0:17] 125 test(S("abcdefghij"), 0, 5, 10, '3', S("3333333333fghij")); [ 0:17] 126 test(S("abcdefghij"), 0, 5, 20, '3', S("33333333333333333333fghij")); [ 0:17] 127 test(S("abcdefghij"), 0, 9, 0, '3', S("j")); [ 0:17] 128 test(S("abcdefghij"), 0, 9, 5, '3', S("33333j")); [ 0:17] 129 test(S("abcdefghij"), 0, 9, 10, '3', S("3333333333j")); [ 0:17] 130 test(S("abcdefghij"), 0, 9, 20, '3', S("33333333333333333333j")); [ 0:17] 131 test(S("abcdefghij"), 0, 10, 0, '3', S("")); [ 0:17] 132 test(S("abcdefghij"), 0, 10, 5, '3', S("33333")); [ 0:17] 133 test(S("abcdefghij"), 0, 10, 10, '3', S("3333333333")); [ 0:17] 134 test(S("abcdefghij"), 0, 10, 20, '3', S("33333333333333333333")); [ 0:17] 135 test(S("abcdefghij"), 1, 0, 0, '3', S("abcdefghij")); [ 0:17] 136 test(S("abcdefghij"), 1, 0, 5, '3', S("a33333bcdefghij")); [ 0:17] 137 test(S("abcdefghij"), 1, 0, 10, '3', S("a3333333333bcdefghij")); [ 0:17] 138 test(S("abcdefghij"), 1, 0, 20, '3', S("a33333333333333333333bcdefghij")); [ 0:17] 139 test(S("abcdefghij"), 1, 1, 0, '3', S("acdefghij")); [ 0:17] 140 test(S("abcdefghij"), 1, 1, 5, '3', S("a33333cdefghij")); [ 0:17] 141 test(S("abcdefghij"), 1, 1, 10, '3', S("a3333333333cdefghij")); [ 0:17] 142 test(S("abcdefghij"), 1, 1, 20, '3', S("a33333333333333333333cdefghij")); [ 0:17] 143 } [ 0:17] 144 [ 0:17] 145 template [ 0:17] 146 void test1() [ 0:17] 147 { [ 0:17] 148 test(S("abcdefghij"), 1, 4, 0, '3', S("afghij")); [ 0:17] 149 test(S("abcdefghij"), 1, 4, 5, '3', S("a33333fghij")); [ 0:17] 150 test(S("abcdefghij"), 1, 4, 10, '3', S("a3333333333fghij")); [ 0:17] 151 test(S("abcdefghij"), 1, 4, 20, '3', S("a33333333333333333333fghij")); [ 0:17] 152 test(S("abcdefghij"), 1, 8, 0, '3', S("aj")); [ 0:17] 153 test(S("abcdefghij"), 1, 8, 5, '3', S("a33333j")); [ 0:17] 154 test(S("abcdefghij"), 1, 8, 10, '3', S("a3333333333j")); [ 0:17] 155 test(S("abcdefghij"), 1, 8, 20, '3', S("a33333333333333333333j")); [ 0:17] 156 test(S("abcdefghij"), 1, 9, 0, '3', S("a")); [ 0:17] 157 test(S("abcdefghij"), 1, 9, 5, '3', S("a33333")); [ 0:17] 158 test(S("abcdefghij"), 1, 9, 10, '3', S("a3333333333")); [ 0:17] 159 test(S("abcdefghij"), 1, 9, 20, '3', S("a33333333333333333333")); [ 0:17] 160 test(S("abcdefghij"), 5, 0, 0, '3', S("abcdefghij")); [ 0:17] 161 test(S("abcdefghij"), 5, 0, 5, '3', S("abcde33333fghij")); [ 0:17] 162 test(S("abcdefghij"), 5, 0, 10, '3', S("abcde3333333333fghij")); [ 0:17] 163 test(S("abcdefghij"), 5, 0, 20, '3', S("abcde33333333333333333333fghij")); [ 0:17] 164 test(S("abcdefghij"), 5, 1, 0, '3', S("abcdeghij")); [ 0:17] 165 test(S("abcdefghij"), 5, 1, 5, '3', S("abcde33333ghij")); [ 0:17] 166 test(S("abcdefghij"), 5, 1, 10, '3', S("abcde3333333333ghij")); [ 0:17] 167 test(S("abcdefghij"), 5, 1, 20, '3', S("abcde33333333333333333333ghij")); [ 0:17] 168 test(S("abcdefghij"), 5, 2, 0, '3', S("abcdehij")); [ 0:17] 169 test(S("abcdefghij"), 5, 2, 5, '3', S("abcde33333hij")); [ 0:17] 170 test(S("abcdefghij"), 5, 2, 10, '3', S("abcde3333333333hij")); [ 0:17] 171 test(S("abcdefghij"), 5, 2, 20, '3', S("abcde33333333333333333333hij")); [ 0:17] 172 test(S("abcdefghij"), 5, 4, 0, '3', S("abcdej")); [ 0:17] 173 test(S("abcdefghij"), 5, 4, 5, '3', S("abcde33333j")); [ 0:17] 174 test(S("abcdefghij"), 5, 4, 10, '3', S("abcde3333333333j")); [ 0:17] 175 test(S("abcdefghij"), 5, 4, 20, '3', S("abcde33333333333333333333j")); [ 0:17] 176 test(S("abcdefghij"), 5, 5, 0, '3', S("abcde")); [ 0:17] 177 test(S("abcdefghij"), 5, 5, 5, '3', S("abcde33333")); [ 0:17] 178 test(S("abcdefghij"), 5, 5, 10, '3', S("abcde3333333333")); [ 0:17] 179 test(S("abcdefghij"), 5, 5, 20, '3', S("abcde33333333333333333333")); [ 0:17] 180 test(S("abcdefghij"), 9, 0, 0, '3', S("abcdefghij")); [ 0:17] 181 test(S("abcdefghij"), 9, 0, 5, '3', S("abcdefghi33333j")); [ 0:17] 182 test(S("abcdefghij"), 9, 0, 10, '3', S("abcdefghi3333333333j")); [ 0:17] 183 test(S("abcdefghij"), 9, 0, 20, '3', S("abcdefghi33333333333333333333j")); [ 0:17] 184 test(S("abcdefghij"), 9, 1, 0, '3', S("abcdefghi")); [ 0:17] 185 test(S("abcdefghij"), 9, 1, 5, '3', S("abcdefghi33333")); [ 0:17] 186 test(S("abcdefghij"), 9, 1, 10, '3', S("abcdefghi3333333333")); [ 0:17] 187 test(S("abcdefghij"), 9, 1, 20, '3', S("abcdefghi33333333333333333333")); [ 0:17] 188 test(S("abcdefghij"), 10, 0, 0, '3', S("abcdefghij")); [ 0:17] 189 test(S("abcdefghij"), 10, 0, 5, '3', S("abcdefghij33333")); [ 0:17] 190 test(S("abcdefghij"), 10, 0, 10, '3', S("abcdefghij3333333333")); [ 0:17] 191 test(S("abcdefghij"), 10, 0, 20, '3', S("abcdefghij33333333333333333333")); [ 0:17] 192 test(S("abcdefghijklmnopqrst"), 0, 0, 0, '3', S("abcdefghijklmnopqrst")); [ 0:17] 193 test(S("abcdefghijklmnopqrst"), 0, 0, 5, '3', S("33333abcdefghijklmnopqrst")); [ 0:17] 194 test(S("abcdefghijklmnopqrst"), 0, 0, 10, '3', S("3333333333abcdefghijklmnopqrst")); [ 0:17] 195 test(S("abcdefghijklmnopqrst"), 0, 0, 20, '3', S("33333333333333333333abcdefghijklmnopqrst")); [ 0:17] 196 test(S("abcdefghijklmnopqrst"), 0, 1, 0, '3', S("bcdefghijklmnopqrst")); [ 0:17] 197 test(S("abcdefghijklmnopqrst"), 0, 1, 5, '3', S("33333bcdefghijklmnopqrst")); [ 0:17] 198 test(S("abcdefghijklmnopqrst"), 0, 1, 10, '3', S("3333333333bcdefghijklmnopqrst")); [ 0:17] 199 test(S("abcdefghijklmnopqrst"), 0, 1, 20, '3', S("33333333333333333333bcdefghijklmnopqrst")); [ 0:17] 200 test(S("abcdefghijklmnopqrst"), 0, 10, 0, '3', S("klmnopqrst")); [ 0:17] 201 test(S("abcdefghijklmnopqrst"), 0, 10, 5, '3', S("33333klmnopqrst")); [ 0:17] 202 test(S("abcdefghijklmnopqrst"), 0, 10, 10, '3', S("3333333333klmnopqrst")); [ 0:17] 203 test(S("abcdefghijklmnopqrst"), 0, 10, 20, '3', S("33333333333333333333klmnopqrst")); [ 0:17] 204 test(S("abcdefghijklmnopqrst"), 0, 19, 0, '3', S("t")); [ 0:17] 205 test(S("abcdefghijklmnopqrst"), 0, 19, 5, '3', S("33333t")); [ 0:17] 206 test(S("abcdefghijklmnopqrst"), 0, 19, 10, '3', S("3333333333t")); [ 0:17] 207 test(S("abcdefghijklmnopqrst"), 0, 19, 20, '3', S("33333333333333333333t")); [ 0:17] 208 test(S("abcdefghijklmnopqrst"), 0, 20, 0, '3', S("")); [ 0:17] 209 test(S("abcdefghijklmnopqrst"), 0, 20, 5, '3', S("33333")); [ 0:17] 210 test(S("abcdefghijklmnopqrst"), 0, 20, 10, '3', S("3333333333")); [ 0:17] 211 test(S("abcdefghijklmnopqrst"), 0, 20, 20, '3', S("33333333333333333333")); [ 0:17] 212 test(S("abcdefghijklmnopqrst"), 1, 0, 0, '3', S("abcdefghijklmnopqrst")); [ 0:17] 213 test(S("abcdefghijklmnopqrst"), 1, 0, 5, '3', S("a33333bcdefghijklmnopqrst")); [ 0:17] 214 test(S("abcdefghijklmnopqrst"), 1, 0, 10, '3', S("a3333333333bcdefghijklmnopqrst")); [ 0:17] 215 test(S("abcdefghijklmnopqrst"), 1, 0, 20, '3', S("a33333333333333333333bcdefghijklmnopqrst")); [ 0:17] 216 test(S("abcdefghijklmnopqrst"), 1, 1, 0, '3', S("acdefghijklmnopqrst")); [ 0:17] 217 test(S("abcdefghijklmnopqrst"), 1, 1, 5, '3', S("a33333cdefghijklmnopqrst")); [ 0:17] 218 test(S("abcdefghijklmnopqrst"), 1, 1, 10, '3', S("a3333333333cdefghijklmnopqrst")); [ 0:17] 219 test(S("abcdefghijklmnopqrst"), 1, 1, 20, '3', S("a33333333333333333333cdefghijklmnopqrst")); [ 0:17] 220 test(S("abcdefghijklmnopqrst"), 1, 9, 0, '3', S("aklmnopqrst")); [ 0:17] 221 test(S("abcdefghijklmnopqrst"), 1, 9, 5, '3', S("a33333klmnopqrst")); [ 0:17] 222 test(S("abcdefghijklmnopqrst"), 1, 9, 10, '3', S("a3333333333klmnopqrst")); [ 0:17] 223 test(S("abcdefghijklmnopqrst"), 1, 9, 20, '3', S("a33333333333333333333klmnopqrst")); [ 0:17] 224 test(S("abcdefghijklmnopqrst"), 1, 18, 0, '3', S("at")); [ 0:17] 225 test(S("abcdefghijklmnopqrst"), 1, 18, 5, '3', S("a33333t")); [ 0:17] 226 test(S("abcdefghijklmnopqrst"), 1, 18, 10, '3', S("a3333333333t")); [ 0:17] 227 test(S("abcdefghijklmnopqrst"), 1, 18, 20, '3', S("a33333333333333333333t")); [ 0:17] 228 test(S("abcdefghijklmnopqrst"), 1, 19, 0, '3', S("a")); [ 0:17] 229 test(S("abcdefghijklmnopqrst"), 1, 19, 5, '3', S("a33333")); [ 0:17] 230 test(S("abcdefghijklmnopqrst"), 1, 19, 10, '3', S("a3333333333")); [ 0:17] 231 test(S("abcdefghijklmnopqrst"), 1, 19, 20, '3', S("a33333333333333333333")); [ 0:17] 232 test(S("abcdefghijklmnopqrst"), 10, 0, 0, '3', S("abcdefghijklmnopqrst")); [ 0:17] 233 test(S("abcdefghijklmnopqrst"), 10, 0, 5, '3', S("abcdefghij33333klmnopqrst")); [ 0:17] 234 test(S("abcdefghijklmnopqrst"), 10, 0, 10, '3', S("abcdefghij3333333333klmnopqrst")); [ 0:17] 235 test(S("abcdefghijklmnopqrst"), 10, 0, 20, '3', S("abcdefghij33333333333333333333klmnopqrst")); [ 0:17] 236 test(S("abcdefghijklmnopqrst"), 10, 1, 0, '3', S("abcdefghijlmnopqrst")); [ 0:17] 237 test(S("abcdefghijklmnopqrst"), 10, 1, 5, '3', S("abcdefghij33333lmnopqrst")); [ 0:17] 238 test(S("abcdefghijklmnopqrst"), 10, 1, 10, '3', S("abcdefghij3333333333lmnopqrst")); [ 0:17] 239 test(S("abcdefghijklmnopqrst"), 10, 1, 20, '3', S("abcdefghij33333333333333333333lmnopqrst")); [ 0:17] 240 test(S("abcdefghijklmnopqrst"), 10, 5, 0, '3', S("abcdefghijpqrst")); [ 0:17] 241 test(S("abcdefghijklmnopqrst"), 10, 5, 5, '3', S("abcdefghij33333pqrst")); [ 0:17] 242 test(S("abcdefghijklmnopqrst"), 10, 5, 10, '3', S("abcdefghij3333333333pqrst")); [ 0:17] 243 test(S("abcdefghijklmnopqrst"), 10, 5, 20, '3', S("abcdefghij33333333333333333333pqrst")); [ 0:17] 244 test(S("abcdefghijklmnopqrst"), 10, 9, 0, '3', S("abcdefghijt")); [ 0:17] 245 test(S("abcdefghijklmnopqrst"), 10, 9, 5, '3', S("abcdefghij33333t")); [ 0:17] 246 test(S("abcdefghijklmnopqrst"), 10, 9, 10, '3', S("abcdefghij3333333333t")); [ 0:17] 247 test(S("abcdefghijklmnopqrst"), 10, 9, 20, '3', S("abcdefghij33333333333333333333t")); [ 0:17] 248 } [ 0:17] 249 [ 0:17] 250 template [ 0:17] 251 void test2() [ 0:17] 252 { [ 0:17] 253 test(S("abcdefghijklmnopqrst"), 10, 10, 0, '3', S("abcdefghij")); [ 0:17] 254 test(S("abcdefghijklmnopqrst"), 10, 10, 5, '3', S("abcdefghij33333")); [ 0:17] 255 test(S("abcdefghijklmnopqrst"), 10, 10, 10, '3', S("abcdefghij3333333333")); [ 0:17] 256 test(S("abcdefghijklmnopqrst"), 10, 10, 20, '3', S("abcdefghij33333333333333333333")); [ 0:17] 257 test(S("abcdefghijklmnopqrst"), 19, 0, 0, '3', S("abcdefghijklmnopqrst")); [ 0:17] 258 test(S("abcdefghijklmnopqrst"), 19, 0, 5, '3', S("abcdefghijklmnopqrs33333t")); [ 0:17] 259 test(S("abcdefghijklmnopqrst"), 19, 0, 10, '3', S("abcdefghijklmnopqrs3333333333t")); [ 0:17] 260 test(S("abcdefghijklmnopqrst"), 19, 0, 20, '3', S("abcdefghijklmnopqrs33333333333333333333t")); [ 0:17] 261 test(S("abcdefghijklmnopqrst"), 19, 1, 0, '3', S("abcdefghijklmnopqrs")); [ 0:17] 262 test(S("abcdefghijklmnopqrst"), 19, 1, 5, '3', S("abcdefghijklmnopqrs33333")); [ 0:17] 263 test(S("abcdefghijklmnopqrst"), 19, 1, 10, '3', S("abcdefghijklmnopqrs3333333333")); [ 0:17] 264 test(S("abcdefghijklmnopqrst"), 19, 1, 20, '3', S("abcdefghijklmnopqrs33333333333333333333")); [ 0:17] 265 test(S("abcdefghijklmnopqrst"), 20, 0, 0, '3', S("abcdefghijklmnopqrst")); [ 0:17] 266 test(S("abcdefghijklmnopqrst"), 20, 0, 5, '3', S("abcdefghijklmnopqrst33333")); [ 0:17] 267 test(S("abcdefghijklmnopqrst"), 20, 0, 10, '3', S("abcdefghijklmnopqrst3333333333")); [ 0:17] 268 test(S("abcdefghijklmnopqrst"), 20, 0, 20, '3', S("abcdefghijklmnopqrst33333333333333333333")); [ 0:17] 269 } [ 0:17] 270 [ 0:17] 271 int main(int, char**) [ 0:17] 272 { [ 0:17] 273 { [ 0:17] 274 typedef std::string S; [ 0:17] 275 test0(); [ 0:17] 276 test1(); [ 0:17] 277 test2(); [ 0:17] 278 } [ 0:17] 279 #if TEST_STD_VER >= 11 [ 0:17] 280 { [ 0:17] 281 typedef std::basic_string, min_allocator> S; [ 0:17] 282 test0(); [ 0:17] 283 test1(); [ 0:17] 284 test2(); [ 0:17] 285 } [ 0:17] 286 #endif [ 0:17] 287 [ 0:17] 288 return 0; [ 0:17] 289 } [ 0:17] # no errors were expected but one was found anyway