Branch Coverage

t/string_test.h
Criterion Covered Total %
branch 7877 16574 47.5


line true false branch
29 0 37 while (*src++) ++cnt;
34 42 0 REQUIRE(str.length() == len);
42 0 REQUIRE(str.length() == len);
42 0 REQUIRE(str.length() == len);
42 0 REQUIRE(str.length() == len);
42 0 REQUIRE(str.length() == len);
0 0 REQUIRE(str.length() == len);
0 0 REQUIRE(str.length() == len);
506 0 REQUIRE(str.length() == len);
506 0 REQUIRE(str.length() == len);
506 0 REQUIRE(str.length() == len);
506 0 REQUIRE(str.length() == len);
506 0 REQUIRE(str.length() == len);
0 0 REQUIRE(str.length() == len);
0 0 REQUIRE(str.length() == len);
35 42 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
42 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
42 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
42 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
42 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
42 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
42 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
0 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
0 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
506 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
506 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
506 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
506 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
506 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
506 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
506 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
0 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
0 0 CHECK(std::basic_string(str.data(), len) == std::basic_string(src, len));
36 42 0 CHECK(str.capacity() == cap);
42 0 CHECK(str.capacity() == cap);
42 0 CHECK(str.capacity() == cap);
42 0 CHECK(str.capacity() == cap);
42 0 CHECK(str.capacity() == cap);
42 0 CHECK(str.capacity() == cap);
0 0 CHECK(str.capacity() == cap);
0 0 CHECK(str.capacity() == cap);
506 0 CHECK(str.capacity() == cap);
506 0 CHECK(str.capacity() == cap);
506 0 CHECK(str.capacity() == cap);
506 0 CHECK(str.capacity() == cap);
506 0 CHECK(str.capacity() == cap);
506 0 CHECK(str.capacity() == cap);
0 0 CHECK(str.capacity() == cap);
0 0 CHECK(str.capacity() == cap);
37 42 0 CHECK(str.shared_capacity() == shcap);
42 0 CHECK(str.shared_capacity() == shcap);
42 0 CHECK(str.shared_capacity() == shcap);
42 0 CHECK(str.shared_capacity() == shcap);
42 0 CHECK(str.shared_capacity() == shcap);
42 0 CHECK(str.shared_capacity() == shcap);
0 0 CHECK(str.shared_capacity() == shcap);
0 0 CHECK(str.shared_capacity() == shcap);
506 0 CHECK(str.shared_capacity() == shcap);
506 0 CHECK(str.shared_capacity() == shcap);
506 0 CHECK(str.shared_capacity() == shcap);
506 0 CHECK(str.shared_capacity() == shcap);
506 0 CHECK(str.shared_capacity() == shcap);
506 0 CHECK(str.shared_capacity() == shcap);
0 0 CHECK(str.shared_capacity() == shcap);
0 0 CHECK(str.shared_capacity() == shcap);
43 12 0 template static void REQUIRE_STR (const AnyString& str, StdString src, size_t cap) { REQUIRE_STR(str, src, cap, cap); }
303 0 template static void REQUIRE_STR (const AnyString& str, StdString src, size_t cap) { REQUIRE_STR(str, src, cap, cap); }
44 5 0 template static void REQUIRE_STR (const AnyString& str, StdString src) { REQUIRE_STR(str, src, src.size()); }
128 0 template static void REQUIRE_STR (const AnyString& str, StdString src) { REQUIRE_STR(str, src, src.size()); }
45 71 0 template static void REQUIRE_STRM (const AnyString& str, StdString src) { REQUIRE_STR(str, src, str.capacity(), str.shared_capacity()); }
49 529 0 CHECK(stat.allocated_cnt == allocated_cnt);
529 0 CHECK(stat.allocated_cnt == allocated_cnt);
529 0 CHECK(stat.allocated_cnt == allocated_cnt);
529 0 CHECK(stat.allocated_cnt == allocated_cnt);
529 0 CHECK(stat.allocated_cnt == allocated_cnt);
0 0 CHECK(stat.allocated_cnt == allocated_cnt);
0 0 CHECK(stat.allocated_cnt == allocated_cnt);
50 529 0 CHECK(stat.allocated == allocated);
529 0 CHECK(stat.allocated == allocated);
529 0 CHECK(stat.allocated == allocated);
529 0 CHECK(stat.allocated == allocated);
529 0 CHECK(stat.allocated == allocated);
0 0 CHECK(stat.allocated == allocated);
0 0 CHECK(stat.allocated == allocated);
51 529 0 CHECK(stat.deallocated_cnt == deallocated_cnt);
529 0 CHECK(stat.deallocated_cnt == deallocated_cnt);
529 0 CHECK(stat.deallocated_cnt == deallocated_cnt);
529 0 CHECK(stat.deallocated_cnt == deallocated_cnt);
529 0 CHECK(stat.deallocated_cnt == deallocated_cnt);
0 0 CHECK(stat.deallocated_cnt == deallocated_cnt);
0 0 CHECK(stat.deallocated_cnt == deallocated_cnt);
52 529 0 CHECK(stat.deallocated == deallocated);
529 0 CHECK(stat.deallocated == deallocated);
529 0 CHECK(stat.deallocated == deallocated);
529 0 CHECK(stat.deallocated == deallocated);
529 0 CHECK(stat.deallocated == deallocated);
0 0 CHECK(stat.deallocated == deallocated);
0 0 CHECK(stat.deallocated == deallocated);
53 529 0 CHECK(stat.reallocated_cnt == reallocated_cnt);
529 0 CHECK(stat.reallocated_cnt == reallocated_cnt);
529 0 CHECK(stat.reallocated_cnt == reallocated_cnt);
529 0 CHECK(stat.reallocated_cnt == reallocated_cnt);
529 0 CHECK(stat.reallocated_cnt == reallocated_cnt);
0 0 CHECK(stat.reallocated_cnt == reallocated_cnt);
0 0 CHECK(stat.reallocated_cnt == reallocated_cnt);
54 529 0 CHECK(stat.reallocated == reallocated);
529 0 CHECK(stat.reallocated == reallocated);
529 0 CHECK(stat.reallocated == reallocated);
529 0 CHECK(stat.reallocated == reallocated);
529 0 CHECK(stat.reallocated == reallocated);
0 0 CHECK(stat.reallocated == reallocated);
0 0 CHECK(stat.reallocated == reallocated);
55 529 0 CHECK(stat.ext_deallocated_cnt == ext_deallocated_cnt);
529 0 CHECK(stat.ext_deallocated_cnt == ext_deallocated_cnt);
529 0 CHECK(stat.ext_deallocated_cnt == ext_deallocated_cnt);
529 0 CHECK(stat.ext_deallocated_cnt == ext_deallocated_cnt);
529 0 CHECK(stat.ext_deallocated_cnt == ext_deallocated_cnt);
0 0 CHECK(stat.ext_deallocated_cnt == ext_deallocated_cnt);
0 0 CHECK(stat.ext_deallocated_cnt == ext_deallocated_cnt);
56 529 0 CHECK(stat.ext_deallocated == ext_deallocated);
529 0 CHECK(stat.ext_deallocated == ext_deallocated);
529 0 CHECK(stat.ext_deallocated == ext_deallocated);
529 0 CHECK(stat.ext_deallocated == ext_deallocated);
529 0 CHECK(stat.ext_deallocated == ext_deallocated);
0 0 CHECK(stat.ext_deallocated == ext_deallocated);
0 0 CHECK(stat.ext_deallocated == ext_deallocated);
57 529 0 CHECK(stat.ext_shbuf_deallocated == ext_shbuf_deallocated);
529 0 CHECK(stat.ext_shbuf_deallocated == ext_shbuf_deallocated);
529 0 CHECK(stat.ext_shbuf_deallocated == ext_shbuf_deallocated);
529 0 CHECK(stat.ext_shbuf_deallocated == ext_shbuf_deallocated);
529 0 CHECK(stat.ext_shbuf_deallocated == ext_shbuf_deallocated);
0 0 CHECK(stat.ext_shbuf_deallocated == ext_shbuf_deallocated);
0 0 CHECK(stat.ext_shbuf_deallocated == ext_shbuf_deallocated);
62 16482 1151 for (size_t i = 0; i < count; ++i) {
64 24627 16482 while (*ptr) ret += (T)*ptr++;
24627 0 while (*ptr) ret += (T)*ptr++;
72 565 0 auto s = mstr(data, count);
73 565 0 s.copy(dest, s.size());
84 112 0 if (cap < src.size()) cap = src.size();
94 9 0 template static U create_external (StdString exp, size_t cap) { return U(extstr(exp), exp.size(), cap, &Allocator::ext_free); }
69 0 template static U create_external (StdString exp, size_t cap) { return U(extstr(exp), exp.size(), cap, &Allocator::ext_free); }
95 9 0 template static U create_external (StdString exp) { return create_external(exp, exp.size()); }
69 0 template static U create_external (StdString exp) { return create_external(exp, exp.size()); }
97 1 0 template static U create_external_cbuf (StdString exp) { return create_external_cbuf(exp, exp.size()); }
99 10 0 static void assign_external (String& s, StdString exp, size_t cap) { s.assign(extstr(exp), exp.size(), cap, &Allocator::ext_free); }
100 10 0 static void assign_external (String& s, StdString exp) { assign_external(s, exp, exp.size()); }
101 2 0 static void assign_external_cbuf (String& s, StdString exp, size_t cap) { s.assign(extstr(exp), exp.size(), cap, &Allocator::ext_free, shared_buf_alloc(), &Allocator::shared_buf_free); }
102 2 0 static void assign_external_cbuf (String& s, StdString exp) { assign_external_cbuf(s, exp, exp.size()); }
105 11 0 auto defexp = mstr("this string is definitely longer than max sso chars");
108 11 0 SECTION("empty") {
11 0 SECTION("empty") {
11 0 SECTION("empty") {
11 0 SECTION("empty") {
1 10 SECTION("empty") {
111 1 0 REQUIRE_STR(s, EMPTY);
113 1 0 CHECK_ALLOCS();
116 11 0 SECTION("literal") {
11 0 SECTION("literal") {
11 0 SECTION("literal") {
11 0 SECTION("literal") {
1 10 SECTION("literal") {
119 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
121 1 0 CHECK_ALLOCS();
125 11 0 SECTION("sso") {
11 0 SECTION("sso") {
11 0 SECTION("sso") {
11 0 SECTION("sso") {
1 10 SECTION("sso") {
128 6 1 while (cur.size() <= MAX_SSO_CHARS) {
129 6 0 String s(cur.data(), cur.size());
130 6 0 REQUIRE_STR(s, cur, MAX_SSO_CHARS);
6 0 REQUIRE_STR(s, cur, MAX_SSO_CHARS);
131 0 6 if (cur.size() == defexp.size()) throw "should not happen";
132 6 0 cur += defexp[cur.size()];
134 1 0 CHECK_ALLOCS();
138 1 0 String s(cur.data(), cur.size());
139 1 0 REQUIRE_STR(s, cur);
1 0 REQUIRE_STR(s, cur);
140 1 0 CHECK_ALLOCS(1, sz);
142 1 0 CHECK_ALLOCS(0, 0, 1, sz);
146 11 0 SECTION("internal with len") {
11 0 SECTION("internal with len") {
11 0 SECTION("internal with len") {
11 0 SECTION("internal with len") {
1 10 SECTION("internal with len") {
148 1 0 String s(defexp.data(), defexp.size());
149 1 0 REQUIRE_STR(s, defexp);
1 0 REQUIRE_STR(s, defexp);
151 1 0 CHECK_ALLOCS(1, defsz, 1, defsz);
154 11 0 SECTION("internal without len") {
11 0 SECTION("internal without len") {
11 0 SECTION("internal without len") {
11 0 SECTION("internal without len") {
1 10 SECTION("internal without len") {
156 1 0 String s(defexp.c_str());
157 1 0 REQUIRE_STR(s, defexp);
1 0 REQUIRE_STR(s, defexp);
159 1 0 CHECK_ALLOCS(1, defsz, 1, defsz);
162 11 0 SECTION("external") {
11 0 SECTION("external") {
11 0 SECTION("external") {
11 0 SECTION("external") {
1 10 SECTION("external") {
164 1 0 String s(extstr(defexp), defexp.size(), defexp.size(), &Allocator::ext_free);
1 0 String s(extstr(defexp), defexp.size(), defexp.size(), &Allocator::ext_free);
165 1 0 REQUIRE_STR(s, defexp);
1 0 REQUIRE_STR(s, defexp);
167 1 0 CHECK_ALLOCS(1, EBUF_CHARS, 1, EBUF_CHARS, 0, 0, 1, defexp.size());
170 11 0 SECTION("external with custom buf") {
11 0 SECTION("external with custom buf") {
11 0 SECTION("external with custom buf") {
11 0 SECTION("external with custom buf") {
1 10 SECTION("external with custom buf") {
172 1 0 String s(extstr(defexp), defexp.size(), defexp.size(), &Allocator::ext_free, shared_buf_alloc(), &Allocator::shared_buf_free);
1 0 String s(extstr(defexp), defexp.size(), defexp.size(), &Allocator::ext_free, shared_buf_alloc(), &Allocator::shared_buf_free);
1 0 String s(extstr(defexp), defexp.size(), defexp.size(), &Allocator::ext_free, shared_buf_alloc(), &Allocator::shared_buf_free);
173 1 0 REQUIRE_STR(s, defexp);
1 0 REQUIRE_STR(s, defexp);
174 1 0 CHECK_ALLOCS();
176 1 0 CHECK_ALLOCS(0, 0, 0, 0, 0, 0, 1, defexp.size(), 1);
179 11 0 SECTION("fill") {
11 0 SECTION("fill") {
11 0 SECTION("fill") {
11 0 SECTION("fill") {
2 9 SECTION("fill") {
180 2 0 SECTION("sso") {
2 0 SECTION("sso") {
2 0 SECTION("sso") {
2 0 SECTION("sso") {
1 1 SECTION("sso") {
182 1 0 auto exp = mstr("aa");
183 1 0 String s(exp.size(), (T)'a');
184 1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
186 1 0 CHECK_ALLOCS();
188 2 0 SECTION("internal") {
2 0 SECTION("internal") {
2 0 SECTION("internal") {
2 0 SECTION("internal") {
1 1 SECTION("internal") {
189 1 0 auto exp = mstr("B", 50);
191 1 0 String s(exp.size(), (T)'B');
192 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
195 1 0 CHECK_ALLOCS(1, sz, 1, sz);
199 11 0 SECTION("new capacity") {
11 0 SECTION("new capacity") {
11 0 SECTION("new capacity") {
11 0 SECTION("new capacity") {
2 9 SECTION("new capacity") {
200 2 0 SECTION("sso") {
2 0 SECTION("sso") {
2 0 SECTION("sso") {
2 0 SECTION("sso") {
1 1 SECTION("sso") {
202 1 0 String s(2);
203 1 0 REQUIRE_STR(s, EMPTY, 0, MAX_SSO_CHARS);
205 1 0 CHECK_ALLOCS();
207 2 0 SECTION("internal") {
2 0 SECTION("internal") {
2 0 SECTION("internal") {
2 0 SECTION("internal") {
1 1 SECTION("internal") {
209 1 0 String s(50);
210 1 0 REQUIRE_STR(s, EMPTY, 0, 50);
213 1 0 CHECK_ALLOCS(1, sz, 1, sz);
220 5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
1 4 SECTION("from empty") {
5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
1 4 SECTION("from empty") {
223 1 0 String s(src);
1 0 String s(src);
224 1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
225 1 0 REQUIRE_STR(s, EMPTY);
1 0 REQUIRE_STR(s, EMPTY);
226 1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
228 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
230 5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
1 4 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
1 4 SECTION("from literal") {
233 1 0 String s(src);
1 0 String s(src);
234 1 0 REQUIRE_STR(src, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(src, LITERAL, LITERAL_LEN, 0);
235 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
236 1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
238 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
240 5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
1 4 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
1 4 SECTION("from sso") {
242 1 0 auto exp = mstr("bu");
1 0 auto exp = mstr("bu");
243 1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
244 1 0 String s(src);
1 0 String s(src);
245 1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
246 1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
247 1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
1 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
0 0 REQUIRE(src.use_count() == 1);
249 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
251 5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
1 4 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
1 4 SECTION("from internal") {
252 1 0 auto exp = mstr("bu", 50);
1 0 auto exp = mstr("bu", 50);
255 1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
256 1 0 CHECK_ALLOCS(1, sz);
1 0 CHECK_ALLOCS(1, sz);
258 1 0 String s(src);
1 0 String s(src);
259 1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
260 1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
261 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
262 1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
0 0 REQUIRE(src.use_count() == 2);
0 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
0 0 REQUIRE(src.use_count() == 2);
0 0 REQUIRE(src.use_count() == 2);
264 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
266 1 0 CHECK_ALLOCS(0, 0, 1, sz);
1 0 CHECK_ALLOCS(0, 0, 1, sz);
268 5 0 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
1 4 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
1 4 SECTION("from external") {
269 1 0 auto exp = mstr("c", 50);
1 0 auto exp = mstr("c", 50);
271 1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
272 1 0 CHECK_ALLOCS(1, EBUF_CHARS);
1 0 CHECK_ALLOCS(1, EBUF_CHARS);
274 1 0 String s(src);
1 0 String s(src);
275 1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
276 1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
277 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
278 1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
0 0 REQUIRE(src.use_count() == 2);
0 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
1 0 REQUIRE(src.use_count() == 2);
0 0 REQUIRE(src.use_count() == 2);
0 0 REQUIRE(src.use_count() == 2);
280 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
282 1 0 CHECK_ALLOCS(0, 0, 1, EBUF_CHARS, 0, 0, 1, exp.size());
1 0 CHECK_ALLOCS(0, 0, 1, EBUF_CHARS, 0, 0, 1, exp.size());
288 5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
1 4 SECTION("from empty") {
5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
5 0 SECTION("from empty") {
1 4 SECTION("from empty") {
291 1 0 String s(std::move(src));
1 0 String s(std::move(src));
292 1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
293 1 0 REQUIRE_STR(s, EMPTY);
1 0 REQUIRE_STR(s, EMPTY);
295 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
297 5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
1 4 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
1 4 SECTION("from literal") {
300 1 0 String s(std::move(src));
1 0 String s(std::move(src));
301 1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
302 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
304 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
306 5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
1 4 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
1 4 SECTION("from sso") {
308 1 0 auto exp = mstr("bu");
1 0 auto exp = mstr("bu");
309 1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
310 1 0 String s(std::move(src));
1 0 String s(std::move(src));
311 1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
312 1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
314 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
316 5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
1 4 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
1 4 SECTION("from internal") {
317 1 0 auto exp = mstr("bu", 50);
1 0 auto exp = mstr("bu", 50);
320 1 0 FString src(exp.data(), exp.size());
1 0 FString src(exp.data(), exp.size());
321 1 0 CHECK_ALLOCS(1,sz);
1 0 CHECK_ALLOCS(1,sz);
322 1 0 String s(std::move(src));
1 0 String s(std::move(src));
323 1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
324 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
325 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
327 1 0 CHECK_ALLOCS(0,0,1,sz);
1 0 CHECK_ALLOCS(0,0,1,sz);
329 5 0 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
1 4 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
1 4 SECTION("from external") {
330 1 0 auto exp = mstr("c", 50);
1 0 auto exp = mstr("c", 50);
332 1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
333 1 0 CHECK_ALLOCS(1,EBUF_CHARS);
1 0 CHECK_ALLOCS(1,EBUF_CHARS);
334 1 0 String s(std::move(src));
1 0 String s(std::move(src));
335 1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
336 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
337 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
339 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp.size());
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp.size());
345 6 0 SECTION("from literal") {
6 0 SECTION("from literal") {
6 0 SECTION("from literal") {
6 0 SECTION("from literal") {
1 5 SECTION("from literal") {
6 0 SECTION("from literal") {
6 0 SECTION("from literal") {
6 0 SECTION("from literal") {
6 0 SECTION("from literal") {
1 5 SECTION("from literal") {
347 1 0 auto exp = StdString(LITERAL).substr(2, 25);
1 0 auto exp = StdString(LITERAL).substr(2, 25);
1 0 auto exp = StdString(LITERAL).substr(2, 25);
1 0 auto exp = StdString(LITERAL).substr(2, 25);
349 1 0 String s(src, 2, 25);
1 0 String s(src, 2, 25);
350 1 0 REQUIRE_STR(src, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(src, LITERAL, LITERAL_LEN, 0);
351 1 0 REQUIRE_STR(s, exp, 0);
1 0 REQUIRE_STR(s, exp, 0);
1 0 REQUIRE_STR(s, exp, 0);
1 0 REQUIRE_STR(s, exp, 0);
353 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
355 6 0 SECTION("from sso") {
6 0 SECTION("from sso") {
6 0 SECTION("from sso") {
6 0 SECTION("from sso") {
1 5 SECTION("from sso") {
6 0 SECTION("from sso") {
6 0 SECTION("from sso") {
6 0 SECTION("from sso") {
6 0 SECTION("from sso") {
1 5 SECTION("from sso") {
357 1 0 auto exp = mstr("bu");
1 0 auto exp = mstr("bu");
358 1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
359 1 0 String s(src, 1, 1);
1 0 String s(src, 1, 1);
360 1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
361 1 0 REQUIRE_STR(s, mstr("u"), MAX_SSO_CHARS-1);
1 0 REQUIRE_STR(s, mstr("u"), MAX_SSO_CHARS-1);
1 0 REQUIRE_STR(s, mstr("u"), MAX_SSO_CHARS-1);
1 0 REQUIRE_STR(s, mstr("u"), MAX_SSO_CHARS-1);
363 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
365 6 0 SECTION("from internal") {
6 0 SECTION("from internal") {
6 0 SECTION("from internal") {
6 0 SECTION("from internal") {
1 5 SECTION("from internal") {
6 0 SECTION("from internal") {
6 0 SECTION("from internal") {
6 0 SECTION("from internal") {
6 0 SECTION("from internal") {
1 5 SECTION("from internal") {
366 1 0 auto exp = mstr("bu", 50);
1 0 auto exp = mstr("bu", 50);
369 1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
370 1 0 CHECK_ALLOCS(1, sz);
1 0 CHECK_ALLOCS(1, sz);
371 1 0 String s(src, 9, 5);
1 0 String s(src, 9, 5);
372 1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
373 1 0 REQUIRE_STR(s, mstr("ububu"), 0, exp.size()-9);
1 0 REQUIRE_STR(s, mstr("ububu"), 0, exp.size()-9);
1 0 REQUIRE_STR(s, mstr("ububu"), 0, exp.size()-9);
1 0 REQUIRE_STR(s, mstr("ububu"), 0, exp.size()-9);
374 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
376 1 0 CHECK_ALLOCS(0,0,1,sz);
1 0 CHECK_ALLOCS(0,0,1,sz);
378 6 0 SECTION("from external") {
6 0 SECTION("from external") {
6 0 SECTION("from external") {
6 0 SECTION("from external") {
1 5 SECTION("from external") {
6 0 SECTION("from external") {
6 0 SECTION("from external") {
6 0 SECTION("from external") {
6 0 SECTION("from external") {
1 5 SECTION("from external") {
379 1 0 auto exp = mstr("c", 50);
1 0 auto exp = mstr("c", 50);
381 1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
1 0 FString src(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
382 1 0 CHECK_ALLOCS(1, EBUF_CHARS);
1 0 CHECK_ALLOCS(1, EBUF_CHARS);
383 1 0 String s(src, 10, 30);
1 0 String s(src, 10, 30);
384 1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
385 1 0 REQUIRE_STR(s, mstr("c", 30), 0, exp.size()-10);
1 0 REQUIRE_STR(s, mstr("c", 30), 0, exp.size()-10);
1 0 REQUIRE_STR(s, mstr("c", 30), 0, exp.size()-10);
1 0 REQUIRE_STR(s, mstr("c", 30), 0, exp.size()-10);
386 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
388 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp.size());
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp.size());
390 6 0 SECTION("out of bounds") {
6 0 SECTION("out of bounds") {
6 0 SECTION("out of bounds") {
6 0 SECTION("out of bounds") {
2 4 SECTION("out of bounds") {
6 0 SECTION("out of bounds") {
6 0 SECTION("out of bounds") {
6 0 SECTION("out of bounds") {
6 0 SECTION("out of bounds") {
2 4 SECTION("out of bounds") {
391 2 0 auto exp = mstr("hello");
2 0 auto exp = mstr("hello");
392 2 0 FString src(exp.c_str());
2 0 FString src(exp.c_str());
393 2 0 SECTION("too big length acts as npos") {
2 0 SECTION("too big length acts as npos") {
2 0 SECTION("too big length acts as npos") {
2 0 SECTION("too big length acts as npos") {
1 1 SECTION("too big length acts as npos") {
2 0 SECTION("too big length acts as npos") {
2 0 SECTION("too big length acts as npos") {
2 0 SECTION("too big length acts as npos") {
2 0 SECTION("too big length acts as npos") {
1 1 SECTION("too big length acts as npos") {
394 1 0 String s(src, 3, 10);
1 0 String s(src, 3, 10);
395 1 0 REQUIRE_STRM(s, mstr("lo"));
1 0 REQUIRE_STRM(s, mstr("lo"));
1 0 REQUIRE_STRM(s, mstr("lo"));
1 0 REQUIRE_STRM(s, mstr("lo"));
397 2 0 SECTION("too big offset throws exception") {
2 0 SECTION("too big offset throws exception") {
2 0 SECTION("too big offset throws exception") {
2 0 SECTION("too big offset throws exception") {
1 1 SECTION("too big offset throws exception") {
2 0 SECTION("too big offset throws exception") {
2 0 SECTION("too big offset throws exception") {
2 0 SECTION("too big offset throws exception") {
2 0 SECTION("too big offset throws exception") {
1 1 SECTION("too big offset throws exception") {
398 1 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
0 1 REQUIRE_THROWS(String(src, 6, 10));
0 0 REQUIRE_THROWS(String(src, 6, 10));
0 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
0 1 REQUIRE_THROWS(String(src, 6, 10));
0 0 REQUIRE_THROWS(String(src, 6, 10));
0 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
1 0 REQUIRE_THROWS(String(src, 6, 10));
404 1 0 auto exp = mstr("hello world, hello world!");
405 1 0 String src(exp.c_str());
406 1 0 String s = src.substr(0, 5);
407 1 0 REQUIRE_STR(s, mstr("hello"), 0, exp.size());
1 0 REQUIRE_STR(s, mstr("hello"), 0, exp.size());
408 1 0 s = src.substr(6);
1 0 s = src.substr(6);
409 1 0 REQUIRE_STR(s, mstr("world, hello world!"), 0, exp.size()-6);
1 0 REQUIRE_STR(s, mstr("world, hello world!"), 0, exp.size()-6);
410 1 0 s = src.substr(4, 3);
1 0 s = src.substr(4, 3);
411 1 0 REQUIRE_STR(s, mstr("o w"), 0, exp.size()-4);
1 0 REQUIRE_STR(s, mstr("o w"), 0, exp.size()-4);
412 1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
416 4 0 SECTION("literal") {
4 0 SECTION("literal") {
4 0 SECTION("literal") {
4 0 SECTION("literal") {
1 3 SECTION("literal") {
420 1 0 REQUIRE_STR(s, EMPTY);
422 1 0 CHECK_ALLOCS();
424 4 0 SECTION("sso") {
4 0 SECTION("sso") {
4 0 SECTION("sso") {
4 0 SECTION("sso") {
1 3 SECTION("sso") {
426 1 0 auto exp = mstr("bu");
427 1 0 String s(exp.c_str());
429 1 0 REQUIRE_STR(s, EMPTY, 0, MAX_SSO_CHARS);
431 1 0 CHECK_ALLOCS();
433 4 0 SECTION("internal") {
4 0 SECTION("internal") {
4 0 SECTION("internal") {
4 0 SECTION("internal") {
1 3 SECTION("internal") {
434 1 0 auto exp = mstr("bu", 50);
436 1 0 String s(exp.c_str());
439 1 0 REQUIRE_STR(s, EMPTY, 0, exp.size());
441 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp.size());
443 4 0 SECTION("external") {
4 0 SECTION("external") {
4 0 SECTION("external") {
4 0 SECTION("external") {
1 3 SECTION("external") {
444 1 0 auto exp = mstr("c", 50);
446 1 0 String s(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
1 0 String s(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
449 1 0 CHECK_ALLOCS();
450 1 0 REQUIRE_STR(s, EMPTY, 0, exp.size());
452 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp.size());
479 10 0 SECTION("from empty") {
10 0 SECTION("from empty") {
10 0 SECTION("from empty") {
10 0 SECTION("from empty") {
2 8 SECTION("from empty") {
10 0 SECTION("from empty") {
10 0 SECTION("from empty") {
10 0 SECTION("from empty") {
10 0 SECTION("from empty") {
2 8 SECTION("from empty") {
482 2 0 U::op(s, LITERAL);
2 0 U::op(s, LITERAL);
483 2 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
2 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
485 2 0 CHECK_ALLOCS();
2 0 CHECK_ALLOCS();
487 10 0 SECTION("from literal") {
10 0 SECTION("from literal") {
10 0 SECTION("from literal") {
10 0 SECTION("from literal") {
2 8 SECTION("from literal") {
10 0 SECTION("from literal") {
10 0 SECTION("from literal") {
10 0 SECTION("from literal") {
10 0 SECTION("from literal") {
2 8 SECTION("from literal") {
492 2 0 REQUIRE_STR(s, exp, exp_len, 0);
2 0 REQUIRE_STR(s, exp, exp_len, 0);
493 2 0 U::op(s, LITERAL);
2 0 U::op(s, LITERAL);
494 2 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
2 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
496 2 0 CHECK_ALLOCS();
2 0 CHECK_ALLOCS();
498 10 0 SECTION("from sso") {
10 0 SECTION("from sso") {
10 0 SECTION("from sso") {
10 0 SECTION("from sso") {
2 8 SECTION("from sso") {
10 0 SECTION("from sso") {
10 0 SECTION("from sso") {
10 0 SECTION("from sso") {
10 0 SECTION("from sso") {
2 8 SECTION("from sso") {
500 2 0 auto exp = mstr("bu");
2 0 auto exp = mstr("bu");
501 2 0 String s(exp.c_str());
2 0 String s(exp.c_str());
502 2 0 U::op(s, LITERAL);
2 0 U::op(s, LITERAL);
503 2 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
2 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
505 2 0 CHECK_ALLOCS();
2 0 CHECK_ALLOCS();
507 10 0 SECTION("from internal") {
10 0 SECTION("from internal") {
10 0 SECTION("from internal") {
10 0 SECTION("from internal") {
2 8 SECTION("from internal") {
10 0 SECTION("from internal") {
10 0 SECTION("from internal") {
10 0 SECTION("from internal") {
10 0 SECTION("from internal") {
2 8 SECTION("from internal") {
509 2 0 auto exp = mstr("a", 50);
2 0 auto exp = mstr("a", 50);
511 2 0 String s(exp.c_str());
2 0 String s(exp.c_str());
512 2 0 CHECK_ALLOCS(1,sz);
2 0 CHECK_ALLOCS(1,sz);
513 2 0 U::op(s, LITERAL);
2 0 U::op(s, LITERAL);
514 2 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
2 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
515 2 0 CHECK_ALLOCS(0,0,1,sz);
2 0 CHECK_ALLOCS(0,0,1,sz);
517 2 0 CHECK_ALLOCS();
2 0 CHECK_ALLOCS();
519 10 0 SECTION("from external") {
10 0 SECTION("from external") {
10 0 SECTION("from external") {
10 0 SECTION("from external") {
2 8 SECTION("from external") {
10 0 SECTION("from external") {
10 0 SECTION("from external") {
10 0 SECTION("from external") {
10 0 SECTION("from external") {
2 8 SECTION("from external") {
521 2 0 auto exp = mstr("c", 50);
2 0 auto exp = mstr("c", 50);
522 2 0 String s(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
2 0 String s(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
2 0 String s(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
2 0 String s(extstr(exp), exp.size(), exp.size(), &Allocator::ext_free);
523 2 0 CHECK_ALLOCS(1, EBUF_CHARS);
2 0 CHECK_ALLOCS(1, EBUF_CHARS);
524 2 0 U::op(s, LITERAL);
2 0 U::op(s, LITERAL);
525 2 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
2 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
526 2 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp.size());
2 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp.size());
528 2 0 CHECK_ALLOCS();
2 0 CHECK_ALLOCS();
534 14 0 SECTION("from literal") {
14 0 SECTION("from literal") {
14 0 SECTION("from literal") {
14 0 SECTION("from literal") {
4 10 SECTION("from literal") {
14 0 SECTION("from literal") {
14 0 SECTION("from literal") {
14 0 SECTION("from literal") {
14 0 SECTION("from literal") {
4 10 SECTION("from literal") {
535 4 0 auto exp = mstr("0", 50);
4 0 auto exp = mstr("0", 50);
537 4 0 SECTION("no len") {
4 0 SECTION("no len") {
4 0 SECTION("no len") {
4 0 SECTION("no len") {
2 2 SECTION("no len") {
4 0 SECTION("no len") {
4 0 SECTION("no len") {
4 0 SECTION("no len") {
4 0 SECTION("no len") {
2 2 SECTION("no len") {
538 2 0 U::op(s, exp.c_str());
2 0 U::op(s, exp.c_str());
539 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
540 2 0 CHECK_ALLOCS(1,BUF_CHARS+exp.size());
2 0 CHECK_ALLOCS(1,BUF_CHARS+exp.size());
541 2 0 s = EMPTY;
2 0 s = EMPTY;
542 2 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp.size());
2 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp.size());
544 4 0 SECTION("with len") {
4 0 SECTION("with len") {
4 0 SECTION("with len") {
4 0 SECTION("with len") {
2 2 SECTION("with len") {
4 0 SECTION("with len") {
4 0 SECTION("with len") {
4 0 SECTION("with len") {
4 0 SECTION("with len") {
2 2 SECTION("with len") {
545 2 0 s.assign(exp.data(), 40);
2 0 s.assign(exp.data(), 40);
546 2 0 CHECK_ALLOCS(1,BUF_CHARS+40);
2 0 CHECK_ALLOCS(1,BUF_CHARS+40);
547 2 0 REQUIRE_STR(s, exp.data(), 40, 40);
2 0 REQUIRE_STR(s, exp.data(), 40, 40);
548 2 0 s = EMPTY;
2 0 s = EMPTY;
549 2 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+40);
2 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+40);
553 14 0 SECTION("from sso") {
14 0 SECTION("from sso") {
14 0 SECTION("from sso") {
14 0 SECTION("from sso") {
2 12 SECTION("from sso") {
14 0 SECTION("from sso") {
14 0 SECTION("from sso") {
14 0 SECTION("from sso") {
14 0 SECTION("from sso") {
2 12 SECTION("from sso") {
554 2 0 auto exp = mstr("1", 50);
2 0 auto exp = mstr("1", 50);
555 2 0 String s(cstr("yt"));
2 0 String s(cstr("yt"));
2 0 String s(cstr("yt"));
2 0 String s(cstr("yt"));
556 2 0 U::op(s, exp.c_str());
2 0 U::op(s, exp.c_str());
557 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
558 2 0 CHECK_ALLOCS(1,BUF_CHARS+exp.size());
2 0 CHECK_ALLOCS(1,BUF_CHARS+exp.size());
559 2 0 s = EMPTY;
2 0 s = EMPTY;
560 2 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp.size());
2 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp.size());
562 14 0 SECTION("from internal") {
14 0 SECTION("from internal") {
14 0 SECTION("from internal") {
14 0 SECTION("from internal") {
2 12 SECTION("from internal") {
14 0 SECTION("from internal") {
14 0 SECTION("from internal") {
14 0 SECTION("from internal") {
14 0 SECTION("from internal") {
2 12 SECTION("from internal") {
563 2 0 auto exp = mstr("1", 50);
2 0 auto exp = mstr("1", 50);
564 2 0 String s(cstr("2", 50));
2 0 String s(cstr("2", 50));
2 0 String s(cstr("2", 50));
2 0 String s(cstr("2", 50));
566 2 0 U::op(s, exp.c_str());
2 0 U::op(s, exp.c_str());
567 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
568 2 0 CHECK_ALLOCS(); //no allocs for sufficient capacity
2 0 CHECK_ALLOCS(); //no allocs for sufficient capacity
569 2 0 U::op(s, cstr("so"));
2 0 U::op(s, cstr("so"));
2 0 U::op(s, cstr("so"));
2 0 U::op(s, cstr("so"));
570 2 0 REQUIRE_STR(s, mstr("so"), 50); // didnt become sso
2 0 REQUIRE_STR(s, mstr("so"), 50); // didnt become sso
2 0 REQUIRE_STR(s, mstr("so"), 50); // didnt become sso
2 0 REQUIRE_STR(s, mstr("so"), 50); // didnt become sso
571 2 0 CHECK_ALLOCS();
2 0 CHECK_ALLOCS();
572 2 0 exp = mstr("3", 60);
2 0 exp = mstr("3", 60);
573 2 0 U::op(s, exp.c_str());
2 0 U::op(s, exp.c_str());
574 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
575 2 0 CHECK_ALLOCS(1, BUF_CHARS+60, 1, BUF_CHARS+50); //extended storage
2 0 CHECK_ALLOCS(1, BUF_CHARS+60, 1, BUF_CHARS+50); //extended storage
576 2 0 s = EMPTY;
2 0 s = EMPTY;
577 2 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+60);
2 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+60);
579 14 0 SECTION("from external") {
14 0 SECTION("from external") {
14 0 SECTION("from external") {
14 0 SECTION("from external") {
2 12 SECTION("from external") {
14 0 SECTION("from external") {
14 0 SECTION("from external") {
14 0 SECTION("from external") {
14 0 SECTION("from external") {
2 12 SECTION("from external") {
580 2 0 auto exp = mstr("4", 50);
2 0 auto exp = mstr("4", 50);
581 2 0 String s(extstr(mstr("5", 50)), 50, 50, &Allocator::ext_free);
2 0 String s(extstr(mstr("5", 50)), 50, 50, &Allocator::ext_free);
2 0 String s(extstr(mstr("5", 50)), 50, 50, &Allocator::ext_free);
2 0 String s(extstr(mstr("5", 50)), 50, 50, &Allocator::ext_free);
583 2 0 U::op(s, exp.c_str());
2 0 U::op(s, exp.c_str());
584 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
585 2 0 CHECK_ALLOCS(); //no allocs for sufficient capacity
2 0 CHECK_ALLOCS(); //no allocs for sufficient capacity
586 2 0 exp = mstr("bt");
2 0 exp = mstr("bt");
587 2 0 U::op(s, exp.c_str());
2 0 U::op(s, exp.c_str());
588 2 0 REQUIRE_STR(s, exp, 50); // didnt become sso
2 0 REQUIRE_STR(s, exp, 50); // didnt become sso
2 0 REQUIRE_STR(s, exp, 50); // didnt become sso
2 0 REQUIRE_STR(s, exp, 50); // didnt become sso
589 2 0 exp = mstr("6", 70);
2 0 exp = mstr("6", 70);
590 2 0 U::op(s, exp.c_str());
2 0 U::op(s, exp.c_str());
591 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
592 2 0 CHECK_ALLOCS(1, BUF_CHARS+70, 1, EBUF_CHARS, 0, 0, 1, 50); //extended storage moved to internal
2 0 CHECK_ALLOCS(1, BUF_CHARS+70, 1, EBUF_CHARS, 0, 0, 1, 50); //extended storage moved to internal
593 2 0 s = EMPTY;
2 0 s = EMPTY;
594 2 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+70);
2 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+70);
596 14 0 SECTION("from cow") {
14 0 SECTION("from cow") {
14 0 SECTION("from cow") {
14 0 SECTION("from cow") {
4 10 SECTION("from cow") {
14 0 SECTION("from cow") {
14 0 SECTION("from cow") {
14 0 SECTION("from cow") {
14 0 SECTION("from cow") {
4 10 SECTION("from cow") {
597 4 0 auto exp = mstr("1", 40);
4 0 auto exp = mstr("1", 40);
598 4 0 SECTION("from internal cow") {
4 0 SECTION("from internal cow") {
4 0 SECTION("from internal cow") {
4 0 SECTION("from internal cow") {
2 2 SECTION("from internal cow") {
4 0 SECTION("from internal cow") {
4 0 SECTION("from internal cow") {
4 0 SECTION("from internal cow") {
4 0 SECTION("from internal cow") {
2 2 SECTION("from internal cow") {
599 2 0 String tmp(cstr("2", 50));
2 0 String tmp(cstr("2", 50));
2 0 String tmp(cstr("2", 50));
2 0 String tmp(cstr("2", 50));
600 2 0 String s(tmp);
2 0 String s(tmp);
602 2 0 U::op(s, exp.c_str());
2 0 U::op(s, exp.c_str());
603 2 0 REQUIRE_STR(s, exp); //string detached
2 0 REQUIRE_STR(s, exp); //string detached
2 0 REQUIRE_STR(s, exp); //string detached
2 0 REQUIRE_STR(s, exp); //string detached
604 2 0 CHECK_ALLOCS(1, BUF_CHARS+40); //string detached
2 0 CHECK_ALLOCS(1, BUF_CHARS+40); //string detached
606 2 0 s = tmp;
2 0 s = tmp;
608 2 0 U::op(s, cstr("qw"));
2 0 U::op(s, cstr("qw"));
2 0 U::op(s, cstr("qw"));
2 0 U::op(s, cstr("qw"));
609 2 0 REQUIRE_STR(s, mstr("qw"), MAX_SSO_CHARS); //string detached to sso
2 0 REQUIRE_STR(s, mstr("qw"), MAX_SSO_CHARS); //string detached to sso
2 0 REQUIRE_STR(s, mstr("qw"), MAX_SSO_CHARS); //string detached to sso
2 0 REQUIRE_STR(s, mstr("qw"), MAX_SSO_CHARS); //string detached to sso
611 4 0 SECTION("from external cow") {
4 0 SECTION("from external cow") {
4 0 SECTION("from external cow") {
4 0 SECTION("from external cow") {
2 2 SECTION("from external cow") {
4 0 SECTION("from external cow") {
4 0 SECTION("from external cow") {
4 0 SECTION("from external cow") {
4 0 SECTION("from external cow") {
2 2 SECTION("from external cow") {
612 2 0 String tmp(extstr(mstr("2", 50)), 50, 50, &Allocator::ext_free);
2 0 String tmp(extstr(mstr("2", 50)), 50, 50, &Allocator::ext_free);
2 0 String tmp(extstr(mstr("2", 50)), 50, 50, &Allocator::ext_free);
2 0 String tmp(extstr(mstr("2", 50)), 50, 50, &Allocator::ext_free);
613 2 0 String s(tmp);
2 0 String s(tmp);
615 2 0 U::op(s, exp.c_str());
2 0 U::op(s, exp.c_str());
616 2 0 REQUIRE_STR(s, exp); //string detached
2 0 REQUIRE_STR(s, exp); //string detached
2 0 REQUIRE_STR(s, exp); //string detached
2 0 REQUIRE_STR(s, exp); //string detached
617 2 0 CHECK_ALLOCS(1, BUF_CHARS+40); //string detached
2 0 CHECK_ALLOCS(1, BUF_CHARS+40); //string detached
619 2 0 s = tmp;
2 0 s = tmp;
621 2 0 U::op(s, cstr("qw"));
2 0 U::op(s, cstr("qw"));
2 0 U::op(s, cstr("qw"));
2 0 U::op(s, cstr("qw"));
622 2 0 REQUIRE_STR(s, mstr("qw"), MAX_SSO_CHARS); //string detached to sso
2 0 REQUIRE_STR(s, mstr("qw"), MAX_SSO_CHARS); //string detached to sso
2 0 REQUIRE_STR(s, mstr("qw"), MAX_SSO_CHARS); //string detached to sso
2 0 REQUIRE_STR(s, mstr("qw"), MAX_SSO_CHARS); //string detached to sso
629 10 0 SECTION("from literal") {
10 0 SECTION("from literal") {
10 0 SECTION("from literal") {
10 0 SECTION("from literal") {
2 8 SECTION("from literal") {
630 2 0 auto exp = mstr("0", 50);
632 2 0 assign_external(s, exp);
2 0 assign_external(s, exp);
633 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
634 2 0 CHECK_ALLOCS(1, EBUF_CHARS);
635 2 0 s = EMPTY;
636 2 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
638 10 0 SECTION("from sso") {
10 0 SECTION("from sso") {
10 0 SECTION("from sso") {
10 0 SECTION("from sso") {
2 8 SECTION("from sso") {
639 2 0 auto exp = mstr("1", 50);
640 2 0 String s(cstr("yt"));
2 0 String s(cstr("yt"));
641 2 0 assign_external(s, exp);
2 0 assign_external(s, exp);
642 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
643 2 0 CHECK_ALLOCS(1, EBUF_CHARS);
644 2 0 s = EMPTY;
645 2 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
647 10 0 SECTION("from internal") {
10 0 SECTION("from internal") {
10 0 SECTION("from internal") {
10 0 SECTION("from internal") {
2 8 SECTION("from internal") {
648 2 0 auto exp = mstr("1", 50);
649 2 0 String s(cstr("2", 60));
2 0 String s(cstr("2", 60));
651 2 0 assign_external(s, exp);
2 0 assign_external(s, exp);
652 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
653 2 0 CHECK_ALLOCS(1, EBUF_CHARS, 1, BUF_CHARS + 60);
654 2 0 s = EMPTY;
655 2 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
657 10 0 SECTION("from external") {
10 0 SECTION("from external") {
10 0 SECTION("from external") {
10 0 SECTION("from external") {
2 8 SECTION("from external") {
658 2 0 auto exp = mstr("4", 50);
660 2 0 String s = create_external<>(mstr("abcd"));
2 0 String s = create_external<>(mstr("abcd"));
662 2 0 assign_external(s, exp);
2 0 assign_external(s, exp);
663 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
664 2 0 CHECK_ALLOCS(0,0,0,0,0,0,1,4); //this case is optimized to reuse ExternalBuffer instead of dropping and creating a new one
665 2 0 s = EMPTY;
666 2 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
669 2 0 s = create_external<>(mstr("abcd"));
2 0 s = create_external<>(mstr("abcd"));
2 0 s = create_external<>(mstr("abcd"));
670 2 0 String tmp(s);
672 2 0 assign_external(s, exp);
2 0 assign_external(s, exp);
673 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
674 2 0 CHECK_ALLOCS(1,EBUF_CHARS);
675 2 0 tmp = EMPTY;
676 2 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,4);
677 2 0 s = EMPTY;
678 2 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
680 10 0 SECTION("with custom buf") {
10 0 SECTION("with custom buf") {
10 0 SECTION("with custom buf") {
10 0 SECTION("with custom buf") {
2 8 SECTION("with custom buf") {
681 2 0 auto exp = mstr("4", 50);
682 2 0 String s = create_external<>(mstr("abcd"));
2 0 String s = create_external<>(mstr("abcd"));
684 2 0 assign_external_cbuf(s, exp);
2 0 assign_external_cbuf(s, exp);
685 2 0 REQUIRE_STR(s, exp);
2 0 REQUIRE_STR(s, exp);
686 2 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,4);
687 2 0 s = EMPTY;
688 2 0 CHECK_ALLOCS(0,0,0,0,0,0,1,50,1);
694 2 0 s.assign(2, (T)'a');
695 2 0 REQUIRE_STR(s, mstr("aa"), MAX_SSO_CHARS);
2 0 REQUIRE_STR(s, mstr("aa"), MAX_SSO_CHARS);
696 2 0 CHECK_ALLOCS();
697 2 0 s = String(cstr("a", 50));
2 0 s = String(cstr("a", 50));
2 0 s = String(cstr("a", 50));
699 2 0 s.assign(10, (T)'b');
700 2 0 REQUIRE_STR(s, mstr("bbbbbbbbbb"), 50);
2 0 REQUIRE_STR(s, mstr("bbbbbbbbbb"), 50);
701 2 0 CHECK_ALLOCS();
703 2 0 s = EMPTY;
709 2 0 s = (T)'A';
710 2 0 REQUIRE_STR(s, mstr("A"), MAX_SSO_CHARS);
2 0 REQUIRE_STR(s, mstr("A"), MAX_SSO_CHARS);
711 2 0 s = (T)'B';
712 2 0 REQUIRE_STR(s, mstr("B"), MAX_SSO_CHARS);
2 0 REQUIRE_STR(s, mstr("B"), MAX_SSO_CHARS);
717 5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
1 4 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
1 4 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
1 4 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
1 4 SECTION("literal<->literal") {
720 1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
721 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
722 1 0 REQUIRE_STR(src, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(src, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(src, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(src, LITERAL, LITERAL_LEN, 0);
723 1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
724 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
726 5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
1 4 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
1 4 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
1 4 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
1 4 SECTION("sso<->sso") {
727 1 0 auto exp = mstr("bu");
1 0 auto exp = mstr("bu");
1 0 auto exp = mstr("bu");
1 0 auto exp = mstr("bu");
728 1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
729 1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
730 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
731 1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
732 1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
733 1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(src, exp, MAX_SSO_CHARS);
734 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
735 1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
736 1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
737 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
739 5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
1 4 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
1 4 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
1 4 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
1 4 SECTION("internal<->internal") {
740 1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
741 1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
742 1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
744 1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
745 1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
746 1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
747 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
748 1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
749 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
750 1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
751 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
753 5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
1 4 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
1 4 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
1 4 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
1 4 SECTION("external<->external") {
754 1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
755 1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
756 1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
758 1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
759 1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
760 1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
1 0 REQUIRE_STR(src, exp, 0, exp.size());
761 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,30);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,30);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,30);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,30);
762 1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
763 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
764 1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
765 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
767 5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
1 4 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
1 4 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
1 4 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
1 4 SECTION("same object") {
768 1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
769 1 0 String s(exp.c_str());
1 0 String s(exp.c_str());
1 0 String s(exp.c_str());
1 0 String s(exp.c_str());
771 1 0 U::op(s, s);
1 0 U::op(s, s);
1 0 U::op(s, s);
1 0 U::op(s, s);
772 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
773 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
774 1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
775 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
781 2 0 SECTION("internal<->internal") {
2 0 SECTION("internal<->internal") {
2 0 SECTION("internal<->internal") {
2 0 SECTION("internal<->internal") {
1 1 SECTION("internal<->internal") {
2 0 SECTION("internal<->internal") {
2 0 SECTION("internal<->internal") {
2 0 SECTION("internal<->internal") {
2 0 SECTION("internal<->internal") {
1 1 SECTION("internal<->internal") {
782 1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
783 1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
784 1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
786 1 0 s.assign(src, 10, 30);
1 0 s.assign(src, 10, 30);
787 1 0 REQUIRE_STR(s, mstr("q", 30), 0, 40);
1 0 REQUIRE_STR(s, mstr("q", 30), 0, 40);
1 0 REQUIRE_STR(s, mstr("q", 30), 0, 40);
1 0 REQUIRE_STR(s, mstr("q", 30), 0, 40);
788 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
789 1 0 s = EMPTY;
1 0 s = EMPTY;
790 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
791 1 0 src = EMPTY;
1 0 src = EMPTY;
792 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
794 2 0 SECTION("same object") {
2 0 SECTION("same object") {
2 0 SECTION("same object") {
2 0 SECTION("same object") {
1 1 SECTION("same object") {
2 0 SECTION("same object") {
2 0 SECTION("same object") {
2 0 SECTION("same object") {
2 0 SECTION("same object") {
1 1 SECTION("same object") {
795 1 0 auto exp = mstr("x", 50);
1 0 auto exp = mstr("x", 50);
796 1 0 String s = create_external<>(exp);
1 0 String s = create_external<>(exp);
1 0 String s = create_external<>(exp);
1 0 String s = create_external<>(exp);
798 1 0 s.assign(s, 10, 30);
1 0 s.assign(s, 10, 30);
799 1 0 REQUIRE_STR(s, mstr("x", 30), 40);
1 0 REQUIRE_STR(s, mstr("x", 30), 40);
1 0 REQUIRE_STR(s, mstr("x", 30), 40);
1 0 REQUIRE_STR(s, mstr("x", 30), 40);
800 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
801 1 0 s = EMPTY;
1 0 s = EMPTY;
802 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
808 5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
1 4 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
1 4 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
1 4 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
5 0 SECTION("literal<->literal") {
1 4 SECTION("literal<->literal") {
811 1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
812 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
813 1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
814 1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
815 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
817 5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
1 4 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
1 4 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
1 4 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
5 0 SECTION("sso<->sso") {
1 4 SECTION("sso<->sso") {
818 1 0 auto exp = mstr("bu");
1 0 auto exp = mstr("bu");
1 0 auto exp = mstr("bu");
1 0 auto exp = mstr("bu");
819 1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
820 1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
1 0 String s(cstr("du"));
821 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
822 1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
823 1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
824 1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
825 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
826 1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
827 1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
828 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
830 5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
1 4 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
1 4 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
1 4 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
5 0 SECTION("internal<->internal") {
1 4 SECTION("internal<->internal") {
831 1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
832 1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
1 0 FString src(exp.c_str());
833 1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
1 0 String s(cstr("d", 30));
835 1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
836 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
837 1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
838 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
839 1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
840 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
841 1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
842 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
844 5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
1 4 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
1 4 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
1 4 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
5 0 SECTION("external<->external") {
1 4 SECTION("external<->external") {
845 1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
846 1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
1 0 FString src = create_external(exp);
847 1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
1 0 String s = create_external<>(mstr("d", 30));
849 1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
1 0 U::op(s, src);
850 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
851 1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
1 0 REQUIRE_STR(src, EMPTY);
852 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,30);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,30);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,30);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,30);
853 1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
854 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
855 1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
1 0 src = EMPTY;
856 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
858 5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
1 4 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
1 4 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
1 4 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
5 0 SECTION("same object") {
1 4 SECTION("same object") {
859 1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
1 0 auto exp = mstr("q", 50);
860 1 0 String s(exp.c_str());
1 0 String s(exp.c_str());
1 0 String s(exp.c_str());
1 0 String s(exp.c_str());
862 1 0 U::op(s, s);
1 0 U::op(s, s);
1 0 U::op(s, s);
1 0 U::op(s, s);
863 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
864 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
865 1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
1 0 s = EMPTY;
866 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+50);
872 53 0 SECTION("literal") {
53 0 SECTION("literal") {
53 0 SECTION("literal") {
53 0 SECTION("literal") {
10 43 SECTION("literal") {
53 0 SECTION("literal") {
53 0 SECTION("literal") {
53 0 SECTION("literal") {
53 0 SECTION("literal") {
10 43 SECTION("literal") {
873 10 0 SECTION("method") { test_assign_literal(); }
10 0 SECTION("method") { test_assign_literal(); }
10 0 SECTION("method") { test_assign_literal(); }
10 0 SECTION("method") { test_assign_literal(); }
5 5 SECTION("method") { test_assign_literal(); }
5 0 SECTION("method") { test_assign_literal(); }
10 0 SECTION("method") { test_assign_literal(); }
10 0 SECTION("method") { test_assign_literal(); }
10 0 SECTION("method") { test_assign_literal(); }
10 0 SECTION("method") { test_assign_literal(); }
5 5 SECTION("method") { test_assign_literal(); }
5 0 SECTION("method") { test_assign_literal(); }
874 10 0 SECTION("operator") { test_assign_literal(); }
10 0 SECTION("operator") { test_assign_literal(); }
10 0 SECTION("operator") { test_assign_literal(); }
10 0 SECTION("operator") { test_assign_literal(); }
5 5 SECTION("operator") { test_assign_literal(); }
5 0 SECTION("operator") { test_assign_literal(); }
10 0 SECTION("operator") { test_assign_literal(); }
10 0 SECTION("operator") { test_assign_literal(); }
10 0 SECTION("operator") { test_assign_literal(); }
10 0 SECTION("operator") { test_assign_literal(); }
5 5 SECTION("operator") { test_assign_literal(); }
5 0 SECTION("operator") { test_assign_literal(); }
876 53 0 SECTION("ptr") {
53 0 SECTION("ptr") {
53 0 SECTION("ptr") {
53 0 SECTION("ptr") {
14 39 SECTION("ptr") {
53 0 SECTION("ptr") {
53 0 SECTION("ptr") {
53 0 SECTION("ptr") {
53 0 SECTION("ptr") {
14 39 SECTION("ptr") {
877 14 0 SECTION("method") { test_assign_ptr(); }
14 0 SECTION("method") { test_assign_ptr(); }
14 0 SECTION("method") { test_assign_ptr(); }
14 0 SECTION("method") { test_assign_ptr(); }
7 7 SECTION("method") { test_assign_ptr(); }
7 0 SECTION("method") { test_assign_ptr(); }
14 0 SECTION("method") { test_assign_ptr(); }
14 0 SECTION("method") { test_assign_ptr(); }
14 0 SECTION("method") { test_assign_ptr(); }
14 0 SECTION("method") { test_assign_ptr(); }
7 7 SECTION("method") { test_assign_ptr(); }
7 0 SECTION("method") { test_assign_ptr(); }
878 14 0 SECTION("operator") { test_assign_ptr(); }
14 0 SECTION("operator") { test_assign_ptr(); }
14 0 SECTION("operator") { test_assign_ptr(); }
14 0 SECTION("operator") { test_assign_ptr(); }
7 7 SECTION("operator") { test_assign_ptr(); }
7 0 SECTION("operator") { test_assign_ptr(); }
14 0 SECTION("operator") { test_assign_ptr(); }
14 0 SECTION("operator") { test_assign_ptr(); }
14 0 SECTION("operator") { test_assign_ptr(); }
14 0 SECTION("operator") { test_assign_ptr(); }
7 7 SECTION("operator") { test_assign_ptr(); }
7 0 SECTION("operator") { test_assign_ptr(); }
880 53 0 SECTION("external") { test_assign_external(); }
53 0 SECTION("external") { test_assign_external(); }
53 0 SECTION("external") { test_assign_external(); }
53 0 SECTION("external") { test_assign_external(); }
5 48 SECTION("external") { test_assign_external(); }
5 0 SECTION("external") { test_assign_external(); }
53 0 SECTION("external") { test_assign_external(); }
53 0 SECTION("external") { test_assign_external(); }
53 0 SECTION("external") { test_assign_external(); }
53 0 SECTION("external") { test_assign_external(); }
5 48 SECTION("external") { test_assign_external(); }
5 0 SECTION("external") { test_assign_external(); }
881 53 0 SECTION("fill") { test_assign_fill(); }
53 0 SECTION("fill") { test_assign_fill(); }
53 0 SECTION("fill") { test_assign_fill(); }
53 0 SECTION("fill") { test_assign_fill(); }
1 52 SECTION("fill") { test_assign_fill(); }
1 0 SECTION("fill") { test_assign_fill(); }
53 0 SECTION("fill") { test_assign_fill(); }
53 0 SECTION("fill") { test_assign_fill(); }
53 0 SECTION("fill") { test_assign_fill(); }
53 0 SECTION("fill") { test_assign_fill(); }
1 52 SECTION("fill") { test_assign_fill(); }
1 0 SECTION("fill") { test_assign_fill(); }
882 53 0 SECTION("char") { test_assign_char(); }
53 0 SECTION("char") { test_assign_char(); }
53 0 SECTION("char") { test_assign_char(); }
53 0 SECTION("char") { test_assign_char(); }
1 52 SECTION("char") { test_assign_char(); }
1 0 SECTION("char") { test_assign_char(); }
53 0 SECTION("char") { test_assign_char(); }
53 0 SECTION("char") { test_assign_char(); }
53 0 SECTION("char") { test_assign_char(); }
53 0 SECTION("char") { test_assign_char(); }
1 52 SECTION("char") { test_assign_char(); }
1 0 SECTION("char") { test_assign_char(); }
883 53 0 SECTION("copy") {
53 0 SECTION("copy") {
53 0 SECTION("copy") {
53 0 SECTION("copy") {
10 43 SECTION("copy") {
53 0 SECTION("copy") {
53 0 SECTION("copy") {
53 0 SECTION("copy") {
53 0 SECTION("copy") {
10 43 SECTION("copy") {
884 10 0 SECTION("method") { test_assign_copy(); }
10 0 SECTION("method") { test_assign_copy(); }
10 0 SECTION("method") { test_assign_copy(); }
10 0 SECTION("method") { test_assign_copy(); }
5 5 SECTION("method") { test_assign_copy(); }
5 0 SECTION("method") { test_assign_copy(); }
10 0 SECTION("method") { test_assign_copy(); }
10 0 SECTION("method") { test_assign_copy(); }
10 0 SECTION("method") { test_assign_copy(); }
10 0 SECTION("method") { test_assign_copy(); }
5 5 SECTION("method") { test_assign_copy(); }
5 0 SECTION("method") { test_assign_copy(); }
885 10 0 SECTION("operator") { test_assign_copy(); }
10 0 SECTION("operator") { test_assign_copy(); }
10 0 SECTION("operator") { test_assign_copy(); }
10 0 SECTION("operator") { test_assign_copy(); }
5 5 SECTION("operator") { test_assign_copy(); }
5 0 SECTION("operator") { test_assign_copy(); }
10 0 SECTION("operator") { test_assign_copy(); }
10 0 SECTION("operator") { test_assign_copy(); }
10 0 SECTION("operator") { test_assign_copy(); }
10 0 SECTION("operator") { test_assign_copy(); }
5 5 SECTION("operator") { test_assign_copy(); }
5 0 SECTION("operator") { test_assign_copy(); }
887 53 0 SECTION("offset") { test_assign_offset(); }
53 0 SECTION("offset") { test_assign_offset(); }
53 0 SECTION("offset") { test_assign_offset(); }
53 0 SECTION("offset") { test_assign_offset(); }
2 51 SECTION("offset") { test_assign_offset(); }
2 0 SECTION("offset") { test_assign_offset(); }
53 0 SECTION("offset") { test_assign_offset(); }
53 0 SECTION("offset") { test_assign_offset(); }
53 0 SECTION("offset") { test_assign_offset(); }
53 0 SECTION("offset") { test_assign_offset(); }
2 51 SECTION("offset") { test_assign_offset(); }
2 0 SECTION("offset") { test_assign_offset(); }
888 53 0 SECTION("move") {
53 0 SECTION("move") {
53 0 SECTION("move") {
53 0 SECTION("move") {
10 43 SECTION("move") {
53 0 SECTION("move") {
53 0 SECTION("move") {
53 0 SECTION("move") {
53 0 SECTION("move") {
10 43 SECTION("move") {
889 10 0 SECTION("method") { test_assign_move(); }
10 0 SECTION("method") { test_assign_move(); }
10 0 SECTION("method") { test_assign_move(); }
10 0 SECTION("method") { test_assign_move(); }
5 5 SECTION("method") { test_assign_move(); }
5 0 SECTION("method") { test_assign_move(); }
10 0 SECTION("method") { test_assign_move(); }
10 0 SECTION("method") { test_assign_move(); }
10 0 SECTION("method") { test_assign_move(); }
10 0 SECTION("method") { test_assign_move(); }
5 5 SECTION("method") { test_assign_move(); }
5 0 SECTION("method") { test_assign_move(); }
890 10 0 SECTION("operator") { test_assign_move(); }
10 0 SECTION("operator") { test_assign_move(); }
10 0 SECTION("operator") { test_assign_move(); }
10 0 SECTION("operator") { test_assign_move(); }
5 5 SECTION("operator") { test_assign_move(); }
5 0 SECTION("operator") { test_assign_move(); }
10 0 SECTION("operator") { test_assign_move(); }
10 0 SECTION("operator") { test_assign_move(); }
10 0 SECTION("operator") { test_assign_move(); }
10 0 SECTION("operator") { test_assign_move(); }
5 5 SECTION("operator") { test_assign_move(); }
5 0 SECTION("operator") { test_assign_move(); }
895 6 0 SECTION("from literal") {
6 0 SECTION("from literal") {
6 0 SECTION("from literal") {
6 0 SECTION("from literal") {
1 5 SECTION("from literal") {
896 1 0 auto exp = StdString(LITERAL).substr(2, 25);
1 0 auto exp = StdString(LITERAL).substr(2, 25);
898 1 0 s.offset(2, 25);
899 1 0 REQUIRE_STR(s, exp, 0);
1 0 REQUIRE_STR(s, exp, 0);
900 1 0 s = EMPTY;
901 1 0 CHECK_ALLOCS();
903 6 0 SECTION("from sso") {
6 0 SECTION("from sso") {
6 0 SECTION("from sso") {
6 0 SECTION("from sso") {
1 5 SECTION("from sso") {
904 1 0 auto exp = mstr("bu");
905 1 0 String s(exp.c_str());
906 1 0 s.offset(1, 1);
907 1 0 REQUIRE_STR(s, mstr("u"), MAX_SSO_CHARS-1);
1 0 REQUIRE_STR(s, mstr("u"), MAX_SSO_CHARS-1);
908 1 0 s = EMPTY;
909 1 0 CHECK_ALLOCS();
911 6 0 SECTION("from internal") {
6 0 SECTION("from internal") {
6 0 SECTION("from internal") {
6 0 SECTION("from internal") {
1 5 SECTION("from internal") {
912 1 0 auto exp = mstr("bu", 50);
913 1 0 String s(exp.c_str());
914 1 0 s.offset(9, 5);
915 1 0 REQUIRE_STR(s, mstr("ububu"), 100-9);
1 0 REQUIRE_STR(s, mstr("ububu"), 100-9);
916 1 0 s = EMPTY;
918 1 0 CHECK_ALLOCS(1,sz,1,sz);
920 6 0 SECTION("from external") {
6 0 SECTION("from external") {
6 0 SECTION("from external") {
6 0 SECTION("from external") {
1 5 SECTION("from external") {
921 1 0 auto exp = mstr("c", 50);
922 1 0 String s = create_external<>(exp);
1 0 String s = create_external<>(exp);
923 1 0 s.offset(10, 30);
924 1 0 REQUIRE_STR(s, mstr("c", 30), exp.size()-10);
1 0 REQUIRE_STR(s, mstr("c", 30), exp.size()-10);
925 1 0 s = EMPTY;
926 1 0 CHECK_ALLOCS(1, EBUF_CHARS, 1, EBUF_CHARS, 0, 0, 1, exp.size());
928 6 0 SECTION("out of bounds") {
6 0 SECTION("out of bounds") {
6 0 SECTION("out of bounds") {
6 0 SECTION("out of bounds") {
2 4 SECTION("out of bounds") {
929 2 0 auto exp = mstr("hello");
930 2 0 String s(exp.c_str());
931 2 0 SECTION("too big length acts as npos") {
2 0 SECTION("too big length acts as npos") {
2 0 SECTION("too big length acts as npos") {
2 0 SECTION("too big length acts as npos") {
1 1 SECTION("too big length acts as npos") {
932 1 0 s.offset(3, 10);
933 1 0 REQUIRE_STRM(s, mstr("lo"));
1 0 REQUIRE_STRM(s, mstr("lo"));
935 2 0 SECTION("too big offset throws exception") {
2 0 SECTION("too big offset throws exception") {
2 0 SECTION("too big offset throws exception") {
2 0 SECTION("too big offset throws exception") {
1 1 SECTION("too big offset throws exception") {
936 1 0 REQUIRE_THROWS(s.offset(6,10));
1 0 REQUIRE_THROWS(s.offset(6,10));
1 0 REQUIRE_THROWS(s.offset(6,10));
0 1 REQUIRE_THROWS(s.offset(6,10));
0 0 REQUIRE_THROWS(s.offset(6,10));
0 0 REQUIRE_THROWS(s.offset(6,10));
1 0 REQUIRE_THROWS(s.offset(6,10));
1 0 REQUIRE_THROWS(s.offset(6,10));
1 0 REQUIRE_THROWS(s.offset(6,10));
943 10 0 SECTION("literal<->literal") {
10 0 SECTION("literal<->literal") {
10 0 SECTION("literal<->literal") {
10 0 SECTION("literal<->literal") {
1 9 SECTION("literal<->literal") {
10 0 SECTION("literal<->literal") {
10 0 SECTION("literal<->literal") {
10 0 SECTION("literal<->literal") {
10 0 SECTION("literal<->literal") {
1 9 SECTION("literal<->literal") {
947 1 0 REQUIRE_STR(s1, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s1, LITERAL, LITERAL_LEN, 0);
948 1 0 REQUIRE_STR(s2, EMPTY);
1 0 REQUIRE_STR(s2, EMPTY);
949 1 0 s1 = EMPTY; s2 = EMPTY;
1 0 s1 = EMPTY; s2 = EMPTY;
1 0 s1 = EMPTY; s2 = EMPTY;
1 0 s1 = EMPTY; s2 = EMPTY;
950 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
952 10 0 SECTION("literal<->sso") {
10 0 SECTION("literal<->sso") {
10 0 SECTION("literal<->sso") {
10 0 SECTION("literal<->sso") {
1 9 SECTION("literal<->sso") {
10 0 SECTION("literal<->sso") {
10 0 SECTION("literal<->sso") {
10 0 SECTION("literal<->sso") {
10 0 SECTION("literal<->sso") {
1 9 SECTION("literal<->sso") {
953 1 0 auto exp = mstr("eb");
1 0 auto exp = mstr("eb");
955 1 0 FString s2(exp.c_str());
1 0 FString s2(exp.c_str());
957 1 0 REQUIRE_STR(s1, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s1, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s1, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s1, exp, MAX_SSO_CHARS);
958 1 0 REQUIRE_STR(s2, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s2, LITERAL, LITERAL_LEN, 0);
959 1 0 s1 = EMPTY; s2 = EMPTY;
1 0 s1 = EMPTY; s2 = EMPTY;
1 0 s1 = EMPTY; s2 = EMPTY;
1 0 s1 = EMPTY; s2 = EMPTY;
960 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
962 10 0 SECTION("literal<->internal") {
10 0 SECTION("literal<->internal") {
10 0 SECTION("literal<->internal") {
10 0 SECTION("literal<->internal") {
1 9 SECTION("literal<->internal") {
10 0 SECTION("literal<->internal") {
10 0 SECTION("literal<->internal") {
10 0 SECTION("literal<->internal") {
10 0 SECTION("literal<->internal") {
1 9 SECTION("literal<->internal") {
963 1 0 auto exp = mstr("eb", 50);
1 0 auto exp = mstr("eb", 50);
965 1 0 FString s2(exp.c_str());
1 0 FString s2(exp.c_str());
968 1 0 REQUIRE_STR(s1, exp);
1 0 REQUIRE_STR(s1, exp);
1 0 REQUIRE_STR(s1, exp);
1 0 REQUIRE_STR(s1, exp);
969 1 0 REQUIRE_STR(s2, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s2, LITERAL, LITERAL_LEN, 0);
970 1 0 s2 = EMPTY;
1 0 s2 = EMPTY;
971 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
972 1 0 s1 = EMPTY;
1 0 s1 = EMPTY;
973 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp.size());
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp.size());
975 10 0 SECTION("literal<->external") {
10 0 SECTION("literal<->external") {
10 0 SECTION("literal<->external") {
10 0 SECTION("literal<->external") {
1 9 SECTION("literal<->external") {
10 0 SECTION("literal<->external") {
10 0 SECTION("literal<->external") {
10 0 SECTION("literal<->external") {
10 0 SECTION("literal<->external") {
1 9 SECTION("literal<->external") {
976 1 0 auto exp = mstr("be", 50);
1 0 auto exp = mstr("be", 50);
978 1 0 FString s2 = create_external(exp);
1 0 FString s2 = create_external(exp);
1 0 FString s2 = create_external(exp);
1 0 FString s2 = create_external(exp);
981 1 0 REQUIRE_STR(s1, exp);
1 0 REQUIRE_STR(s1, exp);
1 0 REQUIRE_STR(s1, exp);
1 0 REQUIRE_STR(s1, exp);
982 1 0 REQUIRE_STR(s2, LITERAL, LITERAL_LEN, 0);
1 0 REQUIRE_STR(s2, LITERAL, LITERAL_LEN, 0);
983 1 0 s2 = EMPTY;
1 0 s2 = EMPTY;
984 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
985 1 0 s1 = EMPTY;
1 0 s1 = EMPTY;
986 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp.size());
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp.size());
988 10 0 SECTION("sso<->sso") {
10 0 SECTION("sso<->sso") {
10 0 SECTION("sso<->sso") {
10 0 SECTION("sso<->sso") {
1 9 SECTION("sso<->sso") {
10 0 SECTION("sso<->sso") {
10 0 SECTION("sso<->sso") {
10 0 SECTION("sso<->sso") {
10 0 SECTION("sso<->sso") {
1 9 SECTION("sso<->sso") {
989 1 0 auto exp1 = mstr("eb");
1 0 auto exp1 = mstr("eb");
990 1 0 auto exp2 = mstr("ta");
1 0 auto exp2 = mstr("ta");
991 1 0 String s1(exp1.c_str());
1 0 String s1(exp1.c_str());
992 1 0 FString s2(exp2.c_str());
1 0 FString s2(exp2.c_str());
994 1 0 REQUIRE_STR(s1, exp2, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s1, exp2, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s1, exp2, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s1, exp2, MAX_SSO_CHARS);
995 1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
996 1 0 s1 = EMPTY; s2 = EMPTY;
1 0 s1 = EMPTY; s2 = EMPTY;
1 0 s1 = EMPTY; s2 = EMPTY;
1 0 s1 = EMPTY; s2 = EMPTY;
997 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
999 10 0 SECTION("sso<->internal") {
10 0 SECTION("sso<->internal") {
10 0 SECTION("sso<->internal") {
10 0 SECTION("sso<->internal") {
1 9 SECTION("sso<->internal") {
10 0 SECTION("sso<->internal") {
10 0 SECTION("sso<->internal") {
10 0 SECTION("sso<->internal") {
10 0 SECTION("sso<->internal") {
1 9 SECTION("sso<->internal") {
1000 1 0 auto exp1 = mstr("eb");
1 0 auto exp1 = mstr("eb");
1001 1 0 auto exp2 = mstr("ta", 50);
1 0 auto exp2 = mstr("ta", 50);
1002 1 0 String s1(exp1.c_str());
1 0 String s1(exp1.c_str());
1003 1 0 FString s2(exp2.c_str());
1 0 FString s2(exp2.c_str());
1006 1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1007 1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1008 1 0 s2 = EMPTY;
1 0 s2 = EMPTY;
1009 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1010 1 0 s1 = EMPTY;
1 0 s1 = EMPTY;
1011 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp2.size());
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp2.size());
1013 10 0 SECTION("sso<->external") {
10 0 SECTION("sso<->external") {
10 0 SECTION("sso<->external") {
10 0 SECTION("sso<->external") {
1 9 SECTION("sso<->external") {
10 0 SECTION("sso<->external") {
10 0 SECTION("sso<->external") {
10 0 SECTION("sso<->external") {
10 0 SECTION("sso<->external") {
1 9 SECTION("sso<->external") {
1014 1 0 auto exp1 = mstr("eb");
1 0 auto exp1 = mstr("eb");
1015 1 0 auto exp2 = mstr("ta", 50);
1 0 auto exp2 = mstr("ta", 50);
1016 1 0 String s1(exp1.c_str());
1 0 String s1(exp1.c_str());
1017 1 0 FString s2 = create_external(exp2);
1 0 FString s2 = create_external(exp2);
1 0 FString s2 = create_external(exp2);
1 0 FString s2 = create_external(exp2);
1020 1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1021 1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s2, exp1, MAX_SSO_CHARS);
1022 1 0 s2 = EMPTY;
1 0 s2 = EMPTY;
1023 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1024 1 0 s1 = EMPTY;
1 0 s1 = EMPTY;
1025 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp2.size());
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp2.size());
1027 10 0 SECTION("internal<->internal") {
10 0 SECTION("internal<->internal") {
10 0 SECTION("internal<->internal") {
10 0 SECTION("internal<->internal") {
1 9 SECTION("internal<->internal") {
10 0 SECTION("internal<->internal") {
10 0 SECTION("internal<->internal") {
10 0 SECTION("internal<->internal") {
10 0 SECTION("internal<->internal") {
1 9 SECTION("internal<->internal") {
1028 1 0 auto exp1 = mstr("eb", 100);
1 0 auto exp1 = mstr("eb", 100);
1029 1 0 auto exp2 = mstr("ta", 50);
1 0 auto exp2 = mstr("ta", 50);
1030 1 0 String s1(exp1.c_str());
1 0 String s1(exp1.c_str());
1031 1 0 FString s2(exp2.c_str());
1 0 FString s2(exp2.c_str());
1032 1 0 CHECK_ALLOCS(2, BUF_CHARS*2 + exp1.size() + exp2.size());
1 0 CHECK_ALLOCS(2, BUF_CHARS*2 + exp1.size() + exp2.size());
1034 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1035 1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1036 1 0 REQUIRE_STR(s2, exp1);
1 0 REQUIRE_STR(s2, exp1);
1 0 REQUIRE_STR(s2, exp1);
1 0 REQUIRE_STR(s2, exp1);
1037 1 0 s1 = EMPTY;
1 0 s1 = EMPTY;
1038 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp2.size());
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp2.size());
1039 1 0 s2 = EMPTY;
1 0 s2 = EMPTY;
1040 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp1.size());
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp1.size());
1042 10 0 SECTION("internal<->external") {
10 0 SECTION("internal<->external") {
10 0 SECTION("internal<->external") {
10 0 SECTION("internal<->external") {
1 9 SECTION("internal<->external") {
10 0 SECTION("internal<->external") {
10 0 SECTION("internal<->external") {
10 0 SECTION("internal<->external") {
10 0 SECTION("internal<->external") {
1 9 SECTION("internal<->external") {
1043 1 0 auto exp1 = mstr("eb", 100);
1 0 auto exp1 = mstr("eb", 100);
1044 1 0 auto exp2 = mstr("ta", 50);
1 0 auto exp2 = mstr("ta", 50);
1045 1 0 String s1(exp1.c_str());
1 0 String s1(exp1.c_str());
1046 1 0 FString s2 = create_external(exp2);
1 0 FString s2 = create_external(exp2);
1 0 FString s2 = create_external(exp2);
1 0 FString s2 = create_external(exp2);
1047 1 0 CHECK_ALLOCS(2, EBUF_CHARS + BUF_CHARS + exp1.size());
1 0 CHECK_ALLOCS(2, EBUF_CHARS + BUF_CHARS + exp1.size());
1049 1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1050 1 0 REQUIRE_STR(s2, exp1);
1 0 REQUIRE_STR(s2, exp1);
1 0 REQUIRE_STR(s2, exp1);
1 0 REQUIRE_STR(s2, exp1);
1051 1 0 s1 = EMPTY;
1 0 s1 = EMPTY;
1052 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp2.size());
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp2.size());
1053 1 0 s2 = EMPTY;
1 0 s2 = EMPTY;
1054 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp1.size());
1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp1.size());
1056 10 0 SECTION("external<->external") {
10 0 SECTION("external<->external") {
10 0 SECTION("external<->external") {
10 0 SECTION("external<->external") {
1 9 SECTION("external<->external") {
10 0 SECTION("external<->external") {
10 0 SECTION("external<->external") {
10 0 SECTION("external<->external") {
10 0 SECTION("external<->external") {
1 9 SECTION("external<->external") {
1057 1 0 auto exp1 = mstr("eb", 100);
1 0 auto exp1 = mstr("eb", 100);
1058 1 0 auto exp2 = mstr("ta", 50);
1 0 auto exp2 = mstr("ta", 50);
1059 1 0 String s1 = create_external<>(exp1);
1 0 String s1 = create_external<>(exp1);
1 0 String s1 = create_external<>(exp1);
1 0 String s1 = create_external<>(exp1);
1060 1 0 FString s2 = create_external(exp2);
1 0 FString s2 = create_external(exp2);
1 0 FString s2 = create_external(exp2);
1 0 FString s2 = create_external(exp2);
1061 1 0 CHECK_ALLOCS(2, EBUF_CHARS*2);
1 0 CHECK_ALLOCS(2, EBUF_CHARS*2);
1063 1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1 0 REQUIRE_STR(s1, exp2);
1064 1 0 REQUIRE_STR(s2, exp1);
1 0 REQUIRE_STR(s2, exp1);
1 0 REQUIRE_STR(s2, exp1);
1 0 REQUIRE_STR(s2, exp1);
1065 1 0 s1 = EMPTY;
1 0 s1 = EMPTY;
1066 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp2.size());
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp2.size());
1067 1 0 s2 = EMPTY;
1 0 s2 = EMPTY;
1068 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp1.size());
1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp1.size());
1073 1 0 String s(cstr("the password for my bank account is w74mnds320ft but i won't tell you the login)"));
1 0 String s(cstr("the password for my bank account is w74mnds320ft but i won't tell you the login)"));
1077 1 0 cnt = s.copy(t, 0);
1078 1 0 REQUIRE(cnt == 0);
1 0 REQUIRE(cnt == 0);
1 0 REQUIRE(cnt == 0);
1 0 REQUIRE(cnt == 0);
1 0 REQUIRE(cnt == 0);
0 0 REQUIRE(cnt == 0);
0 0 REQUIRE(cnt == 0);
1080 1 0 cnt = s.copy(t, 10);
1081 1 0 REQUIRE(cnt == 10);
1 0 REQUIRE(cnt == 10);
1 0 REQUIRE(cnt == 10);
1 0 REQUIRE(cnt == 10);
1 0 REQUIRE(cnt == 10);
0 0 REQUIRE(cnt == 10);
0 0 REQUIRE(cnt == 10);
1082 1 0 REQUIRE_STRM(String(t, cnt), mstr("the passwo"));
1 0 REQUIRE_STRM(String(t, cnt), mstr("the passwo"));
1 0 REQUIRE_STRM(String(t, cnt), mstr("the passwo"));
1084 1 0 cnt = s.copy(t, 20, 15);
1085 1 0 REQUIRE(cnt == 20);
1 0 REQUIRE(cnt == 20);
1 0 REQUIRE(cnt == 20);
1 0 REQUIRE(cnt == 20);
1 0 REQUIRE(cnt == 20);
0 0 REQUIRE(cnt == 20);
0 0 REQUIRE(cnt == 20);
1086 1 0 REQUIRE_STRM(String(t, cnt), mstr("r my bank account is"));
1 0 REQUIRE_STRM(String(t, cnt), mstr("r my bank account is"));
1 0 REQUIRE_STRM(String(t, cnt), mstr("r my bank account is"));
1088 1 0 cnt = s.copy(t, 20, 70); //too much count
1089 1 0 REQUIRE(cnt == 10);
1 0 REQUIRE(cnt == 10);
1 0 REQUIRE(cnt == 10);
1 0 REQUIRE(cnt == 10);
1 0 REQUIRE(cnt == 10);
0 0 REQUIRE(cnt == 10);
0 0 REQUIRE(cnt == 10);
1090 1 0 REQUIRE_STRM(String(t, cnt), mstr("the login)"));
1 0 REQUIRE_STRM(String(t, cnt), mstr("the login)"));
1 0 REQUIRE_STRM(String(t, cnt), mstr("the login)"));
1092 1 0 cnt = s.copy(t, String::npos, 60); //count=npos
1093 1 0 REQUIRE(cnt == 20);
1 0 REQUIRE(cnt == 20);
1 0 REQUIRE(cnt == 20);
1 0 REQUIRE(cnt == 20);
1 0 REQUIRE(cnt == 20);
0 0 REQUIRE(cnt == 20);
0 0 REQUIRE(cnt == 20);
1094 1 0 REQUIRE_STRM(String(t, cnt), mstr(" tell you the login)"));
1 0 REQUIRE_STRM(String(t, cnt), mstr(" tell you the login)"));
1 0 REQUIRE_STRM(String(t, cnt), mstr(" tell you the login)"));
1096 1 0 REQUIRE_THROWS(s.copy(t, 10, 90)); //too much offset
1 0 REQUIRE_THROWS(s.copy(t, 10, 90)); //too much offset
1 0 REQUIRE_THROWS(s.copy(t, 10, 90)); //too much offset
0 1 REQUIRE_THROWS(s.copy(t, 10, 90)); //too much offset
0 0 REQUIRE_THROWS(s.copy(t, 10, 90)); //too much offset
0 0 REQUIRE_THROWS(s.copy(t, 10, 90)); //too much offset
1 0 REQUIRE_THROWS(s.copy(t, 10, 90)); //too much offset
1 0 REQUIRE_THROWS(s.copy(t, 10, 90)); //too much offset
1 0 REQUIRE_THROWS(s.copy(t, 10, 90)); //too much offset
1101 1 0 REQUIRE(s.empty());
1 0 REQUIRE(s.empty());
1 0 REQUIRE(s.empty());
1 0 REQUIRE(s.empty());
0 0 REQUIRE(s.empty());
0 0 REQUIRE(s.empty());
1102 1 0 REQUIRE(!s);
1 0 REQUIRE(!s);
1 0 REQUIRE(!s);
1 0 REQUIRE(!s);
0 0 REQUIRE(!s);
0 0 REQUIRE(!s);
1103 1 0 s = 'a';
1104 1 0 REQUIRE(!s.empty());
1 0 REQUIRE(!s.empty());
1 0 REQUIRE(!s.empty());
1 0 REQUIRE(!s.empty());
0 0 REQUIRE(!s.empty());
0 0 REQUIRE(!s.empty());
1105 1 0 REQUIRE(s);
1 0 REQUIRE(s);
1 0 REQUIRE(s);
1 0 REQUIRE(s);
0 0 REQUIRE(s);
0 0 REQUIRE(s);
1110 1 0 String s2(s1);
1111 1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
0 0 REQUIRE(s1.use_count() == 1);
0 0 REQUIRE(s1.use_count() == 1);
1112 1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
0 0 REQUIRE(s2.use_count() == 1);
0 0 REQUIRE(s2.use_count() == 1);
1114 1 0 s1 = cstr("ab");
1 0 s1 = cstr("ab");
1115 1 0 s2 = s1;
1116 1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
0 0 REQUIRE(s1.use_count() == 1);
0 0 REQUIRE(s1.use_count() == 1);
1117 1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
0 0 REQUIRE(s2.use_count() == 1);
0 0 REQUIRE(s2.use_count() == 1);
1119 1 0 s1 = cstr("a", 50);
1 0 s1 = cstr("a", 50);
1120 1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
0 0 REQUIRE(s1.use_count() == 1);
0 0 REQUIRE(s1.use_count() == 1);
1121 1 0 s2 = s1;
1122 1 0 REQUIRE(s1.use_count() == 2);
1 0 REQUIRE(s1.use_count() == 2);
1 0 REQUIRE(s1.use_count() == 2);
1 0 REQUIRE(s1.use_count() == 2);
1 0 REQUIRE(s1.use_count() == 2);
0 0 REQUIRE(s1.use_count() == 2);
0 0 REQUIRE(s1.use_count() == 2);
1123 1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
0 0 REQUIRE(s2.use_count() == 2);
0 0 REQUIRE(s2.use_count() == 2);
1125 1 0 s1 = create_external<>(mstr("b", 50));
1 0 s1 = create_external<>(mstr("b", 50));
1 0 s1 = create_external<>(mstr("b", 50));
1126 1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
1 0 REQUIRE(s1.use_count() == 1);
0 0 REQUIRE(s1.use_count() == 1);
0 0 REQUIRE(s1.use_count() == 1);
1127 1 0 s2 = s1;
1128 1 0 REQUIRE(s1.use_count() == 2);
1 0 REQUIRE(s1.use_count() == 2);
1 0 REQUIRE(s1.use_count() == 2);
1 0 REQUIRE(s1.use_count() == 2);
1 0 REQUIRE(s1.use_count() == 2);
0 0 REQUIRE(s1.use_count() == 2);
0 0 REQUIRE(s1.use_count() == 2);
1129 1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
0 0 REQUIRE(s2.use_count() == 2);
0 0 REQUIRE(s2.use_count() == 2);
1134 4 0 SECTION("literal") {
4 0 SECTION("literal") {
4 0 SECTION("literal") {
4 0 SECTION("literal") {
1 3 SECTION("literal") {
1136 1 0 s.buf();
1137 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, LITERAL_LEN);
1138 1 0 CHECK_ALLOCS(1, BUF_CHARS + LITERAL_LEN);
1140 4 0 SECTION("sso") {
4 0 SECTION("sso") {
4 0 SECTION("sso") {
4 0 SECTION("sso") {
1 3 SECTION("sso") {
1141 1 0 String s(cstr("ab"));
1 0 String s(cstr("ab"));
1142 1 0 s.buf();
1143 1 0 CHECK_ALLOCS();
1144 1 0 REQUIRE_STR(s, mstr("ab"), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, mstr("ab"), MAX_SSO_CHARS);
1146 4 0 SECTION("internal") {
4 0 SECTION("internal") {
4 0 SECTION("internal") {
4 0 SECTION("internal") {
1 3 SECTION("internal") {
1147 1 0 auto exp = mstr("q", 50);
1148 1 0 String s(exp.c_str());
1150 1 0 s.buf();
1151 1 0 CHECK_ALLOCS();
1152 1 0 String s2(s);
1153 1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
0 0 REQUIRE(s.use_count() == 2);
0 0 REQUIRE(s.use_count() == 2);
1154 1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
0 0 REQUIRE(s2.use_count() == 2);
0 0 REQUIRE(s2.use_count() == 2);
1155 1 0 s.buf();
1156 1 0 CHECK_ALLOCS(1, BUF_CHARS + exp.size()); //cow - detached
1157 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1158 1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
1159 1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
0 0 REQUIRE(s2.use_count() == 1);
0 0 REQUIRE(s2.use_count() == 1);
1161 4 0 SECTION("external") {
4 0 SECTION("external") {
4 0 SECTION("external") {
4 0 SECTION("external") {
1 3 SECTION("external") {
1162 1 0 auto exp = mstr("q", 50);
1163 1 0 String s = create_external<>(exp);
1 0 String s = create_external<>(exp);
1165 1 0 s.buf();
1166 1 0 CHECK_ALLOCS();
1167 1 0 String s2(s);
1168 1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
0 0 REQUIRE(s.use_count() == 2);
0 0 REQUIRE(s.use_count() == 2);
1169 1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
1 0 REQUIRE(s2.use_count() == 2);
0 0 REQUIRE(s2.use_count() == 2);
0 0 REQUIRE(s2.use_count() == 2);
1170 1 0 s.buf();
1171 1 0 CHECK_ALLOCS(1, BUF_CHARS + exp.size()); //cow - detached
1172 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1173 1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
1174 1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
1 0 REQUIRE(s2.use_count() == 1);
0 0 REQUIRE(s2.use_count() == 1);
0 0 REQUIRE(s2.use_count() == 1);
1179 5 0 String s(cstr("0123456789", 5));
5 0 String s(cstr("0123456789", 5));
1180 5 0 String tmp(s);
1183 5 0 SECTION("front") {
5 0 SECTION("front") {
5 0 SECTION("front") {
5 0 SECTION("front") {
1 4 SECTION("front") {
1184 1 0 REQUIRE(s.front() == (T)'0');
1 0 REQUIRE(s.front() == (T)'0');
1 0 REQUIRE(s.front() == (T)'0');
1 0 REQUIRE(s.front() == (T)'0');
1 0 REQUIRE(s.front() == (T)'0');
1 0 REQUIRE(s.front() == (T)'0');
0 0 REQUIRE(s.front() == (T)'0');
0 0 REQUIRE(s.front() == (T)'0');
1185 1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
0 0 REQUIRE(s.use_count() == 2); // not detached
0 0 REQUIRE(s.use_count() == 2); // not detached
1186 1 0 s.front() = (T)'9';
1 0 s.front() = (T)'9';
1187 1 0 REQUIRE_STRM(String(s, 0, 10), mstr("9123456789"));
1 0 REQUIRE_STRM(String(s, 0, 10), mstr("9123456789"));
1 0 REQUIRE_STRM(String(s, 0, 10), mstr("9123456789"));
1188 1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
0 0 REQUIRE(s.use_count() == 1); //string detached
0 0 REQUIRE(s.use_count() == 1); //string detached
1191 5 0 SECTION("at") {
5 0 SECTION("at") {
5 0 SECTION("at") {
5 0 SECTION("at") {
1 4 SECTION("at") {
1192 1 0 REQUIRE(s.at(1) == (T)'1');
1 0 REQUIRE(s.at(1) == (T)'1');
1 0 REQUIRE(s.at(1) == (T)'1');
1 0 REQUIRE(s.at(1) == (T)'1');
1 0 REQUIRE(s.at(1) == (T)'1');
1 0 REQUIRE(s.at(1) == (T)'1');
0 0 REQUIRE(s.at(1) == (T)'1');
0 0 REQUIRE(s.at(1) == (T)'1');
1193 1 0 REQUIRE(s.at(2) == (T)'2');
1 0 REQUIRE(s.at(2) == (T)'2');
1 0 REQUIRE(s.at(2) == (T)'2');
1 0 REQUIRE(s.at(2) == (T)'2');
1 0 REQUIRE(s.at(2) == (T)'2');
1 0 REQUIRE(s.at(2) == (T)'2');
0 0 REQUIRE(s.at(2) == (T)'2');
0 0 REQUIRE(s.at(2) == (T)'2');
1194 1 0 REQUIRE_THROWS(s.at(1000));
1 0 REQUIRE_THROWS(s.at(1000));
1 0 REQUIRE_THROWS(s.at(1000));
0 1 REQUIRE_THROWS(s.at(1000));
0 0 REQUIRE_THROWS(s.at(1000));
0 0 REQUIRE_THROWS(s.at(1000));
1 0 REQUIRE_THROWS(s.at(1000));
1 0 REQUIRE_THROWS(s.at(1000));
1 0 REQUIRE_THROWS(s.at(1000));
1195 1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
0 0 REQUIRE(s.use_count() == 2); // not detached
0 0 REQUIRE(s.use_count() == 2); // not detached
1196 1 0 s.at(1) = (T)'8';
1 0 s.at(1) = (T)'8';
1197 1 0 REQUIRE_STRM(String(s, 0, 10), mstr("0823456789"));
1 0 REQUIRE_STRM(String(s, 0, 10), mstr("0823456789"));
1 0 REQUIRE_STRM(String(s, 0, 10), mstr("0823456789"));
1198 1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
0 0 REQUIRE(s.use_count() == 1); //string detached
0 0 REQUIRE(s.use_count() == 1); //string detached
1199 1 0 s.at(0) = s.at(1);
1 0 s.at(0) = s.at(1);
1 0 s.at(0) = s.at(1);
1200 1 0 REQUIRE_STRM(String(s, 0, 10), mstr("8823456789"));
1 0 REQUIRE_STRM(String(s, 0, 10), mstr("8823456789"));
1 0 REQUIRE_STRM(String(s, 0, 10), mstr("8823456789"));
1203 5 0 SECTION("op[]") {
5 0 SECTION("op[]") {
5 0 SECTION("op[]") {
5 0 SECTION("op[]") {
1 4 SECTION("op[]") {
1204 1 0 REQUIRE(s[3] == (T)'3');
1 0 REQUIRE(s[3] == (T)'3');
1 0 REQUIRE(s[3] == (T)'3');
1 0 REQUIRE(s[3] == (T)'3');
1 0 REQUIRE(s[3] == (T)'3');
1 0 REQUIRE(s[3] == (T)'3');
0 0 REQUIRE(s[3] == (T)'3');
0 0 REQUIRE(s[3] == (T)'3');
1205 1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
0 0 REQUIRE(s.use_count() == 2); // not detached
0 0 REQUIRE(s.use_count() == 2); // not detached
1206 1 0 s[2] = (T)'7';
1 0 s[2] = (T)'7';
1207 1 0 REQUIRE_STRM(String(s, 0, 10), mstr("0173456789"));
1 0 REQUIRE_STRM(String(s, 0, 10), mstr("0173456789"));
1 0 REQUIRE_STRM(String(s, 0, 10), mstr("0173456789"));
1208 1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
0 0 REQUIRE(s.use_count() == 1); //string detached
0 0 REQUIRE(s.use_count() == 1); //string detached
1211 5 0 SECTION("back") {
5 0 SECTION("back") {
5 0 SECTION("back") {
5 0 SECTION("back") {
1 4 SECTION("back") {
1212 1 0 REQUIRE(s.back() == (T)'9');
1 0 REQUIRE(s.back() == (T)'9');
1 0 REQUIRE(s.back() == (T)'9');
1 0 REQUIRE(s.back() == (T)'9');
1 0 REQUIRE(s.back() == (T)'9');
1 0 REQUIRE(s.back() == (T)'9');
0 0 REQUIRE(s.back() == (T)'9');
0 0 REQUIRE(s.back() == (T)'9');
1213 1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
0 0 REQUIRE(s.use_count() == 2); // not detached
0 0 REQUIRE(s.use_count() == 2); // not detached
1214 1 0 s.back() = (T)'0';
1 0 s.back() = (T)'0';
1215 1 0 REQUIRE_STRM(String(s, 40, 10), mstr("0123456780"));
1 0 REQUIRE_STRM(String(s, 40, 10), mstr("0123456780"));
1 0 REQUIRE_STRM(String(s, 40, 10), mstr("0123456780"));
1216 1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
1 0 REQUIRE(s.use_count() == 1); //string detached
0 0 REQUIRE(s.use_count() == 1); //string detached
0 0 REQUIRE(s.use_count() == 1); //string detached
1219 5 0 SECTION("pop_back") {
5 0 SECTION("pop_back") {
5 0 SECTION("pop_back") {
5 0 SECTION("pop_back") {
1 4 SECTION("pop_back") {
1220 1 0 auto exp = StdString(LITERAL).substr(0, LITERAL_LEN-1);
1 0 auto exp = StdString(LITERAL).substr(0, LITERAL_LEN-1);
1223 1 0 REQUIRE_STR(s, exp, 0);
1 0 REQUIRE_STR(s, exp, 0);
1224 1 0 s = EMPTY;
1225 1 0 CHECK_ALLOCS();
1230 7 0 String s(cstr("0123456789", 5));
7 0 String s(cstr("0123456789", 5));
1231 7 0 String tmp(s);
1234 7 0 SECTION("begin + mutations") {
7 0 SECTION("begin + mutations") {
7 0 SECTION("begin + mutations") {
7 0 SECTION("begin + mutations") {
1 6 SECTION("begin + mutations") {
1235 1 0 auto it = s.begin();
1236 1 0 REQUIRE(*it++ == (T)'0');
1 0 REQUIRE(*it++ == (T)'0');
1 0 REQUIRE(*it++ == (T)'0');
1 0 REQUIRE(*it++ == (T)'0');
1 0 REQUIRE(*it++ == (T)'0');
1 0 REQUIRE(*it++ == (T)'0');
1 0 REQUIRE(*it++ == (T)'0');
0 0 REQUIRE(*it++ == (T)'0');
0 0 REQUIRE(*it++ == (T)'0');
1237 1 0 REQUIRE(*it++ == (T)'1');
1 0 REQUIRE(*it++ == (T)'1');
1 0 REQUIRE(*it++ == (T)'1');
1 0 REQUIRE(*it++ == (T)'1');
1 0 REQUIRE(*it++ == (T)'1');
1 0 REQUIRE(*it++ == (T)'1');
1 0 REQUIRE(*it++ == (T)'1');
0 0 REQUIRE(*it++ == (T)'1');
0 0 REQUIRE(*it++ == (T)'1');
1238 1 0 REQUIRE(*(it += 2) == (T)'4');
1 0 REQUIRE(*(it += 2) == (T)'4');
1 0 REQUIRE(*(it += 2) == (T)'4');
1 0 REQUIRE(*(it += 2) == (T)'4');
1 0 REQUIRE(*(it += 2) == (T)'4');
1 0 REQUIRE(*(it += 2) == (T)'4');
0 0 REQUIRE(*(it += 2) == (T)'4');
0 0 REQUIRE(*(it += 2) == (T)'4');
1239 1 0 REQUIRE(*(it -= 1) == (T)'3');
1 0 REQUIRE(*(it -= 1) == (T)'3');
1 0 REQUIRE(*(it -= 1) == (T)'3');
1 0 REQUIRE(*(it -= 1) == (T)'3');
1 0 REQUIRE(*(it -= 1) == (T)'3');
1 0 REQUIRE(*(it -= 1) == (T)'3');
0 0 REQUIRE(*(it -= 1) == (T)'3');
0 0 REQUIRE(*(it -= 1) == (T)'3');
1241 1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
1 0 REQUIRE(s.use_count() == 2); // not detached
0 0 REQUIRE(s.use_count() == 2); // not detached
0 0 REQUIRE(s.use_count() == 2); // not detached
1242 1 0 *it = (T)'x';
1 0 *it = (T)'x';
1243 1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
1244 1 0 REQUIRE_STRM(String(s, 0, 10), mstr("012x456789"));
1 0 REQUIRE_STRM(String(s, 0, 10), mstr("012x456789"));
1 0 REQUIRE_STRM(String(s, 0, 10), mstr("012x456789"));
1246 7 0 SECTION("end") {
7 0 SECTION("end") {
7 0 SECTION("end") {
7 0 SECTION("end") {
1 6 SECTION("end") {
1247 1 0 auto it = s.end();
1248 1 0 REQUIRE(*(--it) == (T)'9');
1 0 REQUIRE(*(--it) == (T)'9');
1 0 REQUIRE(*(--it) == (T)'9');
1 0 REQUIRE(*(--it) == (T)'9');
1 0 REQUIRE(*(--it) == (T)'9');
1 0 REQUIRE(*(--it) == (T)'9');
0 0 REQUIRE(*(--it) == (T)'9');
0 0 REQUIRE(*(--it) == (T)'9');
1249 1 0 REQUIRE(*(--it) == (T)'8');
1 0 REQUIRE(*(--it) == (T)'8');
1 0 REQUIRE(*(--it) == (T)'8');
1 0 REQUIRE(*(--it) == (T)'8');
1 0 REQUIRE(*(--it) == (T)'8');
1 0 REQUIRE(*(--it) == (T)'8');
0 0 REQUIRE(*(--it) == (T)'8');
0 0 REQUIRE(*(--it) == (T)'8');
1250 1 0 std::advance(it, -2);
1251 1 0 REQUIRE(*it == (T)'6');
1 0 REQUIRE(*it == (T)'6');
1 0 REQUIRE(*it == (T)'6');
1 0 REQUIRE(*it == (T)'6');
1 0 REQUIRE(*it == (T)'6');
1 0 REQUIRE(*it == (T)'6');
0 0 REQUIRE(*it == (T)'6');
0 0 REQUIRE(*it == (T)'6');
1254 7 0 SECTION("diffence & eq & ne") {
7 0 SECTION("diffence & eq & ne") {
7 0 SECTION("diffence & eq & ne") {
7 0 SECTION("diffence & eq & ne") {
1 6 SECTION("diffence & eq & ne") {
1255 1 0 auto b = s.begin();
1256 1 0 auto e = s.end();
1257 1 0 REQUIRE(b == b);
1 0 REQUIRE(b == b);
1 0 REQUIRE(b == b);
1 0 REQUIRE(b == b);
1 0 REQUIRE(b == b);
0 0 REQUIRE(b == b);
0 0 REQUIRE(b == b);
1258 1 0 REQUIRE(e == e);
1 0 REQUIRE(e == e);
1 0 REQUIRE(e == e);
1 0 REQUIRE(e == e);
1 0 REQUIRE(e == e);
0 0 REQUIRE(e == e);
0 0 REQUIRE(e == e);
1259 1 0 REQUIRE(b != e);
1 0 REQUIRE(b != e);
1 0 REQUIRE(b != e);
1 0 REQUIRE(b != e);
1 0 REQUIRE(b != e);
0 0 REQUIRE(b != e);
0 0 REQUIRE(b != e);
1260 1 0 REQUIRE(size_t(e - b) == s.length());
1 0 REQUIRE(size_t(e - b) == s.length());
1 0 REQUIRE(size_t(e - b) == s.length());
1 0 REQUIRE(size_t(e - b) == s.length());
1 0 REQUIRE(size_t(e - b) == s.length());
0 0 REQUIRE(size_t(e - b) == s.length());
0 0 REQUIRE(size_t(e - b) == s.length());
1263 7 0 SECTION("ordening relations") {
7 0 SECTION("ordening relations") {
7 0 SECTION("ordening relations") {
7 0 SECTION("ordening relations") {
1 6 SECTION("ordening relations") {
1264 1 0 auto b = s.begin();
1265 1 0 auto e = s.end();
1266 1 0 REQUIRE(b >= b);
1 0 REQUIRE(b >= b);
1 0 REQUIRE(b >= b);
1 0 REQUIRE(b >= b);
1 0 REQUIRE(b >= b);
0 0 REQUIRE(b >= b);
0 0 REQUIRE(b >= b);
1267 1 0 REQUIRE(!(b > b));
1 0 REQUIRE(!(b > b));
1 0 REQUIRE(!(b > b));
1 0 REQUIRE(!(b > b));
0 0 REQUIRE(!(b > b));
0 0 REQUIRE(!(b > b));
1268 1 0 REQUIRE(e > b);
1 0 REQUIRE(e > b);
1 0 REQUIRE(e > b);
1 0 REQUIRE(e > b);
1 0 REQUIRE(e > b);
0 0 REQUIRE(e > b);
0 0 REQUIRE(e > b);
1269 1 0 REQUIRE(b < e);
1 0 REQUIRE(b < e);
1 0 REQUIRE(b < e);
1 0 REQUIRE(b < e);
1 0 REQUIRE(b < e);
0 0 REQUIRE(b < e);
0 0 REQUIRE(b < e);
1270 1 0 REQUIRE(b <= e);
1 0 REQUIRE(b <= e);
1 0 REQUIRE(b <= e);
1 0 REQUIRE(b <= e);
1 0 REQUIRE(b <= e);
0 0 REQUIRE(b <= e);
0 0 REQUIRE(b <= e);
1271 1 0 REQUIRE(e <= e);
1 0 REQUIRE(e <= e);
1 0 REQUIRE(e <= e);
1 0 REQUIRE(e <= e);
1 0 REQUIRE(e <= e);
0 0 REQUIRE(e <= e);
0 0 REQUIRE(e <= e);
1272 1 0 REQUIRE(!(e < e ));
1 0 REQUIRE(!(e < e ));
1 0 REQUIRE(!(e < e ));
1 0 REQUIRE(!(e < e ));
0 0 REQUIRE(!(e < e ));
0 0 REQUIRE(!(e < e ));
1275 7 0 SECTION("global -+ operators") {
7 0 SECTION("global -+ operators") {
7 0 SECTION("global -+ operators") {
7 0 SECTION("global -+ operators") {
1 6 SECTION("global -+ operators") {
1276 1 0 auto b = s.begin();
1277 1 0 auto e = s.end();
1279 1 0 REQUIRE(*(b + 1) == (T)'1');
1 0 REQUIRE(*(b + 1) == (T)'1');
1 0 REQUIRE(*(b + 1) == (T)'1');
1 0 REQUIRE(*(b + 1) == (T)'1');
1 0 REQUIRE(*(b + 1) == (T)'1');
1 0 REQUIRE(*(b + 1) == (T)'1');
1 0 REQUIRE(*(b + 1) == (T)'1');
0 0 REQUIRE(*(b + 1) == (T)'1');
0 0 REQUIRE(*(b + 1) == (T)'1');
1280 1 0 REQUIRE(*(2 + b) == (T)'2');
1 0 REQUIRE(*(2 + b) == (T)'2');
1 0 REQUIRE(*(2 + b) == (T)'2');
1 0 REQUIRE(*(2 + b) == (T)'2');
1 0 REQUIRE(*(2 + b) == (T)'2');
1 0 REQUIRE(*(2 + b) == (T)'2');
1 0 REQUIRE(*(2 + b) == (T)'2');
0 0 REQUIRE(*(2 + b) == (T)'2');
0 0 REQUIRE(*(2 + b) == (T)'2');
1281 1 0 REQUIRE(*(e - 1) == (T)'9');
1 0 REQUIRE(*(e - 1) == (T)'9');
1 0 REQUIRE(*(e - 1) == (T)'9');
1 0 REQUIRE(*(e - 1) == (T)'9');
1 0 REQUIRE(*(e - 1) == (T)'9');
1 0 REQUIRE(*(e - 1) == (T)'9');
1 0 REQUIRE(*(e - 1) == (T)'9');
0 0 REQUIRE(*(e - 1) == (T)'9');
0 0 REQUIRE(*(e - 1) == (T)'9');
1282 1 0 REQUIRE(*(2 - e) == (T)'8');
1 0 REQUIRE(*(2 - e) == (T)'8');
1 0 REQUIRE(*(2 - e) == (T)'8');
1 0 REQUIRE(*(2 - e) == (T)'8');
1 0 REQUIRE(*(2 - e) == (T)'8');
1 0 REQUIRE(*(2 - e) == (T)'8');
1 0 REQUIRE(*(2 - e) == (T)'8');
0 0 REQUIRE(*(2 - e) == (T)'8');
0 0 REQUIRE(*(2 - e) == (T)'8');
1285 7 0 SECTION("as const iterator") {
7 0 SECTION("as const iterator") {
7 0 SECTION("as const iterator") {
7 0 SECTION("as const iterator") {
1 6 SECTION("as const iterator") {
1286 1 0 auto b = s.begin();
1287 1 0 auto cb = (const T*)b;
1288 1 0 REQUIRE(*cb++ == (T)'0');
1 0 REQUIRE(*cb++ == (T)'0');
1 0 REQUIRE(*cb++ == (T)'0');
1 0 REQUIRE(*cb++ == (T)'0');
1 0 REQUIRE(*cb++ == (T)'0');
0 0 REQUIRE(*cb++ == (T)'0');
0 0 REQUIRE(*cb++ == (T)'0');
1289 1 0 REQUIRE(*cb++ == (T)'1');
1 0 REQUIRE(*cb++ == (T)'1');
1 0 REQUIRE(*cb++ == (T)'1');
1 0 REQUIRE(*cb++ == (T)'1');
1 0 REQUIRE(*cb++ == (T)'1');
0 0 REQUIRE(*cb++ == (T)'1');
0 0 REQUIRE(*cb++ == (T)'1');
1292 7 0 SECTION("plus and as const iterator") {
7 0 SECTION("plus and as const iterator") {
7 0 SECTION("plus and as const iterator") {
7 0 SECTION("plus and as const iterator") {
1 6 SECTION("plus and as const iterator") {
1293 1 0 auto b = s.begin() + 2;
1 0 auto b = s.begin() + 2;
1294 1 0 auto cb = (const T*)b;
1295 1 0 REQUIRE(*cb++ == (T)'2');
1 0 REQUIRE(*cb++ == (T)'2');
1 0 REQUIRE(*cb++ == (T)'2');
1 0 REQUIRE(*cb++ == (T)'2');
1 0 REQUIRE(*cb++ == (T)'2');
0 0 REQUIRE(*cb++ == (T)'2');
0 0 REQUIRE(*cb++ == (T)'2');
1296 1 0 REQUIRE(*cb++ == (T)'3');
1 0 REQUIRE(*cb++ == (T)'3');
1 0 REQUIRE(*cb++ == (T)'3');
1 0 REQUIRE(*cb++ == (T)'3');
1 0 REQUIRE(*cb++ == (T)'3');
0 0 REQUIRE(*cb++ == (T)'3');
0 0 REQUIRE(*cb++ == (T)'3');
1302 4 0 SECTION("literal") {
4 0 SECTION("literal") {
4 0 SECTION("literal") {
4 0 SECTION("literal") {
1 3 SECTION("literal") {
1304 1 0 s.erase(11);
1305 1 0 REQUIRE_STR(s, mstr("hello world"), 0);
1 0 REQUIRE_STR(s, mstr("hello world"), 0);
1306 1 0 CHECK_ALLOCS();
1307 1 0 s.erase(0, 6);
1308 1 0 REQUIRE_STR(s, mstr("world"), 0);
1 0 REQUIRE_STR(s, mstr("world"), 0);
1309 1 0 CHECK_ALLOCS();
1310 1 0 s.erase(1, 3);
1311 1 0 REQUIRE_STR(s, mstr("wd"), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, mstr("wd"), MAX_SSO_CHARS);
1312 1 0 CHECK_ALLOCS();
1327 4 0 SECTION("internal") {
4 0 SECTION("internal") {
4 0 SECTION("internal") {
4 0 SECTION("internal") {
1 3 SECTION("internal") {
1328 1 0 auto exp = mstr("0123456789", 7);
1329 1 0 String s(exp.c_str());
1331 1 0 s.erase(65);
1332 1 0 REQUIRE_STR(s, mstr("01234567890123456789012345678901234567890123456789012345678901234"), 70);
1 0 REQUIRE_STR(s, mstr("01234567890123456789012345678901234567890123456789012345678901234"), 70);
1333 1 0 s.erase(0, 5);
1334 1 0 REQUIRE_STR(s, mstr("567890123456789012345678901234567890123456789012345678901234"), 65);
1 0 REQUIRE_STR(s, mstr("567890123456789012345678901234567890123456789012345678901234"), 65);
1335 1 0 s.erase(5, 5);
1336 1 0 REQUIRE_STR(s, mstr("5678956789012345678901234567890123456789012345678901234"), 60); //head moved
1 0 REQUIRE_STR(s, mstr("5678956789012345678901234567890123456789012345678901234"), 60); //head moved
1337 1 0 s.erase(45, 5);
1338 1 0 REQUIRE_STR(s, mstr("56789567890123456789012345678901234567890123401234"), 60); //tail moved
1 0 REQUIRE_STR(s, mstr("56789567890123456789012345678901234567890123401234"), 60); //tail moved
1339 1 0 CHECK_ALLOCS();
1340 1 0 String s2(s);
1341 1 0 REQUIRE_STR(s2, mstr("56789567890123456789012345678901234567890123401234"), 0, 60);
1 0 REQUIRE_STR(s2, mstr("56789567890123456789012345678901234567890123401234"), 0, 60);
1342 1 0 s.erase(45);
1343 1 0 REQUIRE_STR(s, mstr("567895678901234567890123456789012345678901234"), 0, 60); // still cow
1 0 REQUIRE_STR(s, mstr("567895678901234567890123456789012345678901234"), 0, 60); // still cow
1344 1 0 s.erase(0, 5);
1345 1 0 REQUIRE_STR(s, mstr("5678901234567890123456789012345678901234"), 0, 55); // still cow
1 0 REQUIRE_STR(s, mstr("5678901234567890123456789012345678901234"), 0, 55); // still cow
1346 1 0 CHECK_ALLOCS();
1347 1 0 REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(s.use_count() == 2); // cow
1348 1 0 s.erase(5, 5);
1349 1 0 REQUIRE_STR(s, mstr("56789567890123456789012345678901234")); // detached
1 0 REQUIRE_STR(s, mstr("56789567890123456789012345678901234")); // detached
1350 1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
1351 1 0 CHECK_ALLOCS(1,BUF_CHARS+35);
1353 4 0 SECTION("external") {
4 0 SECTION("external") {
4 0 SECTION("external") {
4 0 SECTION("external") {
1 3 SECTION("external") {
1354 1 0 auto exp = mstr("0123456789", 5);
1355 1 0 String s(exp.c_str());
1357 1 0 s.erase(45);
1358 1 0 REQUIRE_STR(s, mstr("012345678901234567890123456789012345678901234"), 50);
1 0 REQUIRE_STR(s, mstr("012345678901234567890123456789012345678901234"), 50);
1359 1 0 s.erase(0, 5);
1360 1 0 REQUIRE_STR(s, mstr("5678901234567890123456789012345678901234"), 45);
1 0 REQUIRE_STR(s, mstr("5678901234567890123456789012345678901234"), 45);
1361 1 0 s.erase(5, 5);
1362 1 0 REQUIRE_STR(s, mstr("56789567890123456789012345678901234"), 40); //head moved
1 0 REQUIRE_STR(s, mstr("56789567890123456789012345678901234"), 40); //head moved
1363 1 0 s.erase(25, 5);
1364 1 0 REQUIRE_STR(s, mstr("567895678901234567890123401234"), 40); //tail moved
1 0 REQUIRE_STR(s, mstr("567895678901234567890123401234"), 40); //tail moved
1365 1 0 CHECK_ALLOCS();
1366 1 0 String s2(s);
1367 1 0 REQUIRE_STR(s2, mstr("567895678901234567890123401234"), 0, 40);
1 0 REQUIRE_STR(s2, mstr("567895678901234567890123401234"), 0, 40);
1368 1 0 s.erase(25);
1369 1 0 REQUIRE_STR(s, mstr("5678956789012345678901234"), 0, 40); // still cow
1 0 REQUIRE_STR(s, mstr("5678956789012345678901234"), 0, 40); // still cow
1370 1 0 s.erase(0, 5);
1371 1 0 REQUIRE_STR(s, mstr("56789012345678901234"), 0, 35); // still cow
1 0 REQUIRE_STR(s, mstr("56789012345678901234"), 0, 35); // still cow
1372 1 0 CHECK_ALLOCS();
1373 1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
1 0 REQUIRE(s.use_count() == 2);
0 0 REQUIRE(s.use_count() == 2);
0 0 REQUIRE(s.use_count() == 2);
1374 1 0 s.erase(1, 18);
1375 1 0 REQUIRE_STR(s, mstr("54"), MAX_SSO_CHARS); // detached
1 0 REQUIRE_STR(s, mstr("54"), MAX_SSO_CHARS); // detached
1376 1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
1378 4 0 SECTION("offset exceed") {
4 0 SECTION("offset exceed") {
4 0 SECTION("offset exceed") {
4 0 SECTION("offset exceed") {
1 3 SECTION("offset exceed") {
1380 1 0 REQUIRE_THROWS(s.erase(100));
1 0 REQUIRE_THROWS(s.erase(100));
1 0 REQUIRE_THROWS(s.erase(100));
0 1 REQUIRE_THROWS(s.erase(100));
0 0 REQUIRE_THROWS(s.erase(100));
0 0 REQUIRE_THROWS(s.erase(100));
1 0 REQUIRE_THROWS(s.erase(100));
1 0 REQUIRE_THROWS(s.erase(100));
1 0 REQUIRE_THROWS(s.erase(100));
1386 1 0 String s1(cstr("keyword"));
1 0 String s1(cstr("keyword"));
1 0 String s1(cstr("keyword"));
1 0 String s1(cstr("keyword"));
1387 1 0 FString s2(cstr("abcword"));
1 0 FString s2(cstr("abcword"));
1 0 FString s2(cstr("abcword"));
1 0 FString s2(cstr("abcword"));
1388 1 0 FString s3(cstr("keyword1"));
1 0 FString s3(cstr("keyword1"));
1 0 FString s3(cstr("keyword1"));
1 0 FString s3(cstr("keyword1"));
1389 1 0 FString s4(cstr("keyword"));
1 0 FString s4(cstr("keyword"));
1 0 FString s4(cstr("keyword"));
1 0 FString s4(cstr("keyword"));
1390 1 0 FString s5(cstr("word"));
1 0 FString s5(cstr("word"));
1 0 FString s5(cstr("word"));
1 0 FString s5(cstr("word"));
1393 1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
0 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
0 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
0 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
0 0 REQUIRE(s1.compare(0, 7, s2, 0, 7) > 0);
1394 1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
0 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
0 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
0 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
0 0 REQUIRE(s1.compare(0, 7, s3, 0, 8) < 0);
1395 1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
0 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
0 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
0 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
0 0 REQUIRE(s1.compare(0, 7, s4, 0, 7) == 0);
1396 1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
0 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
0 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
0 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
0 0 REQUIRE(s1.compare(0, 7, s5, 0, 4) < 0);
1397 1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
0 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
0 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
0 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
0 0 REQUIRE(s1.compare(0, 7, s3, 0, 7) == 0);
1398 1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
0 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
0 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
0 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
0 0 REQUIRE(s1.compare(3, 4, s5, 0, 4) == 0);
1399 1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
0 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
0 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
0 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
0 0 REQUIRE(s1.compare(3, 4, s2, 3, 4) == 0);
1401 1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
0 1 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
0 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
0 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
0 1 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
0 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
0 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(8, 7, s2, 0, 7)); //offset exceeded
1402 1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
0 1 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
0 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
0 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
0 1 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
0 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
0 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1 0 REQUIRE_THROWS(s1.compare(0, 7, s2, 8, 7)); //offset exceeded
1404 1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
0 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
0 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
0 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
0 0 REQUIRE(s1.compare(0, 10, s4, 0, 7) == 0); //len exceeded
1405 1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
0 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
0 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
0 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
0 0 REQUIRE(s1.compare(0, 10, s4, 0, 11) == 0); //len exceeded
1407 1 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
0 0 REQUIRE_FALSE(s1 == s3);
0 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
1 0 REQUIRE_FALSE(s1 == s3);
0 0 REQUIRE_FALSE(s1 == s3);
0 0 REQUIRE_FALSE(s1 == s3);
1408 1 0 REQUIRE(s1 == s4);
1 0 REQUIRE(s1 == s4);
1 0 REQUIRE(s1 == s4);
1 0 REQUIRE(s1 == s4);
1 0 REQUIRE(s1 == s4);
0 0 REQUIRE(s1 == s4);
0 0 REQUIRE(s1 == s4);
1 0 REQUIRE(s1 == s4);
1 0 REQUIRE(s1 == s4);
1 0 REQUIRE(s1 == s4);
1 0 REQUIRE(s1 == s4);
1 0 REQUIRE(s1 == s4);
0 0 REQUIRE(s1 == s4);
0 0 REQUIRE(s1 == s4);
1410 1 0 REQUIRE(s1 != s3);
1 0 REQUIRE(s1 != s3);
1 0 REQUIRE(s1 != s3);
1 0 REQUIRE(s1 != s3);
1 0 REQUIRE(s1 != s3);
0 0 REQUIRE(s1 != s3);
0 0 REQUIRE(s1 != s3);
1 0 REQUIRE(s1 != s3);
1 0 REQUIRE(s1 != s3);
1 0 REQUIRE(s1 != s3);
1 0 REQUIRE(s1 != s3);
1 0 REQUIRE(s1 != s3);
0 0 REQUIRE(s1 != s3);
0 0 REQUIRE(s1 != s3);
1411 1 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
0 0 REQUIRE_FALSE(s1 != s4);
0 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
1 0 REQUIRE_FALSE(s1 != s4);
0 0 REQUIRE_FALSE(s1 != s4);
0 0 REQUIRE_FALSE(s1 != s4);
1413 1 0 REQUIRE(s1 > s2);
1 0 REQUIRE(s1 > s2);
1 0 REQUIRE(s1 > s2);
1 0 REQUIRE(s1 > s2);
1 0 REQUIRE(s1 > s2);
0 0 REQUIRE(s1 > s2);
0 0 REQUIRE(s1 > s2);
1 0 REQUIRE(s1 > s2);
1 0 REQUIRE(s1 > s2);
1 0 REQUIRE(s1 > s2);
1 0 REQUIRE(s1 > s2);
1 0 REQUIRE(s1 > s2);
0 0 REQUIRE(s1 > s2);
0 0 REQUIRE(s1 > s2);
1414 1 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
0 0 REQUIRE_FALSE(s1 > s3);
0 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
1 0 REQUIRE_FALSE(s1 > s3);
0 0 REQUIRE_FALSE(s1 > s3);
0 0 REQUIRE_FALSE(s1 > s3);
1415 1 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
0 0 REQUIRE_FALSE(s1 > s4);
0 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
1 0 REQUIRE_FALSE(s1 > s4);
0 0 REQUIRE_FALSE(s1 > s4);
0 0 REQUIRE_FALSE(s1 > s4);
1417 1 0 REQUIRE(s1 >= s2);
1 0 REQUIRE(s1 >= s2);
1 0 REQUIRE(s1 >= s2);
1 0 REQUIRE(s1 >= s2);
1 0 REQUIRE(s1 >= s2);
0 0 REQUIRE(s1 >= s2);
0 0 REQUIRE(s1 >= s2);
1 0 REQUIRE(s1 >= s2);
1 0 REQUIRE(s1 >= s2);
1 0 REQUIRE(s1 >= s2);
1 0 REQUIRE(s1 >= s2);
1 0 REQUIRE(s1 >= s2);
0 0 REQUIRE(s1 >= s2);
0 0 REQUIRE(s1 >= s2);
1418 1 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
0 0 REQUIRE_FALSE(s1 >= s3);
0 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
1 0 REQUIRE_FALSE(s1 >= s3);
0 0 REQUIRE_FALSE(s1 >= s3);
0 0 REQUIRE_FALSE(s1 >= s3);
1419 1 0 REQUIRE(s1 >= s4);
1 0 REQUIRE(s1 >= s4);
1 0 REQUIRE(s1 >= s4);
1 0 REQUIRE(s1 >= s4);
1 0 REQUIRE(s1 >= s4);
0 0 REQUIRE(s1 >= s4);
0 0 REQUIRE(s1 >= s4);
1 0 REQUIRE(s1 >= s4);
1 0 REQUIRE(s1 >= s4);
1 0 REQUIRE(s1 >= s4);
1 0 REQUIRE(s1 >= s4);
1 0 REQUIRE(s1 >= s4);
0 0 REQUIRE(s1 >= s4);
0 0 REQUIRE(s1 >= s4);
1421 1 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
0 0 REQUIRE_FALSE(s1 < s2);
0 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
1 0 REQUIRE_FALSE(s1 < s2);
0 0 REQUIRE_FALSE(s1 < s2);
0 0 REQUIRE_FALSE(s1 < s2);
1422 1 0 REQUIRE(s1 < s3);
1 0 REQUIRE(s1 < s3);
1 0 REQUIRE(s1 < s3);
1 0 REQUIRE(s1 < s3);
1 0 REQUIRE(s1 < s3);
0 0 REQUIRE(s1 < s3);
0 0 REQUIRE(s1 < s3);
1 0 REQUIRE(s1 < s3);
1 0 REQUIRE(s1 < s3);
1 0 REQUIRE(s1 < s3);
1 0 REQUIRE(s1 < s3);
1 0 REQUIRE(s1 < s3);
0 0 REQUIRE(s1 < s3);
0 0 REQUIRE(s1 < s3);
1423 1 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
0 0 REQUIRE_FALSE(s1 < s4);
0 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
1 0 REQUIRE_FALSE(s1 < s4);
0 0 REQUIRE_FALSE(s1 < s4);
0 0 REQUIRE_FALSE(s1 < s4);
1425 1 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
0 0 REQUIRE_FALSE(s1 <= s2);
0 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
1 0 REQUIRE_FALSE(s1 <= s2);
0 0 REQUIRE_FALSE(s1 <= s2);
0 0 REQUIRE_FALSE(s1 <= s2);
1426 1 0 REQUIRE(s1 <= s3);
1 0 REQUIRE(s1 <= s3);
1 0 REQUIRE(s1 <= s3);
1 0 REQUIRE(s1 <= s3);
1 0 REQUIRE(s1 <= s3);
0 0 REQUIRE(s1 <= s3);
0 0 REQUIRE(s1 <= s3);
1 0 REQUIRE(s1 <= s3);
1 0 REQUIRE(s1 <= s3);
1 0 REQUIRE(s1 <= s3);
1 0 REQUIRE(s1 <= s3);
1 0 REQUIRE(s1 <= s3);
0 0 REQUIRE(s1 <= s3);
0 0 REQUIRE(s1 <= s3);
1427 1 0 REQUIRE(s1 <= s4);
1 0 REQUIRE(s1 <= s4);
1 0 REQUIRE(s1 <= s4);
1 0 REQUIRE(s1 <= s4);
1 0 REQUIRE(s1 <= s4);
0 0 REQUIRE(s1 <= s4);
0 0 REQUIRE(s1 <= s4);
1 0 REQUIRE(s1 <= s4);
1 0 REQUIRE(s1 <= s4);
1 0 REQUIRE(s1 <= s4);
1 0 REQUIRE(s1 <= s4);
1 0 REQUIRE(s1 <= s4);
0 0 REQUIRE(s1 <= s4);
0 0 REQUIRE(s1 <= s4);
1429 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1435 6 0 String s(cstr("jopa noviy god"));
6 0 String s(cstr("jopa noviy god"));
6 0 String s(cstr("jopa noviy god"));
6 0 String s(cstr("jopa noviy god"));
1436 6 0 SECTION("find") {
6 0 SECTION("find") {
6 0 SECTION("find") {
6 0 SECTION("find") {
1 5 SECTION("find") {
6 0 SECTION("find") {
6 0 SECTION("find") {
6 0 SECTION("find") {
6 0 SECTION("find") {
1 5 SECTION("find") {
1437 1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
0 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
0 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
0 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
0 0 REQUIRE(s.find(FString(cstr("o"))) == 1);
1438 1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
0 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
0 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
0 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
0 0 REQUIRE(s.find(FString(cstr("jopa"))) == 0);
1439 1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
0 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
0 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
0 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
0 0 REQUIRE(s.find(FString(cstr("noviy"))) == 5);
1440 1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
0 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
0 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
0 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
0 0 REQUIRE(s.find(FString(cstr("god"))) == 11);
1441 1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
0 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
0 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
0 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
0 0 REQUIRE(s.find(FString(cstr("o")), 2) == 6);
1442 1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find(FString(EMPTY), 0) == 0);
1443 1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.find(FString(EMPTY), 13) == 13);
1444 1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
0 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
0 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
0 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
0 0 REQUIRE(s.find(FString(EMPTY), 14) == 14);
1445 1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find(FString(EMPTY), 15) == npos);
1446 1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
0 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
0 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
0 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
0 0 REQUIRE(s.find(FString(cstr("o")), 14) == npos);
1447 1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
0 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
0 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
0 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
0 0 REQUIRE(s.find(FString(cstr("god")), 11) == 11);
1448 1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
0 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
0 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
0 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
0 0 REQUIRE(s.find(FString(cstr("god")), 12) == npos);
1450 6 0 SECTION("rfind") {
6 0 SECTION("rfind") {
6 0 SECTION("rfind") {
6 0 SECTION("rfind") {
1 5 SECTION("rfind") {
6 0 SECTION("rfind") {
6 0 SECTION("rfind") {
6 0 SECTION("rfind") {
6 0 SECTION("rfind") {
1 5 SECTION("rfind") {
1451 1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
0 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
0 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
0 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
0 0 REQUIRE(s.rfind(FString(cstr("o"))) == 12);
1452 1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 99999) == 12);
1453 1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
0 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
0 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
0 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
0 0 REQUIRE(s.rfind(FString(cstr("jopa"))) == 0);
1454 1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
0 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
0 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
0 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
0 0 REQUIRE(s.rfind(FString(cstr("jopa")), 0) == 0);
1455 1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
0 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
0 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
0 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
0 0 REQUIRE(s.rfind(FString(cstr("noviy"))) == 5);
1456 1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 11) == 6);
1457 1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.rfind(FString(EMPTY), 0) == 0);
1458 1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.rfind(FString(EMPTY), 13) == 13);
1459 1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
0 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
0 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
0 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
0 0 REQUIRE(s.rfind(FString(EMPTY), 14) == 14);
1460 1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
0 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
0 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
0 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
0 0 REQUIRE(s.rfind(FString(EMPTY), 15) == 14);
1461 1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
0 0 REQUIRE(s.rfind(FString(cstr("o")), 0) == npos);
1462 1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
0 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
0 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
0 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
0 0 REQUIRE(s.rfind(FString(cstr("god")), 11) == 11);
1463 1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
0 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
0 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
0 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
0 0 REQUIRE(s.rfind(FString(cstr("god")), 10) == npos);
1465 6 0 SECTION("find_first_of") {
6 0 SECTION("find_first_of") {
6 0 SECTION("find_first_of") {
6 0 SECTION("find_first_of") {
1 5 SECTION("find_first_of") {
6 0 SECTION("find_first_of") {
6 0 SECTION("find_first_of") {
6 0 SECTION("find_first_of") {
6 0 SECTION("find_first_of") {
1 5 SECTION("find_first_of") {
1466 1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
0 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
0 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
0 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
0 0 REQUIRE(s.find_first_of(FString(cstr("o"))) == 1);
1467 1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
0 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
0 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
0 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
0 0 REQUIRE(s.find_first_of(FString(cstr("o")), 2) == 6);
1468 1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
0 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
0 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
0 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
0 0 REQUIRE(s.find_first_of(FString(cstr("o")), 14) == npos);
1469 1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
0 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
0 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
0 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
0 0 REQUIRE(s.find_first_of(FString(EMPTY), 0) == npos);
1470 1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_first_of(FString(EMPTY), 15) == npos);
1471 1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv"))) == 2);
1472 1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 3) == 5);
1473 1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 6) == 7);
1474 1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
0 0 REQUIRE(s.find_first_of(FString(cstr("pnv")), 8) == npos);
1476 6 0 SECTION("find_first_not_of") {
6 0 SECTION("find_first_not_of") {
6 0 SECTION("find_first_not_of") {
6 0 SECTION("find_first_not_of") {
1 5 SECTION("find_first_not_of") {
6 0 SECTION("find_first_not_of") {
6 0 SECTION("find_first_not_of") {
6 0 SECTION("find_first_not_of") {
6 0 SECTION("find_first_not_of") {
1 5 SECTION("find_first_not_of") {
1477 1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("o"))) == 0);
1478 1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("j"))) == 1);
1479 1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("o")), 1) == 2);
1480 1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("d")), 13) == npos);
1481 1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 0) == 0);
1482 1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(EMPTY), 15) == npos);
1483 1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("jopa nviy"))) == 11);
1484 1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("og ")), 10) == 13);
1485 1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
0 0 REQUIRE(s.find_first_not_of(FString(cstr("ogd ")), 10) == npos);
1487 6 0 SECTION("find_last_of") {
6 0 SECTION("find_last_of") {
6 0 SECTION("find_last_of") {
6 0 SECTION("find_last_of") {
1 5 SECTION("find_last_of") {
6 0 SECTION("find_last_of") {
6 0 SECTION("find_last_of") {
6 0 SECTION("find_last_of") {
6 0 SECTION("find_last_of") {
1 5 SECTION("find_last_of") {
1488 1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
0 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
0 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
0 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
0 0 REQUIRE(s.find_last_of(FString(cstr("o"))) == 12);
1489 1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 9999) == 12);
1490 1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 10) == 6);
1491 1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 1) == 1);
1492 1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
0 0 REQUIRE(s.find_last_of(FString(cstr("o")), 0) == npos);
1493 1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
0 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
0 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
0 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
0 0 REQUIRE(s.find_last_of(FString(EMPTY), 0) == npos);
1494 1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
0 0 REQUIRE(s.find_last_of(FString(EMPTY), 15) == npos);
1495 1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv"))) == 7);
1496 1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 6) == 5);
1497 1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 4) == 2);
1498 1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
0 0 REQUIRE(s.find_last_of(FString(cstr("pnv")), 1) == npos);
1500 6 0 SECTION("find_last_not_of") {
6 0 SECTION("find_last_not_of") {
6 0 SECTION("find_last_not_of") {
6 0 SECTION("find_last_not_of") {
1 5 SECTION("find_last_not_of") {
6 0 SECTION("find_last_not_of") {
6 0 SECTION("find_last_not_of") {
6 0 SECTION("find_last_not_of") {
6 0 SECTION("find_last_not_of") {
1 5 SECTION("find_last_not_of") {
1501 1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("o"))) == 13);
1502 1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d"))) == 12);
1503 1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 9999) == 12);
1504 1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("d")), 12) == 12);
1505 1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("o")), 12) == 11);
1506 1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("j")), 0) == npos);
1507 1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 0) == 0);
1508 1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 13) == 13);
1509 1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 14) == 13);
1510 1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
0 0 REQUIRE(s.find_last_not_of(FString(EMPTY), 15) == 13);
1511 1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("nviy god"))) == 3);
1512 1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("jpa ")), 4) == 1);
1513 1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
0 0 REQUIRE(s.find_last_not_of(FString(cstr("jopa ")), 4) == npos);
1519 17 0 SECTION("literal") {
17 0 SECTION("literal") {
17 0 SECTION("literal") {
17 0 SECTION("literal") {
3 14 SECTION("literal") {
1522 3 0 SECTION(">len") {
3 0 SECTION(">len") {
3 0 SECTION(">len") {
3 0 SECTION(">len") {
1 2 SECTION(">len") {
1523 1 0 s.reserve(100);
1524 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 100);
1525 1 0 CHECK_ALLOCS(1, BUF_CHARS+100);
1527 3 0 SECTION("
3 0 SECTION("
3 0 SECTION("
3 0 SECTION("
1 2 SECTION("
1528 1 0 s.reserve(LITERAL_LEN-1);
1529 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, LITERAL_LEN);
1530 1 0 CHECK_ALLOCS(1, BUF_CHARS+LITERAL_LEN);
1532 3 0 SECTION("=0") {
3 0 SECTION("=0") {
3 0 SECTION("=0") {
3 0 SECTION("=0") {
1 2 SECTION("=0") {
1533 1 0 s.reserve(0);
1534 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, LITERAL_LEN);
1535 1 0 CHECK_ALLOCS(1, BUF_CHARS+LITERAL_LEN);
1575 17 0 SECTION("internal") {
17 0 SECTION("internal") {
17 0 SECTION("internal") {
17 0 SECTION("internal") {
7 10 SECTION("internal") {
1576 7 0 auto exp = mstr("abcde", 10);
1577 7 0 String s(exp.c_str());
1579 7 0 SECTION("detach cow") {
7 0 SECTION("detach cow") {
7 0 SECTION("detach cow") {
7 0 SECTION("detach cow") {
1 6 SECTION("detach cow") {
1580 1 0 String s2(s);
1581 1 0 s.reserve(exp.size()-1);
1582 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1583 1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
1584 1 0 CHECK_ALLOCS(1, BUF_CHARS+exp.size());
1585 1 0 s = s2;
1587 1 0 s.offset(10, 30);
1588 1 0 auto tmp = exp.substr(10, 30);
1589 1 0 s.reserve(0);
1590 1 0 REQUIRE_STR(s, tmp);
1 0 REQUIRE_STR(s, tmp);
1591 1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
1592 1 0 CHECK_ALLOCS(1, BUF_CHARS+tmp.size()); // detached with minimum required capacity
1593 1 0 s = s2;
1595 1 0 s.offset(10, 30);
1596 1 0 s.reserve(100);
1597 1 0 REQUIRE_STR(s, tmp, 100);
1 0 REQUIRE_STR(s, tmp, 100);
1598 1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
1599 1 0 CHECK_ALLOCS(1, BUF_CHARS+100);
1601 7 0 SECTION("<= max capacity") {
7 0 SECTION("<= max capacity") {
7 0 SECTION("<= max capacity") {
7 0 SECTION("<= max capacity") {
1 6 SECTION("<= max capacity") {
1602 1 0 s.reserve(0);
1603 1 0 s.reserve(exp.size());
1604 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1605 1 0 CHECK_ALLOCS();
1607 7 0 SECTION("> max capacity") {
7 0 SECTION("> max capacity") {
7 0 SECTION("> max capacity") {
7 0 SECTION("> max capacity") {
1 6 SECTION("> max capacity") {
1608 1 0 s.reserve(exp.size()*2);
1609 1 0 REQUIRE_STR(s, exp, exp.size()*2);
1 0 REQUIRE_STR(s, exp, exp.size()*2);
1610 1 0 CHECK_ALLOCS(0,0,0,0,1,exp.size());
1612 7 0 SECTION("offset, <= capacity") {
7 0 SECTION("offset, <= capacity") {
7 0 SECTION("offset, <= capacity") {
7 0 SECTION("offset, <= capacity") {
1 6 SECTION("offset, <= capacity") {
1613 1 0 s.offset(10);
1614 1 0 s.reserve(40);
1615 1 0 REQUIRE_STR(s, exp.substr(10));
1 0 REQUIRE_STR(s, exp.substr(10));
1616 1 0 CHECK_ALLOCS();
1618 7 0 SECTION("offset, > capacity, <= max capacity") {
7 0 SECTION("offset, > capacity, <= max capacity") {
7 0 SECTION("offset, > capacity, <= max capacity") {
7 0 SECTION("offset, > capacity, <= max capacity") {
1 6 SECTION("offset, > capacity, <= max capacity") {
1619 1 0 s.offset(10);
1620 1 0 s.reserve(50);
1621 1 0 REQUIRE_STR(s, exp.substr(10), 50);
1 0 REQUIRE_STR(s, exp.substr(10), 50);
1622 1 0 CHECK_ALLOCS(); // str has been moved to the beginning
1624 7 0 SECTION("offset, > max capacity") {
7 0 SECTION("offset, > max capacity") {
7 0 SECTION("offset, > max capacity") {
7 0 SECTION("offset, > max capacity") {
1 6 SECTION("offset, > max capacity") {
1625 1 0 s.offset(20);
1626 1 0 s.reserve(70);
1627 1 0 REQUIRE_STR(s, exp.substr(20), 70);
1 0 REQUIRE_STR(s, exp.substr(20), 70);
1628 1 0 CHECK_ALLOCS(1, BUF_CHARS+70, 1, BUF_CHARS+50);
1630 7 0 SECTION("reserve to sso") {
7 0 SECTION("reserve to sso") {
7 0 SECTION("reserve to sso") {
7 0 SECTION("reserve to sso") {
1 6 SECTION("reserve to sso") {
1631 1 0 String s2(s);
1632 1 0 s.offset(0, 2);
1633 1 0 s.reserve(2);
1634 1 0 REQUIRE_STR(s, exp.substr(0,2), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp.substr(0,2), MAX_SSO_CHARS);
1635 1 0 CHECK_ALLOCS();
1638 17 0 SECTION("external") {
17 0 SECTION("external") {
17 0 SECTION("external") {
17 0 SECTION("external") {
7 10 SECTION("external") {
1639 7 0 auto exp = mstr("abcde", 10);
1640 7 0 String s = create_external<>(exp);
7 0 String s = create_external<>(exp);
1642 7 0 SECTION("detach cow") {
7 0 SECTION("detach cow") {
7 0 SECTION("detach cow") {
7 0 SECTION("detach cow") {
1 6 SECTION("detach cow") {
1643 1 0 String s2(s);
1644 1 0 s.reserve(exp.size()-1);
1645 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1646 1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
1647 1 0 CHECK_ALLOCS(1, BUF_CHARS+exp.size());
1648 1 0 s = s2;
1650 1 0 s.offset(10, 30);
1651 1 0 s.reserve(0);
1652 1 0 auto tmp = exp.substr(10,30);
1653 1 0 REQUIRE_STR(s, tmp);
1 0 REQUIRE_STR(s, tmp);
1654 1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
1655 1 0 CHECK_ALLOCS(1, BUF_CHARS+30); // detached with minimum required capacity
1656 1 0 s = s2;
1658 1 0 s.offset(10, 30);
1659 1 0 s.reserve(100);
1660 1 0 REQUIRE_STR(s, tmp, 100);
1 0 REQUIRE_STR(s, tmp, 100);
1661 1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
1 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
0 0 REQUIRE(s.use_count() == 1); // detached
1662 1 0 CHECK_ALLOCS(1, BUF_CHARS+100);
1664 7 0 SECTION("<= max capacity") {
7 0 SECTION("<= max capacity") {
7 0 SECTION("<= max capacity") {
7 0 SECTION("<= max capacity") {
1 6 SECTION("<= max capacity") {
1665 1 0 s.reserve(0);
1666 1 0 s.reserve(exp.size());
1667 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
1668 1 0 CHECK_ALLOCS();
1670 7 0 SECTION("> max capacity") {
7 0 SECTION("> max capacity") {
7 0 SECTION("> max capacity") {
7 0 SECTION("> max capacity") {
1 6 SECTION("> max capacity") {
1671 1 0 s.reserve(exp.size()*2);
1672 1 0 REQUIRE_STR(s, exp, exp.size()*2);
1 0 REQUIRE_STR(s, exp, exp.size()*2);
1673 1 0 CHECK_ALLOCS(1, BUF_CHARS+exp.size()*2, 1, EBUF_CHARS, 0, 0, 1, exp.size());
1675 7 0 SECTION("offset, <= capacity") {
7 0 SECTION("offset, <= capacity") {
7 0 SECTION("offset, <= capacity") {
7 0 SECTION("offset, <= capacity") {
1 6 SECTION("offset, <= capacity") {
1676 1 0 s.offset(10);
1677 1 0 s.reserve(40);
1678 1 0 REQUIRE_STR(s, exp.substr(10));
1 0 REQUIRE_STR(s, exp.substr(10));
1679 1 0 CHECK_ALLOCS();
1681 7 0 SECTION("offset, > capacity, <= max capacity") {
7 0 SECTION("offset, > capacity, <= max capacity") {
7 0 SECTION("offset, > capacity, <= max capacity") {
7 0 SECTION("offset, > capacity, <= max capacity") {
1 6 SECTION("offset, > capacity, <= max capacity") {
1682 1 0 s.offset(10);
1683 1 0 s.reserve(50);
1684 1 0 REQUIRE_STR(s, exp.substr(10), 50);
1 0 REQUIRE_STR(s, exp.substr(10), 50);
1685 1 0 CHECK_ALLOCS(); // str has been moved to the beginning
1687 7 0 SECTION("offset, > max capacity") {
7 0 SECTION("offset, > max capacity") {
7 0 SECTION("offset, > max capacity") {
7 0 SECTION("offset, > max capacity") {
1 6 SECTION("offset, > max capacity") {
1688 1 0 s.offset(20);
1689 1 0 s.reserve(70);
1690 1 0 REQUIRE_STR(s, exp.substr(20), 70);
1 0 REQUIRE_STR(s, exp.substr(20), 70);
1691 1 0 CHECK_ALLOCS(1, BUF_CHARS+70, 1, EBUF_CHARS, 0,0, 1, exp.size());
1693 7 0 SECTION("reserve to sso") {
7 0 SECTION("reserve to sso") {
7 0 SECTION("reserve to sso") {
7 0 SECTION("reserve to sso") {
1 6 SECTION("reserve to sso") {
1694 1 0 String s2(s);
1695 1 0 s.offset(0, 2);
1696 1 0 s.reserve(2);
1697 1 0 REQUIRE_STR(s, exp.substr(0, 2), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp.substr(0, 2), MAX_SSO_CHARS);
1698 1 0 CHECK_ALLOCS();
1705 6 0 SECTION("literal") {
6 0 SECTION("literal") {
6 0 SECTION("literal") {
6 0 SECTION("literal") {
2 4 SECTION("literal") {
1707 2 0 SECTION("less") {
2 0 SECTION("less") {
2 0 SECTION("less") {
2 0 SECTION("less") {
1 1 SECTION("less") {
1708 1 0 s.resize(1);
1709 1 0 REQUIRE_STR(s, StdString(LITERAL, 1), 0);
1 0 REQUIRE_STR(s, StdString(LITERAL, 1), 0);
1710 1 0 CHECK_ALLOCS();
1712 2 0 SECTION("more") {
2 0 SECTION("more") {
2 0 SECTION("more") {
2 0 SECTION("more") {
1 1 SECTION("more") {
1713 1 0 s.resize(LITERAL_LEN+10);
1714 1 0 REQUIRE_STR(s, StdString(LITERAL) + StdString(10, (T)'\0'));
1 0 REQUIRE_STR(s, StdString(LITERAL) + StdString(10, (T)'\0'));
1 0 REQUIRE_STR(s, StdString(LITERAL) + StdString(10, (T)'\0'));
1 0 REQUIRE_STR(s, StdString(LITERAL) + StdString(10, (T)'\0'));
1715 1 0 CHECK_ALLOCS(1, BUF_CHARS + LITERAL_LEN + 10);
1734 6 0 SECTION("internal") {
6 0 SECTION("internal") {
6 0 SECTION("internal") {
6 0 SECTION("internal") {
2 4 SECTION("internal") {
1735 2 0 auto exp = mstr("a", 50);
1736 2 0 String s(exp.c_str());
1738 2 0 SECTION("less") {
2 0 SECTION("less") {
2 0 SECTION("less") {
2 0 SECTION("less") {
1 1 SECTION("less") {
1739 1 0 s.resize(10);
1740 1 0 REQUIRE_STR(s, mstr("a", 10), exp.size());
1 0 REQUIRE_STR(s, mstr("a", 10), exp.size());
1741 1 0 CHECK_ALLOCS();
1743 2 0 SECTION("more") {
2 0 SECTION("more") {
2 0 SECTION("more") {
2 0 SECTION("more") {
1 1 SECTION("more") {
1744 1 0 s.resize(70, (T)'b');
1745 1 0 REQUIRE_STR(s, exp + mstr("b", 20));
1 0 REQUIRE_STR(s, exp + mstr("b", 20));
1 0 REQUIRE_STR(s, exp + mstr("b", 20));
1746 1 0 CHECK_ALLOCS(0,0,0,0,1,20);
1749 6 0 SECTION("external") {
6 0 SECTION("external") {
6 0 SECTION("external") {
6 0 SECTION("external") {
2 4 SECTION("external") {
1750 2 0 auto exp = mstr("a", 50);
1751 2 0 String s = create_external<>(exp);
2 0 String s = create_external<>(exp);
1753 2 0 SECTION("less") {
2 0 SECTION("less") {
2 0 SECTION("less") {
2 0 SECTION("less") {
1 1 SECTION("less") {
1754 1 0 s.resize(10);
1755 1 0 REQUIRE_STR(s, mstr("a", 10), exp.size());
1 0 REQUIRE_STR(s, mstr("a", 10), exp.size());
1756 1 0 CHECK_ALLOCS();
1758 2 0 SECTION("more") {
2 0 SECTION("more") {
2 0 SECTION("more") {
2 0 SECTION("more") {
1 1 SECTION("more") {
1759 1 0 s.offset(40);
1760 1 0 s.resize(20, (T)'b');
1761 1 0 REQUIRE_STR(s, mstr("a", 10) + mstr("b", 10), 50);
1 0 REQUIRE_STR(s, mstr("a", 10) + mstr("b", 10), 50);
1 0 REQUIRE_STR(s, mstr("a", 10) + mstr("b", 10), 50);
1 0 REQUIRE_STR(s, mstr("a", 10) + mstr("b", 10), 50);
1762 1 0 CHECK_ALLOCS(); // because offset has been eliminated
1769 6 0 SECTION("literal") {
6 0 SECTION("literal") {
6 0 SECTION("literal") {
6 0 SECTION("literal") {
1 5 SECTION("literal") {
1770 1 0 auto s = String(LITERAL).substr(2,5);
1771 1 0 s.shrink_to_fit();
1772 1 0 REQUIRE(s.capacity() == 0); // noop
1 0 REQUIRE(s.capacity() == 0); // noop
1 0 REQUIRE(s.capacity() == 0); // noop
1 0 REQUIRE(s.capacity() == 0); // noop
1 0 REQUIRE(s.capacity() == 0); // noop
1 0 REQUIRE(s.capacity() == 0); // noop
0 0 REQUIRE(s.capacity() == 0); // noop
0 0 REQUIRE(s.capacity() == 0); // noop
1773 1 0 CHECK_ALLOCS();
1775 6 0 SECTION("sso") {
6 0 SECTION("sso") {
6 0 SECTION("sso") {
6 0 SECTION("sso") {
1 5 SECTION("sso") {
1776 1 0 String s(cstr("ab"));
1 0 String s(cstr("ab"));
1778 1 0 s.shrink_to_fit();
1779 1 0 REQUIRE_STR(s, mstr("a"), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, mstr("a"), MAX_SSO_CHARS);
1780 1 0 CHECK_ALLOCS();
1782 6 0 SECTION("internal owner") {
6 0 SECTION("internal owner") {
6 0 SECTION("internal owner") {
6 0 SECTION("internal owner") {
1 5 SECTION("internal owner") {
1783 1 0 String s(cstr("a", 50));
1 0 String s(cstr("a", 50));
1785 1 0 s.shrink_to_fit();
1786 1 0 REQUIRE_STR(s, mstr("a", 50));
1 0 REQUIRE_STR(s, mstr("a", 50));
1787 1 0 CHECK_ALLOCS();
1788 1 0 s.offset(0, 40);
1789 1 0 s.shrink_to_fit();
1790 1 0 REQUIRE_STR(s, mstr("a", 40));
1 0 REQUIRE_STR(s, mstr("a", 40));
1791 1 0 CHECK_ALLOCS(0,0,0,0,1,-10); //realloced
1792 1 0 s.offset(10);
1793 1 0 s.shrink_to_fit();
1794 1 0 REQUIRE_STR(s, mstr("a", 30));
1 0 REQUIRE_STR(s, mstr("a", 30));
1795 1 0 CHECK_ALLOCS(1,BUF_CHARS+30,1,BUF_CHARS+40); // dealloc+alloc
1796 1 0 s.offset(0,2);
1797 1 0 s.shrink_to_fit();
1798 1 0 REQUIRE_STR(s, mstr("aa"), MAX_SSO_CHARS); // shrinked to sso
1 0 REQUIRE_STR(s, mstr("aa"), MAX_SSO_CHARS); // shrinked to sso
1799 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+30);
1801 6 0 SECTION("internal cow") {
6 0 SECTION("internal cow") {
6 0 SECTION("internal cow") {
6 0 SECTION("internal cow") {
1 5 SECTION("internal cow") {
1802 1 0 String s(cstr("a", 50));
1 0 String s(cstr("a", 50));
1803 1 0 String tmp(s);
1805 1 0 s.offset(10, 30);
1806 1 0 s.shrink_to_fit();
1807 1 0 REQUIRE_STR(s, mstr("a", 30), 0, 40);
1 0 REQUIRE_STR(s, mstr("a", 30), 0, 40);
1808 1 0 CHECK_ALLOCS();
1809 1 0 s.offset(0, 2);
1810 1 0 s.shrink_to_fit();
1811 1 0 REQUIRE_STR(s, mstr("aa"), MAX_SSO_CHARS); // shrinked to sso
1 0 REQUIRE_STR(s, mstr("aa"), MAX_SSO_CHARS); // shrinked to sso
1812 1 0 CHECK_ALLOCS();
1814 6 0 SECTION("external owner") {
6 0 SECTION("external owner") {
6 0 SECTION("external owner") {
6 0 SECTION("external owner") {
1 5 SECTION("external owner") {
1815 1 0 String s = create_external<>(mstr("a", 50));
1 0 String s = create_external<>(mstr("a", 50));
1817 1 0 s.shrink_to_fit();
1818 1 0 REQUIRE_STR(s, mstr("a", 50));
1 0 REQUIRE_STR(s, mstr("a", 50));
1819 1 0 CHECK_ALLOCS();
1820 1 0 s.offset(0, 40);
1821 1 0 s.shrink_to_fit();
1822 1 0 REQUIRE_STR(s, mstr("a", 40)); // shrinked
1 0 REQUIRE_STR(s, mstr("a", 40)); // shrinked
1823 1 0 CHECK_ALLOCS(1, BUF_CHARS+40, 1, EBUF_CHARS, 0, 0, 1, 50); // moved to internal
1824 1 0 s = create_external<>(mstr("a", 50));
1 0 s = create_external<>(mstr("a", 50));
1 0 s = create_external<>(mstr("a", 50));
1826 1 0 s.offset(0,2);
1827 1 0 s.shrink_to_fit();
1828 1 0 REQUIRE_STR(s, mstr("aa"), MAX_SSO_CHARS); // shrinked to sso
1 0 REQUIRE_STR(s, mstr("aa"), MAX_SSO_CHARS); // shrinked to sso
1829 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,50);
1831 6 0 SECTION("external cow") {
6 0 SECTION("external cow") {
6 0 SECTION("external cow") {
6 0 SECTION("external cow") {
1 5 SECTION("external cow") {
1832 1 0 String s = create_external<>(mstr("a", 50));
1 0 String s = create_external<>(mstr("a", 50));
1834 1 0 String tmp(s);
1835 1 0 s.offset(10, 30);
1836 1 0 s.shrink_to_fit();
1837 1 0 REQUIRE_STR(s, mstr("a", 30), 0, 40);
1 0 REQUIRE_STR(s, mstr("a", 30), 0, 40);
1838 1 0 CHECK_ALLOCS();
1839 1 0 s = create_external<>(mstr("a", 50));
1 0 s = create_external<>(mstr("a", 50));
1 0 s = create_external<>(mstr("a", 50));
1840 1 0 tmp = s;
1842 1 0 s.offset(0, 2);
1843 1 0 s.shrink_to_fit();
1844 1 0 REQUIRE_STR(s, mstr("aa"), MAX_SSO_CHARS); // shrinked to sso
1 0 REQUIRE_STR(s, mstr("aa"), MAX_SSO_CHARS); // shrinked to sso
1845 1 0 CHECK_ALLOCS();
1850 10 0 String s(cstr("abcd"));
10 0 String s(cstr("abcd"));
1851 10 0 SECTION("char") {
10 0 SECTION("char") {
10 0 SECTION("char") {
10 0 SECTION("char") {
1 9 SECTION("char") {
1852 1 0 s.append(5, (T)'x');
1853 1 0 REQUIRE_STRM(s, mstr("abcdxxxxx"));
1 0 REQUIRE_STRM(s, mstr("abcdxxxxx"));
1855 10 0 SECTION("same class string") {
10 0 SECTION("same class string") {
10 0 SECTION("same class string") {
10 0 SECTION("same class string") {
1 9 SECTION("same class string") {
1856 1 0 s.append(String(cstr("1234")));
1 0 s.append(String(cstr("1234")));
1 0 s.append(String(cstr("1234")));
1857 1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1858 1 0 s.append(String(cstr("qwerty")), 3);
1 0 s.append(String(cstr("qwerty")), 3);
1 0 s.append(String(cstr("qwerty")), 3);
1859 1 0 REQUIRE_STRM(s, mstr("abcd1234rty"));
1 0 REQUIRE_STRM(s, mstr("abcd1234rty"));
1860 1 0 s.append(String(cstr("hello world")), 5, 4);
1 0 s.append(String(cstr("hello world")), 5, 4);
1 0 s.append(String(cstr("hello world")), 5, 4);
1861 1 0 REQUIRE_STRM(s, mstr("abcd1234rty wor"));
1 0 REQUIRE_STRM(s, mstr("abcd1234rty wor"));
1863 10 0 SECTION("foreign class string") {
10 0 SECTION("foreign class string") {
10 0 SECTION("foreign class string") {
10 0 SECTION("foreign class string") {
1 9 SECTION("foreign class string") {
1864 1 0 s.append(String2(cstr("1234")));
1 0 s.append(String2(cstr("1234")));
1 0 s.append(String2(cstr("1234")));
1865 1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1866 1 0 s.append(String2(cstr("qwerty")), 3);
1 0 s.append(String2(cstr("qwerty")), 3);
1 0 s.append(String2(cstr("qwerty")), 3);
1867 1 0 REQUIRE_STRM(s, mstr("abcd1234rty"));
1 0 REQUIRE_STRM(s, mstr("abcd1234rty"));
1868 1 0 s.append(String2(cstr("hello world")), 5, 4);
1 0 s.append(String2(cstr("hello world")), 5, 4);
1 0 s.append(String2(cstr("hello world")), 5, 4);
1869 1 0 REQUIRE_STRM(s, mstr("abcd1234rty wor"));
1 0 REQUIRE_STRM(s, mstr("abcd1234rty wor"));
1871 10 0 SECTION("ptr") {
10 0 SECTION("ptr") {
10 0 SECTION("ptr") {
10 0 SECTION("ptr") {
1 9 SECTION("ptr") {
1872 1 0 s.append(cstr("1234"));
1 0 s.append(cstr("1234"));
1873 1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1874 1 0 s.append(cstr("qwerty"), 3);
1 0 s.append(cstr("qwerty"), 3);
1875 1 0 REQUIRE_STRM(s, mstr("abcd1234qwe"));
1 0 REQUIRE_STRM(s, mstr("abcd1234qwe"));
1877 10 0 SECTION("literal") {
10 0 SECTION("literal") {
10 0 SECTION("literal") {
10 0 SECTION("literal") {
1 9 SECTION("literal") {
1878 1 0 s.append(LITERAL);
1879 1 0 REQUIRE_STRM(s, mstr("abcd") + StdString(LITERAL));
1 0 REQUIRE_STRM(s, mstr("abcd") + StdString(LITERAL));
1 0 REQUIRE_STRM(s, mstr("abcd") + StdString(LITERAL));
1 0 REQUIRE_STRM(s, mstr("abcd") + StdString(LITERAL));
1881 10 0 SECTION("initializer list") {
10 0 SECTION("initializer list") {
10 0 SECTION("initializer list") {
10 0 SECTION("initializer list") {
1 9 SECTION("initializer list") {
1882 1 0 s.append({'1', '2', '3', '4'});
1883 1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1885 10 0 SECTION("string_view") {
10 0 SECTION("string_view") {
10 0 SECTION("string_view") {
10 0 SECTION("string_view") {
1 9 SECTION("string_view") {
1886 1 0 s.append(svstr("1234"));
1 0 s.append(svstr("1234"));
1887 1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1889 10 0 SECTION("self append") {
10 0 SECTION("self append") {
10 0 SECTION("self append") {
10 0 SECTION("self append") {
1 9 SECTION("self append") {
1890 1 0 s = cstr("12345678901234567890");
1 0 s = cstr("12345678901234567890");
1891 1 0 s.append(s);
1892 1 0 REQUIRE_STRM(s, mstr("1234567890123456789012345678901234567890"));
1 0 REQUIRE_STRM(s, mstr("1234567890123456789012345678901234567890"));
1893 1 0 s.append(s, 1, 6);
1894 1 0 REQUIRE_STRM(s, mstr("1234567890123456789012345678901234567890234567"));
1 0 REQUIRE_STRM(s, mstr("1234567890123456789012345678901234567890234567"));
1896 10 0 SECTION("preserve_allocated_when_empty_but_reserved") {
10 0 SECTION("preserve_allocated_when_empty_but_reserved") {
10 0 SECTION("preserve_allocated_when_empty_but_reserved") {
10 0 SECTION("preserve_allocated_when_empty_but_reserved") {
1 9 SECTION("preserve_allocated_when_empty_but_reserved") {
1898 1 0 String s2(cstr("a", 50));
1 0 String s2(cstr("a", 50));
1899 1 0 String s3(cstr("b", 10));
1 0 String s3(cstr("b", 10));
1901 1 0 s.reserve(100);
1902 1 0 CHECK_ALLOCS(1, BUF_CHARS+100);
1903 1 0 s.append(s2);
1904 1 0 CHECK_ALLOCS();
1905 1 0 s.append(s3);
1906 1 0 CHECK_ALLOCS();
1907 1 0 REQUIRE_STR(s, mstr("a",50)+mstr("b",10), 100);
1 0 REQUIRE_STR(s, mstr("a",50)+mstr("b",10), 100);
1 0 REQUIRE_STR(s, mstr("a",50)+mstr("b",10), 100);
1 0 REQUIRE_STR(s, mstr("a",50)+mstr("b",10), 100);
1909 10 0 SECTION("operator +=") {
10 0 SECTION("operator +=") {
10 0 SECTION("operator +=") {
10 0 SECTION("operator +=") {
1 9 SECTION("operator +=") {
1910 1 0 String s(cstr("abcd"));
1 0 String s(cstr("abcd"));
1911 1 0 s += String(cstr("1234"));
1 0 s += String(cstr("1234"));
1 0 s += String(cstr("1234"));
1912 1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1 0 REQUIRE_STRM(s, mstr("abcd1234"));
1913 1 0 s += String2(cstr("qwerty"));
1 0 s += String2(cstr("qwerty"));
1 0 s += String2(cstr("qwerty"));
1914 1 0 REQUIRE_STRM(s, mstr("abcd1234qwerty"));
1 0 REQUIRE_STRM(s, mstr("abcd1234qwerty"));
1915 1 0 s += cstr("hello world");
1 0 s += cstr("hello world");
1916 1 0 REQUIRE_STRM(s, mstr("abcd1234qwertyhello world"));
1 0 REQUIRE_STRM(s, mstr("abcd1234qwertyhello world"));
1917 1 0 s += (T)'x';
1918 1 0 REQUIRE_STRM(s, mstr("abcd1234qwertyhello worldx"));
1 0 REQUIRE_STRM(s, mstr("abcd1234qwertyhello worldx"));
1919 1 0 s += s;
1920 1 0 REQUIRE_STRM(s, mstr("abcd1234qwertyhello worldxabcd1234qwertyhello worldx"));
1 0 REQUIRE_STRM(s, mstr("abcd1234qwertyhello worldxabcd1234qwertyhello worldx"));
1927 12 0 auto lexp = mstr("x", 30);
12 0 auto lexp = mstr("x", 30);
1928 12 0 auto rexp = mstr("y", 40);
12 0 auto rexp = mstr("y", 40);
1930 12 0 SECTION("str-str") {
12 0 SECTION("str-str") {
12 0 SECTION("str-str") {
12 0 SECTION("str-str") {
1 11 SECTION("str-str") {
12 0 SECTION("str-str") {
12 0 SECTION("str-str") {
12 0 SECTION("str-str") {
12 0 SECTION("str-str") {
1 11 SECTION("str-str") {
1931 1 0 String lhs(lexp.c_str());
1 0 String lhs(lexp.c_str());
1932 1 0 FString rhs(rexp.c_str());
1 0 FString rhs(rexp.c_str());
1934 1 0 String s = lhs + rhs;
1 0 String s = lhs + rhs;
1935 1 0 REQUIRE_STR(s, lexp+rexp);
1 0 REQUIRE_STR(s, lexp+rexp);
1 0 REQUIRE_STR(s, lexp+rexp);
1 0 REQUIRE_STR(s, lexp+rexp);
1936 1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1937 1 0 CHECK_ALLOCS(1, BUF_CHARS+70);
1 0 CHECK_ALLOCS(1, BUF_CHARS+70);
1938 1 0 s = EMPTY; get_allocs();
1 0 s = EMPTY; get_allocs();
1939 1 0 s = lhs + empty;
1 0 s = lhs + empty;
1 0 s = lhs + empty;
1 0 s = lhs + empty;
1940 1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1941 1 0 REQUIRE_STR(s, lexp, 0, lexp.size());
1 0 REQUIRE_STR(s, lexp, 0, lexp.size());
1 0 REQUIRE_STR(s, lexp, 0, lexp.size());
1 0 REQUIRE_STR(s, lexp, 0, lexp.size());
1942 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1943 1 0 s = EMPTY;
1 0 s = EMPTY;
1944 1 0 s = empty + rhs;
1 0 s = empty + rhs;
1 0 s = empty + rhs;
1 0 s = empty + rhs;
1945 1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2); // cow
1946 1 0 REQUIRE_STR(s, rexp, 0, rexp.size());
1 0 REQUIRE_STR(s, rexp, 0, rexp.size());
1 0 REQUIRE_STR(s, rexp, 0, rexp.size());
1 0 REQUIRE_STR(s, rexp, 0, rexp.size());
1947 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1949 12 0 SECTION("ptr-str") {
12 0 SECTION("ptr-str") {
12 0 SECTION("ptr-str") {
12 0 SECTION("ptr-str") {
1 11 SECTION("ptr-str") {
12 0 SECTION("ptr-str") {
12 0 SECTION("ptr-str") {
12 0 SECTION("ptr-str") {
12 0 SECTION("ptr-str") {
1 11 SECTION("ptr-str") {
1951 1 0 String rhs(rexp.c_str());
1 0 String rhs(rexp.c_str());
1953 1 0 String s = lhs + rhs;
1 0 String s = lhs + rhs;
1954 1 0 REQUIRE_STR(s, lexp+rexp);
1 0 REQUIRE_STR(s, lexp+rexp);
1 0 REQUIRE_STR(s, lexp+rexp);
1 0 REQUIRE_STR(s, lexp+rexp);
1955 1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1956 1 0 CHECK_ALLOCS(1, BUF_CHARS+lexp.size()+rexp.size());
1 0 CHECK_ALLOCS(1, BUF_CHARS+lexp.size()+rexp.size());
1957 1 0 s = EMPTY; get_allocs();
1 0 s = EMPTY; get_allocs();
1958 1 0 s = lhs + empty;
1 0 s = lhs + empty;
1 0 s = lhs + empty;
1 0 s = lhs + empty;
1959 1 0 REQUIRE_STR(s, lexp);
1 0 REQUIRE_STR(s, lexp);
1 0 REQUIRE_STR(s, lexp);
1 0 REQUIRE_STR(s, lexp);
1960 1 0 CHECK_ALLOCS(1, BUF_CHARS+lexp.size());
1 0 CHECK_ALLOCS(1, BUF_CHARS+lexp.size());
1961 1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
1962 1 0 s = EMPTY; get_allocs();
1 0 s = EMPTY; get_allocs();
1963 1 0 s = cstr("") + rhs;
1 0 s = cstr("") + rhs;
1 0 s = cstr("") + rhs;
1 0 s = cstr("") + rhs;
1 0 s = cstr("") + rhs;
1 0 s = cstr("") + rhs;
1964 1 0 REQUIRE_STR(s, rexp, 0, rexp.size());
1 0 REQUIRE_STR(s, rexp, 0, rexp.size());
1 0 REQUIRE_STR(s, rexp, 0, rexp.size());
1 0 REQUIRE_STR(s, rexp, 0, rexp.size());
1965 1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(rhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1966 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1968 12 0 SECTION("char-str") {
12 0 SECTION("char-str") {
12 0 SECTION("char-str") {
12 0 SECTION("char-str") {
1 11 SECTION("char-str") {
12 0 SECTION("char-str") {
12 0 SECTION("char-str") {
12 0 SECTION("char-str") {
12 0 SECTION("char-str") {
1 11 SECTION("char-str") {
1970 1 0 String rhs(rexp.c_str());
1 0 String rhs(rexp.c_str());
1972 1 0 String s = lhs + rhs;
1 0 String s = lhs + rhs;
1973 1 0 REQUIRE_STR(s, lhs+rexp);
1 0 REQUIRE_STR(s, lhs+rexp);
1 0 REQUIRE_STR(s, lhs+rexp);
1 0 REQUIRE_STR(s, lhs+rexp);
1974 1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1975 1 0 CHECK_ALLOCS(1, BUF_CHARS + rexp.size() + 1);
1 0 CHECK_ALLOCS(1, BUF_CHARS + rexp.size() + 1);
1976 1 0 s = EMPTY; get_allocs();
1 0 s = EMPTY; get_allocs();
1977 1 0 s = lhs + empty;
1 0 s = lhs + empty;
1 0 s = lhs + empty;
1 0 s = lhs + empty;
1978 1 0 REQUIRE_STR(s, mstr("x"), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, mstr("x"), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, mstr("x"), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, mstr("x"), MAX_SSO_CHARS);
1979 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1981 12 0 SECTION("str-ptr") {
12 0 SECTION("str-ptr") {
12 0 SECTION("str-ptr") {
12 0 SECTION("str-ptr") {
1 11 SECTION("str-ptr") {
12 0 SECTION("str-ptr") {
12 0 SECTION("str-ptr") {
12 0 SECTION("str-ptr") {
12 0 SECTION("str-ptr") {
1 11 SECTION("str-ptr") {
1982 1 0 String lhs(lexp.c_str());
1 0 String lhs(lexp.c_str());
1985 1 0 String s = lhs + rhs;
1 0 String s = lhs + rhs;
1986 1 0 REQUIRE_STR(s, lexp+rexp);
1 0 REQUIRE_STR(s, lexp+rexp);
1 0 REQUIRE_STR(s, lexp+rexp);
1 0 REQUIRE_STR(s, lexp+rexp);
1987 1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1988 1 0 CHECK_ALLOCS(1, BUF_CHARS + lexp.size() + rexp.size());
1 0 CHECK_ALLOCS(1, BUF_CHARS + lexp.size() + rexp.size());
1989 1 0 s = EMPTY; get_allocs();
1 0 s = EMPTY; get_allocs();
1990 1 0 s = empty + rhs;
1 0 s = empty + rhs;
1 0 s = empty + rhs;
1 0 s = empty + rhs;
1991 1 0 REQUIRE_STR(s, rexp);
1 0 REQUIRE_STR(s, rexp);
1 0 REQUIRE_STR(s, rexp);
1 0 REQUIRE_STR(s, rexp);
1992 1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
1 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
0 0 REQUIRE(s.use_count() == 1);
1993 1 0 s = EMPTY; get_allocs();
1 0 s = EMPTY; get_allocs();
1994 1 0 s = lhs + cstr("");
1 0 s = lhs + cstr("");
1 0 s = lhs + cstr("");
1 0 s = lhs + cstr("");
1 0 s = lhs + cstr("");
1 0 s = lhs + cstr("");
1995 1 0 REQUIRE_STR(s, lexp, 0, lexp.size());
1 0 REQUIRE_STR(s, lexp, 0, lexp.size());
1 0 REQUIRE_STR(s, lexp, 0, lexp.size());
1 0 REQUIRE_STR(s, lexp, 0, lexp.size());
1996 1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
0 0 REQUIRE(lhs.use_count() == 2); REQUIRE(s.use_count() == 2);
1997 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
1999 12 0 SECTION("str-char") {
12 0 SECTION("str-char") {
12 0 SECTION("str-char") {
12 0 SECTION("str-char") {
1 11 SECTION("str-char") {
12 0 SECTION("str-char") {
12 0 SECTION("str-char") {
12 0 SECTION("str-char") {
12 0 SECTION("str-char") {
1 11 SECTION("str-char") {
2000 1 0 String lhs(lexp.c_str());
1 0 String lhs(lexp.c_str());
2003 1 0 String s = lhs + rhs;
1 0 String s = lhs + rhs;
2004 1 0 REQUIRE_STR(s, lexp+rhs);
1 0 REQUIRE_STR(s, lexp+rhs);
1 0 REQUIRE_STR(s, lexp+rhs);
1 0 REQUIRE_STR(s, lexp+rhs);
2005 1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
2006 1 0 CHECK_ALLOCS(1, BUF_CHARS + lhs.size() + 1);
1 0 CHECK_ALLOCS(1, BUF_CHARS + lhs.size() + 1);
2007 1 0 s = EMPTY; get_allocs();
1 0 s = EMPTY; get_allocs();
2008 1 0 s = empty + rhs;
1 0 s = empty + rhs;
1 0 s = empty + rhs;
1 0 s = empty + rhs;
2009 1 0 REQUIRE_STR(s, mstr("y"), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, mstr("y"), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, mstr("y"), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, mstr("y"), MAX_SSO_CHARS);
2010 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
2012 12 0 SECTION("mstr-str") {
12 0 SECTION("mstr-str") {
12 0 SECTION("mstr-str") {
12 0 SECTION("mstr-str") {
1 11 SECTION("mstr-str") {
12 0 SECTION("mstr-str") {
12 0 SECTION("mstr-str") {
12 0 SECTION("mstr-str") {
12 0 SECTION("mstr-str") {
1 11 SECTION("mstr-str") {
2013 1 0 String lhs(lexp.c_str());
1 0 String lhs(lexp.c_str());
2014 1 0 FString rhs(rexp.c_str());
1 0 FString rhs(rexp.c_str());
2015 1 0 lhs.reserve(200);
1 0 lhs.reserve(200);
2017 1 0 String s = std::move(lhs) + rhs;
1 0 String s = std::move(lhs) + rhs;
2018 1 0 REQUIRE_STR(s, lexp+rexp, 200);
1 0 REQUIRE_STR(s, lexp+rexp, 200);
1 0 REQUIRE_STR(s, lexp+rexp, 200);
1 0 REQUIRE_STR(s, lexp+rexp, 200);
2019 1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
2020 1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
0 0 REQUIRE(!lhs); // lhs moved
0 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
0 0 REQUIRE(!lhs); // lhs moved
0 0 REQUIRE(!lhs); // lhs moved
2021 1 0 REQUIRE_STR(rhs, rexp);
1 0 REQUIRE_STR(rhs, rexp);
1 0 REQUIRE_STR(rhs, rexp);
1 0 REQUIRE_STR(rhs, rexp);
2022 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
2024 12 0 SECTION("str-mstr") {
12 0 SECTION("str-mstr") {
12 0 SECTION("str-mstr") {
12 0 SECTION("str-mstr") {
1 11 SECTION("str-mstr") {
12 0 SECTION("str-mstr") {
12 0 SECTION("str-mstr") {
12 0 SECTION("str-mstr") {
12 0 SECTION("str-mstr") {
1 11 SECTION("str-mstr") {
2025 1 0 String lhs(lexp.c_str());
1 0 String lhs(lexp.c_str());
2026 1 0 FString rhs(rexp.c_str());
1 0 FString rhs(rexp.c_str());
2027 1 0 rhs.reserve(250);
1 0 rhs.reserve(250);
2029 1 0 String s = lhs + std::move(rhs);
1 0 String s = lhs + std::move(rhs);
2030 1 0 REQUIRE_STR(s, lexp+rexp, 250);
1 0 REQUIRE_STR(s, lexp+rexp, 250);
1 0 REQUIRE_STR(s, lexp+rexp, 250);
1 0 REQUIRE_STR(s, lexp+rexp, 250);
2031 1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
2032 1 0 REQUIRE_STR(lhs, lexp);
1 0 REQUIRE_STR(lhs, lexp);
1 0 REQUIRE_STR(lhs, lexp);
1 0 REQUIRE_STR(lhs, lexp);
2033 1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
2034 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
2036 12 0 SECTION("mstr-mstr") { // for now it's just lhs.append(rhs), i.e. the same as mstr-str
12 0 SECTION("mstr-mstr") { // for now it's just lhs.append(rhs), i.e. the same as mstr-str
12 0 SECTION("mstr-mstr") { // for now it's just lhs.append(rhs), i.e. the same as mstr-str
12 0 SECTION("mstr-mstr") { // for now it's just lhs.append(rhs), i.e. the same as mstr-str
1 11 SECTION("mstr-mstr") { // for now it's just lhs.append(rhs), i.e. the same as mstr-str
12 0 SECTION("mstr-mstr") { // for now it's just lhs.append(rhs), i.e. the same as mstr-str
12 0 SECTION("mstr-mstr") { // for now it's just lhs.append(rhs), i.e. the same as mstr-str
12 0 SECTION("mstr-mstr") { // for now it's just lhs.append(rhs), i.e. the same as mstr-str
12 0 SECTION("mstr-mstr") { // for now it's just lhs.append(rhs), i.e. the same as mstr-str
1 11 SECTION("mstr-mstr") { // for now it's just lhs.append(rhs), i.e. the same as mstr-str
2037 1 0 String lhs(lexp.c_str());
1 0 String lhs(lexp.c_str());
2038 1 0 FString rhs(rexp.c_str());
1 0 FString rhs(rexp.c_str());
2039 1 0 lhs.reserve(150);
1 0 lhs.reserve(150);
2041 1 0 String s = std::move(lhs) + std::move(rhs);
1 0 String s = std::move(lhs) + std::move(rhs);
2042 1 0 REQUIRE_STR(s, lexp+rexp, 150);
1 0 REQUIRE_STR(s, lexp+rexp, 150);
1 0 REQUIRE_STR(s, lexp+rexp, 150);
1 0 REQUIRE_STR(s, lexp+rexp, 150);
2043 1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1); // no cows
2044 1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
0 0 REQUIRE(!lhs); // lhs moved
0 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
1 0 REQUIRE(!lhs); // lhs moved
0 0 REQUIRE(!lhs); // lhs moved
0 0 REQUIRE(!lhs); // lhs moved
2045 1 0 REQUIRE_STR(rhs, rexp);
1 0 REQUIRE_STR(rhs, rexp);
1 0 REQUIRE_STR(rhs, rexp);
1 0 REQUIRE_STR(rhs, rexp);
2046 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
2048 12 0 SECTION("ptr-mstr") {
12 0 SECTION("ptr-mstr") {
12 0 SECTION("ptr-mstr") {
12 0 SECTION("ptr-mstr") {
1 11 SECTION("ptr-mstr") {
12 0 SECTION("ptr-mstr") {
12 0 SECTION("ptr-mstr") {
12 0 SECTION("ptr-mstr") {
12 0 SECTION("ptr-mstr") {
1 11 SECTION("ptr-mstr") {
2050 1 0 String rhs(rexp.c_str());
1 0 String rhs(rexp.c_str());
2051 1 0 rhs.reserve(100);
1 0 rhs.reserve(100);
2053 1 0 String s = lhs + std::move(rhs);
1 0 String s = lhs + std::move(rhs);
2054 1 0 REQUIRE_STR(s, lexp+rexp, 100);
1 0 REQUIRE_STR(s, lexp+rexp, 100);
1 0 REQUIRE_STR(s, lexp+rexp, 100);
1 0 REQUIRE_STR(s, lexp+rexp, 100);
2055 1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
2056 1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
2057 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
2059 12 0 SECTION("char-mstr") {
12 0 SECTION("char-mstr") {
12 0 SECTION("char-mstr") {
12 0 SECTION("char-mstr") {
1 11 SECTION("char-mstr") {
12 0 SECTION("char-mstr") {
12 0 SECTION("char-mstr") {
12 0 SECTION("char-mstr") {
12 0 SECTION("char-mstr") {
1 11 SECTION("char-mstr") {
2061 1 0 String rhs(rexp.c_str());
1 0 String rhs(rexp.c_str());
2062 1 0 rhs.reserve(120);
1 0 rhs.reserve(120);
2064 1 0 String s = lhs + std::move(rhs);
1 0 String s = lhs + std::move(rhs);
2065 1 0 REQUIRE_STR(s, lhs+rexp, 120);
1 0 REQUIRE_STR(s, lhs+rexp, 120);
1 0 REQUIRE_STR(s, lhs+rexp, 120);
1 0 REQUIRE_STR(s, lhs+rexp, 120);
2066 1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(rhs.use_count() == 1); REQUIRE(s.use_count() == 1);
2067 1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
1 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
0 0 REQUIRE(!rhs);
2068 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
2070 12 0 SECTION("mstr-ptr") {
12 0 SECTION("mstr-ptr") {
12 0 SECTION("mstr-ptr") {
12 0 SECTION("mstr-ptr") {
1 11 SECTION("mstr-ptr") {
12 0 SECTION("mstr-ptr") {
12 0 SECTION("mstr-ptr") {
12 0 SECTION("mstr-ptr") {
12 0 SECTION("mstr-ptr") {
1 11 SECTION("mstr-ptr") {
2071 1 0 String lhs(lexp.c_str());
1 0 String lhs(lexp.c_str());
2073 1 0 lhs.reserve(300);
1 0 lhs.reserve(300);
2075 1 0 String s = std::move(lhs) + rhs;
1 0 String s = std::move(lhs) + rhs;
2076 1 0 REQUIRE_STR(s, lexp+rexp, 300);
1 0 REQUIRE_STR(s, lexp+rexp, 300);
1 0 REQUIRE_STR(s, lexp+rexp, 300);
1 0 REQUIRE_STR(s, lexp+rexp, 300);
2077 1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
2078 1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
0 0 REQUIRE(!lhs);
0 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
0 0 REQUIRE(!lhs);
0 0 REQUIRE(!lhs);
2079 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
2081 12 0 SECTION("mstr-char") {
12 0 SECTION("mstr-char") {
12 0 SECTION("mstr-char") {
12 0 SECTION("mstr-char") {
1 11 SECTION("mstr-char") {
12 0 SECTION("mstr-char") {
12 0 SECTION("mstr-char") {
12 0 SECTION("mstr-char") {
12 0 SECTION("mstr-char") {
1 11 SECTION("mstr-char") {
2082 1 0 String lhs(lexp.c_str());
1 0 String lhs(lexp.c_str());
2084 1 0 lhs.reserve(400);
1 0 lhs.reserve(400);
2086 1 0 String s = std::move(lhs) + rhs;
1 0 String s = std::move(lhs) + rhs;
2087 1 0 REQUIRE_STR(s, lexp+rhs, 400);
1 0 REQUIRE_STR(s, lexp+rhs, 400);
1 0 REQUIRE_STR(s, lexp+rhs, 400);
1 0 REQUIRE_STR(s, lexp+rhs, 400);
2088 1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
1 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
0 0 REQUIRE(lhs.use_count() == 1); REQUIRE(s.use_count() == 1);
2089 1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
0 0 REQUIRE(!lhs);
0 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
1 0 REQUIRE(!lhs);
0 0 REQUIRE(!lhs);
0 0 REQUIRE(!lhs);
2090 1 0 CHECK_ALLOCS();
1 0 CHECK_ALLOCS();
2095 32 0 auto exp = mstr("a", cnt);
2096 16 16 String s = is_external ? create_external<>(exp) : String(exp.c_str());
16 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
16 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
16 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
16 16 String s = is_external ? create_external<>(exp) : String(exp.c_str());
16 16 String s = is_external ? create_external<>(exp) : String(exp.c_str());
0 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
0 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
2098 32 0 SECTION("end") {
32 0 SECTION("end") {
32 0 SECTION("end") {
32 0 SECTION("end") {
10 22 SECTION("end") {
2099 10 0 SECTION("has end space") {
10 0 SECTION("has end space") {
10 0 SECTION("has end space") {
10 0 SECTION("has end space") {
2 8 SECTION("has end space") {
2101 2 0 s.insert(s.length(), cstr(" world"));
2 0 s.insert(s.length(), cstr(" world"));
2102 2 0 REQUIRE_STR(s, mstr("a", cnt-6)+mstr(" world"), cnt);
2 0 REQUIRE_STR(s, mstr("a", cnt-6)+mstr(" world"), cnt);
2 0 REQUIRE_STR(s, mstr("a", cnt-6)+mstr(" world"), cnt);
2 0 REQUIRE_STR(s, mstr("a", cnt-6)+mstr(" world"), cnt);
2103 2 0 CHECK_ALLOCS();
2105 10 0 SECTION("has head space") {
10 0 SECTION("has head space") {
10 0 SECTION("has head space") {
10 0 SECTION("has head space") {
2 8 SECTION("has head space") {
2106 2 0 s.offset(cnt - 3);
2107 2 0 s.insert(s.length(), cstr(" world"));
2 0 s.insert(s.length(), cstr(" world"));
2108 2 0 REQUIRE_STR(s, mstr("aaa world"), cnt);
2 0 REQUIRE_STR(s, mstr("aaa world"), cnt);
2109 2 0 CHECK_ALLOCS();
2111 10 0 SECTION("has both space") {
10 0 SECTION("has both space") {
10 0 SECTION("has both space") {
10 0 SECTION("has both space") {
2 8 SECTION("has both space") {
2112 2 0 s.offset(4, 3);
2113 2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
0 0 REQUIRE(s.capacity() >= 7);
0 0 REQUIRE(s.capacity() >= 7);
2114 2 0 s.insert(s.length(), cstr(" XX"));
2 0 s.insert(s.length(), cstr(" XX"));
2115 2 0 REQUIRE_STR(s, mstr("aaa XX"), cnt-4);
2 0 REQUIRE_STR(s, mstr("aaa XX"), cnt-4);
2116 2 0 CHECK_ALLOCS();
2118 10 0 SECTION("has summary space") {
10 0 SECTION("has summary space") {
10 0 SECTION("has summary space") {
10 0 SECTION("has summary space") {
2 8 SECTION("has summary space") {
2119 2 0 s.offset(4, cnt-8); // 4 free from head and tail
2120 2 0 s.insert(s.length(), cstr("world")); // 5 inserted
2 0 s.insert(s.length(), cstr("world")); // 5 inserted
2121 2 0 REQUIRE_STR(s, mstr("a", cnt-8)+mstr("world"), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("a", cnt-8)+mstr("world"), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("a", cnt-8)+mstr("world"), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("a", cnt-8)+mstr("world"), cnt); // moved to the beginning
2122 2 0 CHECK_ALLOCS();
2124 10 0 SECTION("has no space") {
10 0 SECTION("has no space") {
10 0 SECTION("has no space") {
10 0 SECTION("has no space") {
2 8 SECTION("has no space") {
2125 2 0 s.offset(2, cnt-4); // 2 free from head and tail
2126 2 0 s.insert(s.length(), cstr("world")); // 5 insterted
2 0 s.insert(s.length(), cstr("world")); // 5 insterted
2127 2 0 REQUIRE_STR(s, mstr("a", cnt-4)+mstr("world"), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("a", cnt-4)+mstr("world"), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("a", cnt-4)+mstr("world"), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("a", cnt-4)+mstr("world"), cnt+1); // moved to the beginning
2129 2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
0 0 REQUIRE(stat.allocated_cnt == 1);
0 0 REQUIRE(stat.allocated_cnt == 1);
2130 2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
0 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
0 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2133 32 0 SECTION("begin") {
32 0 SECTION("begin") {
32 0 SECTION("begin") {
32 0 SECTION("begin") {
10 22 SECTION("begin") {
2134 10 0 SECTION("has end space") {
10 0 SECTION("has end space") {
10 0 SECTION("has end space") {
10 0 SECTION("has end space") {
2 8 SECTION("has end space") {
2136 2 0 s.insert(0, cstr("world "));
2 0 s.insert(0, cstr("world "));
2137 2 0 REQUIRE_STR(s, mstr("world ")+mstr("a",cnt-6), cnt);
2 0 REQUIRE_STR(s, mstr("world ")+mstr("a",cnt-6), cnt);
2 0 REQUIRE_STR(s, mstr("world ")+mstr("a",cnt-6), cnt);
2 0 REQUIRE_STR(s, mstr("world ")+mstr("a",cnt-6), cnt);
2138 2 0 CHECK_ALLOCS();
2140 10 0 SECTION("has head space") {
10 0 SECTION("has head space") {
10 0 SECTION("has head space") {
10 0 SECTION("has head space") {
2 8 SECTION("has head space") {
2141 2 0 s.offset(cnt - 3);
2142 2 0 s.insert(0, cstr("world "));
2 0 s.insert(0, cstr("world "));
2143 2 0 REQUIRE_STR(s, mstr("world aaa"), 9);
2 0 REQUIRE_STR(s, mstr("world aaa"), 9);
2144 2 0 CHECK_ALLOCS();
2146 10 0 SECTION("has both space") {
10 0 SECTION("has both space") {
10 0 SECTION("has both space") {
10 0 SECTION("has both space") {
2 8 SECTION("has both space") {
2147 2 0 s.offset(3, 4);
2148 2 0 REQUIRE(s.capacity() >= 8);
2 0 REQUIRE(s.capacity() >= 8);
2 0 REQUIRE(s.capacity() >= 8);
2 0 REQUIRE(s.capacity() >= 8);
2 0 REQUIRE(s.capacity() >= 8);
0 0 REQUIRE(s.capacity() >= 8);
0 0 REQUIRE(s.capacity() >= 8);
2149 2 0 s.insert(0, cstr("X "));
2 0 s.insert(0, cstr("X "));
2150 2 0 REQUIRE_STR(s, mstr("X aaaa"), cnt-1);
2 0 REQUIRE_STR(s, mstr("X aaaa"), cnt-1);
2151 2 0 CHECK_ALLOCS();
2153 10 0 SECTION("has summary space") {
10 0 SECTION("has summary space") {
10 0 SECTION("has summary space") {
10 0 SECTION("has summary space") {
2 8 SECTION("has summary space") {
2154 2 0 s.offset(4, cnt-8); // 4 free from head and tail
2155 2 0 s.insert(0, cstr("world")); // 5 insterted
2 0 s.insert(0, cstr("world")); // 5 insterted
2156 2 0 REQUIRE_STR(s, mstr("world")+mstr("a",cnt-8), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("world")+mstr("a",cnt-8), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("world")+mstr("a",cnt-8), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("world")+mstr("a",cnt-8), cnt); // moved to the beginning
2157 2 0 CHECK_ALLOCS();
2159 10 0 SECTION("has no space") {
10 0 SECTION("has no space") {
10 0 SECTION("has no space") {
10 0 SECTION("has no space") {
2 8 SECTION("has no space") {
2160 2 0 s.offset(2, cnt-4); // 2 free from head and tail
2161 2 0 s.insert(0, cstr("world")); // 5 insterted
2 0 s.insert(0, cstr("world")); // 5 insterted
2162 2 0 REQUIRE_STR(s, mstr("world")+mstr("a",cnt-4), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("world")+mstr("a",cnt-4), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("world")+mstr("a",cnt-4), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("world")+mstr("a",cnt-4), cnt+1); // moved to the beginning
2164 2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
0 0 REQUIRE(stat.allocated_cnt == 1);
0 0 REQUIRE(stat.allocated_cnt == 1);
2165 2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
0 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
0 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2168 32 0 SECTION("middle") {
32 0 SECTION("middle") {
32 0 SECTION("middle") {
32 0 SECTION("middle") {
12 20 SECTION("middle") {
2169 12 0 SECTION("has end space") {
12 0 SECTION("has end space") {
12 0 SECTION("has end space") {
12 0 SECTION("has end space") {
2 10 SECTION("has end space") {
2171 2 0 s.insert(2, cstr("world "));
2 0 s.insert(2, cstr("world "));
2172 2 0 REQUIRE_STR(s, mstr("aaworld ")+mstr("a",cnt-8), cnt);
2 0 REQUIRE_STR(s, mstr("aaworld ")+mstr("a",cnt-8), cnt);
2 0 REQUIRE_STR(s, mstr("aaworld ")+mstr("a",cnt-8), cnt);
2 0 REQUIRE_STR(s, mstr("aaworld ")+mstr("a",cnt-8), cnt);
2173 2 0 CHECK_ALLOCS();
2175 12 0 SECTION("has head space") {
12 0 SECTION("has head space") {
12 0 SECTION("has head space") {
12 0 SECTION("has head space") {
2 10 SECTION("has head space") {
2176 2 0 s.offset(cnt - 3);
2177 2 0 s.insert(2, cstr("world "));
2 0 s.insert(2, cstr("world "));
2178 2 0 REQUIRE_STR(s, mstr("aaworld a"), 9);
2 0 REQUIRE_STR(s, mstr("aaworld a"), 9);
2179 2 0 CHECK_ALLOCS();
2181 12 0 SECTION("has both space, head is shorter") {
12 0 SECTION("has both space, head is shorter") {
12 0 SECTION("has both space, head is shorter") {
12 0 SECTION("has both space, head is shorter") {
2 10 SECTION("has both space, head is shorter") {
2182 2 0 s.offset(4, 3);
2183 2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
0 0 REQUIRE(s.capacity() >= 7);
0 0 REQUIRE(s.capacity() >= 7);
2184 2 0 s.insert(1, cstr(" X ")); // head is moved (3 bytes left)
2 0 s.insert(1, cstr(" X ")); // head is moved (3 bytes left)
2185 2 0 REQUIRE_STR(s, mstr("a X aa"), cnt-1);
2 0 REQUIRE_STR(s, mstr("a X aa"), cnt-1);
2186 2 0 CHECK_ALLOCS();
2188 12 0 SECTION("has both space, tail is shorter") {
12 0 SECTION("has both space, tail is shorter") {
12 0 SECTION("has both space, tail is shorter") {
12 0 SECTION("has both space, tail is shorter") {
2 10 SECTION("has both space, tail is shorter") {
2189 2 0 s.offset(4, 3);
2190 2 0 s.insert(2, cstr(" X ")); // tail is moved (3 bytes right)
2 0 s.insert(2, cstr(" X ")); // tail is moved (3 bytes right)
2191 2 0 REQUIRE_STR(s, mstr("aa X a"), cnt-4);
2 0 REQUIRE_STR(s, mstr("aa X a"), cnt-4);
2192 2 0 CHECK_ALLOCS();
2194 12 0 SECTION("has summary space") {
12 0 SECTION("has summary space") {
12 0 SECTION("has summary space") {
12 0 SECTION("has summary space") {
2 10 SECTION("has summary space") {
2195 2 0 s.offset(4, cnt-8); // 4 free from head and tail
2196 2 0 s.insert(2, cstr("world")); // 5 insterted
2 0 s.insert(2, cstr("world")); // 5 insterted
2197 2 0 REQUIRE_STR(s, mstr("aaworld")+mstr("a",cnt-10), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaworld")+mstr("a",cnt-10), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaworld")+mstr("a",cnt-10), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaworld")+mstr("a",cnt-10), cnt); // moved to the beginning
2198 2 0 CHECK_ALLOCS();
2200 12 0 SECTION("has no space") {
12 0 SECTION("has no space") {
12 0 SECTION("has no space") {
12 0 SECTION("has no space") {
2 10 SECTION("has no space") {
2201 2 0 s.offset(2, cnt-4); // 2 free from head and tail
2202 2 0 s.insert(2, cstr("world")); // 5 insterted
2 0 s.insert(2, cstr("world")); // 5 insterted
2203 2 0 REQUIRE_STR(s, mstr("aaworld")+mstr("a",cnt-6), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaworld")+mstr("a",cnt-6), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaworld")+mstr("a",cnt-6), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaworld")+mstr("a",cnt-6), cnt+1); // moved to the beginning
2205 2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
0 0 REQUIRE(stat.allocated_cnt == 1);
0 0 REQUIRE(stat.allocated_cnt == 1);
2206 2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
0 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
0 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2212 6 0 auto exp = mstr("a", 50);
2213 3 3 String s = is_external ? create_external<>(exp) : String(exp.c_str());
3 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
3 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
3 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
3 3 String s = is_external ? create_external<>(exp) : String(exp.c_str());
3 3 String s = is_external ? create_external<>(exp) : String(exp.c_str());
0 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
0 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
2215 6 0 String tmp(s);
2217 6 0 SECTION("end") {
6 0 SECTION("end") {
6 0 SECTION("end") {
6 0 SECTION("end") {
2 4 SECTION("end") {
2219 2 0 s.insert(s.length(), cstr("hello"));
2 0 s.insert(s.length(), cstr("hello"));
2220 2 0 REQUIRE_STR(s, mstr("a", 40)+mstr("hello"), 45);
2 0 REQUIRE_STR(s, mstr("a", 40)+mstr("hello"), 45);
2 0 REQUIRE_STR(s, mstr("a", 40)+mstr("hello"), 45);
2 0 REQUIRE_STR(s, mstr("a", 40)+mstr("hello"), 45);
2221 2 0 CHECK_ALLOCS(1, BUF_CHARS+45);
2223 6 0 SECTION("begin") {
6 0 SECTION("begin") {
6 0 SECTION("begin") {
6 0 SECTION("begin") {
2 4 SECTION("begin") {
2224 2 0 s.offset(10, 30);
2225 2 0 s.insert(0, cstr("hello"));
2 0 s.insert(0, cstr("hello"));
2226 2 0 REQUIRE_STR(s, mstr("hello")+mstr("a",30), 35);
2 0 REQUIRE_STR(s, mstr("hello")+mstr("a",30), 35);
2 0 REQUIRE_STR(s, mstr("hello")+mstr("a",30), 35);
2 0 REQUIRE_STR(s, mstr("hello")+mstr("a",30), 35);
2227 2 0 CHECK_ALLOCS(1, BUF_CHARS+35);
2229 6 0 SECTION("middle") {
6 0 SECTION("middle") {
6 0 SECTION("middle") {
6 0 SECTION("middle") {
2 4 SECTION("middle") {
2230 2 0 s.offset(10, 30);
2231 2 0 s.insert(5, cstr("hello"));
2 0 s.insert(5, cstr("hello"));
2232 2 0 REQUIRE_STR(s, mstr("aaaaahello")+mstr("a",25), 35);
2 0 REQUIRE_STR(s, mstr("aaaaahello")+mstr("a",25), 35);
2 0 REQUIRE_STR(s, mstr("aaaaahello")+mstr("a",25), 35);
2 0 REQUIRE_STR(s, mstr("aaaaahello")+mstr("a",25), 35);
2233 2 0 CHECK_ALLOCS(1, BUF_CHARS+35);
2240 56 0 SECTION("literal") {
56 0 SECTION("literal") {
56 0 SECTION("literal") {
56 0 SECTION("literal") {
3 53 SECTION("literal") {
2242 3 0 SECTION("end") {
3 0 SECTION("end") {
3 0 SECTION("end") {
3 0 SECTION("end") {
1 2 SECTION("end") {
2243 1 0 auto exp = mstr(" hello");
2245 1 0 s.insert(s.length(), exp.c_str());
2246 1 0 REQUIRE_STR(s, StdString(LITERAL)+exp);
1 0 REQUIRE_STR(s, StdString(LITERAL)+exp);
1 0 REQUIRE_STR(s, StdString(LITERAL)+exp);
2247 1 0 CHECK_ALLOCS(1, BUF_CHARS + LITERAL_LEN + exp.size());
2249 3 0 SECTION("begin") {
3 0 SECTION("begin") {
3 0 SECTION("begin") {
3 0 SECTION("begin") {
1 2 SECTION("begin") {
2250 1 0 auto exp = mstr("hello ");
2252 1 0 s.insert(0, exp.c_str());
2253 1 0 REQUIRE_STR(s, exp + StdString(LITERAL));
1 0 REQUIRE_STR(s, exp + StdString(LITERAL));
1 0 REQUIRE_STR(s, exp + StdString(LITERAL));
2254 1 0 CHECK_ALLOCS(1, BUF_CHARS + LITERAL_LEN + exp.size());
2256 3 0 SECTION("middle") {
3 0 SECTION("middle") {
3 0 SECTION("middle") {
3 0 SECTION("middle") {
1 2 SECTION("middle") {
2257 1 0 auto exp = mstr("epta");
2259 1 0 s.insert(5, exp.c_str());
2260 1 0 auto tmp = StdString(LITERAL);
2261 1 0 tmp.insert(5, exp);
2262 1 0 REQUIRE_STR(s, tmp);
1 0 REQUIRE_STR(s, tmp);
2263 1 0 CHECK_ALLOCS(1, BUF_CHARS+tmp.size());
2268 56 0 SECTION("internal") { test_insert_impl(50, false); }
56 0 SECTION("internal") { test_insert_impl(50, false); }
56 0 SECTION("internal") { test_insert_impl(50, false); }
56 0 SECTION("internal") { test_insert_impl(50, false); }
16 40 SECTION("internal") { test_insert_impl(50, false); }
16 0 SECTION("internal") { test_insert_impl(50, false); }
2269 56 0 SECTION("external") { test_insert_impl(50, true); }
56 0 SECTION("external") { test_insert_impl(50, true); }
56 0 SECTION("external") { test_insert_impl(50, true); }
56 0 SECTION("external") { test_insert_impl(50, true); }
16 40 SECTION("external") { test_insert_impl(50, true); }
16 0 SECTION("external") { test_insert_impl(50, true); }
2271 56 0 String s (cstr("hello, world"));
56 0 String s (cstr("hello, world"));
2272 56 0 String a (cstr(" suka"));
56 0 String a (cstr(" suka"));
2273 56 0 String2 a2(cstr(" suka"));
56 0 String2 a2(cstr(" suka"));
2275 56 0 SECTION("str") {
56 0 SECTION("str") {
56 0 SECTION("str") {
56 0 SECTION("str") {
1 55 SECTION("str") {
2276 1 0 s.insert(5, a);
2277 1 0 REQUIRE_STRM(s, mstr("hello suka, world"));
1 0 REQUIRE_STRM(s, mstr("hello suka, world"));
2278 1 0 REQUIRE_THROWS(s.insert(1000, a));
1 0 REQUIRE_THROWS(s.insert(1000, a));
1 0 REQUIRE_THROWS(s.insert(1000, a));
0 1 REQUIRE_THROWS(s.insert(1000, a));
0 0 REQUIRE_THROWS(s.insert(1000, a));
0 0 REQUIRE_THROWS(s.insert(1000, a));
1 0 REQUIRE_THROWS(s.insert(1000, a));
1 0 REQUIRE_THROWS(s.insert(1000, a));
1 0 REQUIRE_THROWS(s.insert(1000, a));
2280 56 0 SECTION("fstr") {
56 0 SECTION("fstr") {
56 0 SECTION("fstr") {
56 0 SECTION("fstr") {
1 55 SECTION("fstr") {
2281 1 0 s.insert(6, a2);
2282 1 0 REQUIRE_STRM(s, mstr("hello, suka world"));
1 0 REQUIRE_STRM(s, mstr("hello, suka world"));
2284 56 0 SECTION("str&pos") {
56 0 SECTION("str&pos") {
56 0 SECTION("str&pos") {
56 0 SECTION("str&pos") {
1 55 SECTION("str&pos") {
2285 1 0 s.insert(5, a, 2);
2286 1 0 REQUIRE_STRM(s, mstr("hellouka, world"));
1 0 REQUIRE_STRM(s, mstr("hellouka, world"));
2288 56 0 SECTION("str&pos/len") {
56 0 SECTION("str&pos/len") {
56 0 SECTION("str&pos/len") {
56 0 SECTION("str&pos/len") {
1 55 SECTION("str&pos/len") {
2289 1 0 s.insert(5, a, 2, 2);
2290 1 0 REQUIRE_STRM(s, mstr("hellouk, world"));
1 0 REQUIRE_STRM(s, mstr("hellouk, world"));
2292 56 0 SECTION("fstr&pos/len") {
56 0 SECTION("fstr&pos/len") {
56 0 SECTION("fstr&pos/len") {
56 0 SECTION("fstr&pos/len") {
1 55 SECTION("fstr&pos/len") {
2293 1 0 s.insert(6, a2, 1, 2);
2294 1 0 REQUIRE_STRM(s, mstr("hello,su world"));
1 0 REQUIRE_STRM(s, mstr("hello,su world"));
2296 56 0 SECTION("ptr") {
56 0 SECTION("ptr") {
56 0 SECTION("ptr") {
56 0 SECTION("ptr") {
1 55 SECTION("ptr") {
2297 1 0 s.insert(10, cstr("123"));
1 0 s.insert(10, cstr("123"));
2298 1 0 REQUIRE_STRM(s, mstr("hello, wor123ld"));
1 0 REQUIRE_STRM(s, mstr("hello, wor123ld"));
2300 56 0 SECTION("ptr&len") {
56 0 SECTION("ptr&len") {
56 0 SECTION("ptr&len") {
56 0 SECTION("ptr&len") {
1 55 SECTION("ptr&len") {
2301 1 0 s.insert(10, cstr("123"), 2);
1 0 s.insert(10, cstr("123"), 2);
2302 1 0 REQUIRE_STRM(s, mstr("hello, wor12ld"));
1 0 REQUIRE_STRM(s, mstr("hello, wor12ld"));
2304 56 0 SECTION("=literal=") {
56 0 SECTION("=literal=") {
56 0 SECTION("=literal=") {
56 0 SECTION("=literal=") {
1 55 SECTION("=literal=") {
2305 1 0 s.insert(7, LITERAL);
2306 1 0 REQUIRE_STRM(s, mstr("hello, ")+StdString(LITERAL)+mstr("world"));
1 0 REQUIRE_STRM(s, mstr("hello, ")+StdString(LITERAL)+mstr("world"));
1 0 REQUIRE_STRM(s, mstr("hello, ")+StdString(LITERAL)+mstr("world"));
1 0 REQUIRE_STRM(s, mstr("hello, ")+StdString(LITERAL)+mstr("world"));
1 0 REQUIRE_STRM(s, mstr("hello, ")+StdString(LITERAL)+mstr("world"));
1 0 REQUIRE_STRM(s, mstr("hello, ")+StdString(LITERAL)+mstr("world"));
2308 56 0 SECTION("count char") {
56 0 SECTION("count char") {
56 0 SECTION("count char") {
56 0 SECTION("count char") {
1 55 SECTION("count char") {
2309 1 0 s.insert(2, 5, (T)'x');
2310 1 0 REQUIRE_STRM(s, mstr("hexxxxxllo, world"));
1 0 REQUIRE_STRM(s, mstr("hexxxxxllo, world"));
2312 56 0 SECTION("iterator count char") {
56 0 SECTION("iterator count char") {
56 0 SECTION("iterator count char") {
56 0 SECTION("iterator count char") {
1 55 SECTION("iterator count char") {
2313 1 0 auto it = s.insert(s.cbegin()+3, 5, (T)'y');
1 0 auto it = s.insert(s.cbegin()+3, 5, (T)'y');
2314 1 0 REQUIRE(*it == (T)'y');
1 0 REQUIRE(*it == (T)'y');
1 0 REQUIRE(*it == (T)'y');
1 0 REQUIRE(*it == (T)'y');
1 0 REQUIRE(*it == (T)'y');
1 0 REQUIRE(*it == (T)'y');
0 0 REQUIRE(*it == (T)'y');
0 0 REQUIRE(*it == (T)'y');
2315 1 0 REQUIRE(*(it-1) == (T)'l');
1 0 REQUIRE(*(it-1) == (T)'l');
1 0 REQUIRE(*(it-1) == (T)'l');
1 0 REQUIRE(*(it-1) == (T)'l');
1 0 REQUIRE(*(it-1) == (T)'l');
1 0 REQUIRE(*(it-1) == (T)'l');
1 0 REQUIRE(*(it-1) == (T)'l');
0 0 REQUIRE(*(it-1) == (T)'l');
0 0 REQUIRE(*(it-1) == (T)'l');
2316 1 0 REQUIRE_STRM(s, mstr("helyyyyylo, world"));
1 0 REQUIRE_STRM(s, mstr("helyyyyylo, world"));
2318 56 0 SECTION("iterator char") {
56 0 SECTION("iterator char") {
56 0 SECTION("iterator char") {
56 0 SECTION("iterator char") {
1 55 SECTION("iterator char") {
2319 1 0 auto it = s.insert(s.cbegin()+5, (T)'z');
1 0 auto it = s.insert(s.cbegin()+5, (T)'z');
2320 1 0 REQUIRE(*it == (T)'z');
1 0 REQUIRE(*it == (T)'z');
1 0 REQUIRE(*it == (T)'z');
1 0 REQUIRE(*it == (T)'z');
1 0 REQUIRE(*it == (T)'z');
1 0 REQUIRE(*it == (T)'z');
0 0 REQUIRE(*it == (T)'z');
0 0 REQUIRE(*it == (T)'z');
2321 1 0 REQUIRE(*(it-1) == (T)'o');
1 0 REQUIRE(*(it-1) == (T)'o');
1 0 REQUIRE(*(it-1) == (T)'o');
1 0 REQUIRE(*(it-1) == (T)'o');
1 0 REQUIRE(*(it-1) == (T)'o');
1 0 REQUIRE(*(it-1) == (T)'o');
1 0 REQUIRE(*(it-1) == (T)'o');
0 0 REQUIRE(*(it-1) == (T)'o');
0 0 REQUIRE(*(it-1) == (T)'o');
2322 1 0 REQUIRE_STRM(s, mstr("helloz, world"));
1 0 REQUIRE_STRM(s, mstr("helloz, world"));
2324 56 0 SECTION("initializer list") {
56 0 SECTION("initializer list") {
56 0 SECTION("initializer list") {
56 0 SECTION("initializer list") {
1 55 SECTION("initializer list") {
2325 1 0 s.insert(s.cbegin()+1, {(T)'h', (T)'i'});
1 0 s.insert(s.cbegin()+1, {(T)'h', (T)'i'});
2326 1 0 REQUIRE_STRM(s, mstr("hhiello, world"));
1 0 REQUIRE_STRM(s, mstr("hhiello, world"));
2328 56 0 SECTION("string_view") {
56 0 SECTION("string_view") {
56 0 SECTION("string_view") {
56 0 SECTION("string_view") {
1 55 SECTION("string_view") {
2329 1 0 s.insert(9, svstr("x", 5));
1 0 s.insert(9, svstr("x", 5));
2330 1 0 REQUIRE_STRM(s, mstr("hello, woxxxxxrld"));
1 0 REQUIRE_STRM(s, mstr("hello, woxxxxxrld"));
2333 56 0 SECTION("internal cow") { test_insert_cow(false); }
56 0 SECTION("internal cow") { test_insert_cow(false); }
56 0 SECTION("internal cow") { test_insert_cow(false); }
56 0 SECTION("internal cow") { test_insert_cow(false); }
3 53 SECTION("internal cow") { test_insert_cow(false); }
3 0 SECTION("internal cow") { test_insert_cow(false); }
2334 56 0 SECTION("external cow") { test_insert_cow(true); }
56 0 SECTION("external cow") { test_insert_cow(true); }
56 0 SECTION("external cow") { test_insert_cow(true); }
56 0 SECTION("external cow") { test_insert_cow(true); }
3 53 SECTION("external cow") { test_insert_cow(true); }
3 0 SECTION("external cow") { test_insert_cow(true); }
2336 56 0 SECTION("self") {
56 0 SECTION("self") {
56 0 SECTION("self") {
56 0 SECTION("self") {
1 55 SECTION("self") {
2337 1 0 s = cstr("a", 20);
1 0 s = cstr("a", 20);
2338 1 0 s.insert(10, s);
2339 1 0 REQUIRE_STRM(s, mstr("a", 40));
1 0 REQUIRE_STRM(s, mstr("a", 40));
2341 56 0 SECTION("self&pos/len") {
56 0 SECTION("self&pos/len") {
56 0 SECTION("self&pos/len") {
56 0 SECTION("self&pos/len") {
1 55 SECTION("self&pos/len") {
2342 1 0 s = cstr("a", 20);
1 0 s = cstr("a", 20);
2343 1 0 s.insert(10, s, 5, 10);
2344 1 0 REQUIRE_STRM(s, mstr("a", 30));
1 0 REQUIRE_STRM(s, mstr("a", 30));
2350 14 0 auto exp = mstr("a", cnt);
2351 7 7 String s = is_external ? create_external<>(exp) : String(exp.c_str());
7 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
7 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
7 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
7 7 String s = is_external ? create_external<>(exp) : String(exp.c_str());
7 7 String s = is_external ? create_external<>(exp) : String(exp.c_str());
0 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
0 0 String s = is_external ? create_external<>(exp) : String(exp.c_str());
2354 14 0 SECTION("shrink") {
14 0 SECTION("shrink") {
14 0 SECTION("shrink") {
14 0 SECTION("shrink") {
2 12 SECTION("shrink") {
2355 2 0 s.replace(3, 4, cstr("hi"));
2 0 s.replace(3, 4, cstr("hi"));
2356 2 0 REQUIRE_STR(s, mstr("a",3)+mstr("hi")+mstr("a",cnt-7), cnt);
2 0 REQUIRE_STR(s, mstr("a",3)+mstr("hi")+mstr("a",cnt-7), cnt);
2 0 REQUIRE_STR(s, mstr("a",3)+mstr("hi")+mstr("a",cnt-7), cnt);
2 0 REQUIRE_STR(s, mstr("a",3)+mstr("hi")+mstr("a",cnt-7), cnt);
2 0 REQUIRE_STR(s, mstr("a",3)+mstr("hi")+mstr("a",cnt-7), cnt);
2 0 REQUIRE_STR(s, mstr("a",3)+mstr("hi")+mstr("a",cnt-7), cnt);
2357 2 0 CHECK_ALLOCS();
2358 2 0 s.replace(0, 4, EMPTY);
2359 2 0 REQUIRE_STR(s, mstr("i")+mstr("a",cnt-7), cnt-4);
2 0 REQUIRE_STR(s, mstr("i")+mstr("a",cnt-7), cnt-4);
2 0 REQUIRE_STR(s, mstr("i")+mstr("a",cnt-7), cnt-4);
2 0 REQUIRE_STR(s, mstr("i")+mstr("a",cnt-7), cnt-4);
2360 2 0 CHECK_ALLOCS();
2363 14 0 SECTION("grow") {
14 0 SECTION("grow") {
14 0 SECTION("grow") {
14 0 SECTION("grow") {
12 2 SECTION("grow") {
2364 12 0 SECTION("has end space") {
12 0 SECTION("has end space") {
12 0 SECTION("has end space") {
12 0 SECTION("has end space") {
2 10 SECTION("has end space") {
2366 2 0 s.replace(3, 3, cstr("world "));
2 0 s.replace(3, 3, cstr("world "));
2367 2 0 REQUIRE_STR(s, mstr("aaaworld ")+mstr("a",cnt-9), cnt);
2 0 REQUIRE_STR(s, mstr("aaaworld ")+mstr("a",cnt-9), cnt);
2 0 REQUIRE_STR(s, mstr("aaaworld ")+mstr("a",cnt-9), cnt);
2 0 REQUIRE_STR(s, mstr("aaaworld ")+mstr("a",cnt-9), cnt);
2368 2 0 CHECK_ALLOCS();
2370 12 0 SECTION("has head space") {
12 0 SECTION("has head space") {
12 0 SECTION("has head space") {
12 0 SECTION("has head space") {
2 10 SECTION("has head space") {
2371 2 0 s.offset(4);
2372 2 0 s.replace(2, 2, cstr(" XX "));
2 0 s.replace(2, 2, cstr(" XX "));
2373 2 0 REQUIRE_STR(s, mstr("aa XX ")+mstr("a",cnt-8), cnt-2);
2 0 REQUIRE_STR(s, mstr("aa XX ")+mstr("a",cnt-8), cnt-2);
2 0 REQUIRE_STR(s, mstr("aa XX ")+mstr("a",cnt-8), cnt-2);
2 0 REQUIRE_STR(s, mstr("aa XX ")+mstr("a",cnt-8), cnt-2);
2374 2 0 CHECK_ALLOCS();
2376 12 0 SECTION("has both space, head is shorter") {
12 0 SECTION("has both space, head is shorter") {
12 0 SECTION("has both space, head is shorter") {
12 0 SECTION("has both space, head is shorter") {
2 10 SECTION("has both space, head is shorter") {
2377 2 0 s.offset(3, 4);
2378 2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
2 0 REQUIRE(s.capacity() >= 7);
0 0 REQUIRE(s.capacity() >= 7);
0 0 REQUIRE(s.capacity() >= 7);
2379 2 0 s.replace(1,2, cstr(" XX ")); // head is moved
2 0 s.replace(1,2, cstr(" XX ")); // head is moved
2380 2 0 REQUIRE_STR(s, mstr("a XX a"), cnt-1);
2 0 REQUIRE_STR(s, mstr("a XX a"), cnt-1);
2381 2 0 CHECK_ALLOCS();
2383 12 0 SECTION("has both space, tail is shorter") {
12 0 SECTION("has both space, tail is shorter") {
12 0 SECTION("has both space, tail is shorter") {
12 0 SECTION("has both space, tail is shorter") {
2 10 SECTION("has both space, tail is shorter") {
2384 2 0 s.offset(3, 4);
2385 2 0 s.replace(2,1, cstr(" XX ")); // tail is moved
2 0 s.replace(2,1, cstr(" XX ")); // tail is moved
2386 2 0 REQUIRE_STR(s, mstr("aa XX a"), cnt-3);
2 0 REQUIRE_STR(s, mstr("aa XX a"), cnt-3);
2387 2 0 CHECK_ALLOCS();
2389 12 0 SECTION("has summary space") {
12 0 SECTION("has summary space") {
12 0 SECTION("has summary space") {
12 0 SECTION("has summary space") {
2 10 SECTION("has summary space") {
2390 2 0 s.offset(3, cnt-6); // 3 free from head and tail
2391 2 0 s.replace(2,2, cstr("XXXXXXX")); // 5 inserted
2 0 s.replace(2,2, cstr("XXXXXXX")); // 5 inserted
2392 2 0 REQUIRE_STR(s, mstr("aaXXXXXXX")+mstr("a",cnt-10), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaXXXXXXX")+mstr("a",cnt-10), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaXXXXXXX")+mstr("a",cnt-10), cnt); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaXXXXXXX")+mstr("a",cnt-10), cnt); // moved to the beginning
2393 2 0 CHECK_ALLOCS();
2395 12 0 SECTION("has no space") {
12 0 SECTION("has no space") {
12 0 SECTION("has no space") {
12 0 SECTION("has no space") {
2 10 SECTION("has no space") {
2396 2 0 s.offset(2, cnt-4); // 2 free from head and tail
2397 2 0 s.replace(3,2, cstr("XXXXXXX")); // 5 insterted
2 0 s.replace(3,2, cstr("XXXXXXX")); // 5 insterted
2398 2 0 REQUIRE_STR(s, mstr("aaaXXXXXXX")+mstr("a",cnt-9), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaaXXXXXXX")+mstr("a",cnt-9), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaaXXXXXXX")+mstr("a",cnt-9), cnt+1); // moved to the beginning
2 0 REQUIRE_STR(s, mstr("aaaXXXXXXX")+mstr("a",cnt-9), cnt+1); // moved to the beginning
2400 2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
2 0 REQUIRE(stat.allocated_cnt == 1);
0 0 REQUIRE(stat.allocated_cnt == 1);
0 0 REQUIRE(stat.allocated_cnt == 1);
2401 2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
0 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
0 0 REQUIRE(stat.allocated == (int)BUF_CHARS+cnt+1);
2407 36 0 SECTION("literal") {
36 0 SECTION("literal") {
36 0 SECTION("literal") {
36 0 SECTION("literal") {
2 34 SECTION("literal") {
2409 2 0 StdString exp(LITERAL);
2410 2 0 SECTION("shrink") {
2 0 SECTION("shrink") {
2 0 SECTION("shrink") {
2 0 SECTION("shrink") {
1 1 SECTION("shrink") {
2411 1 0 exp.replace(5, 5, cstr("hi"));
1 0 exp.replace(5, 5, cstr("hi"));
2412 1 0 s.replace(5, 5, cstr("hi"));
1 0 s.replace(5, 5, cstr("hi"));
2413 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
2414 1 0 CHECK_ALLOCS(1, BUF_CHARS + exp.size());
2416 2 0 SECTION("grow") {
2 0 SECTION("grow") {
2 0 SECTION("grow") {
2 0 SECTION("grow") {
1 1 SECTION("grow") {
2417 1 0 exp.replace(5, 10, cstr("epta"));
1 0 exp.replace(5, 10, cstr("epta"));
2418 1 0 s.replace(5, 10, cstr("epta"));
1 0 s.replace(5, 10, cstr("epta"));
2419 1 0 REQUIRE_STR(s, exp);
1 0 REQUIRE_STR(s, exp);
2420 1 0 CHECK_ALLOCS(1, BUF_CHARS + exp.size());
2425 36 0 SECTION("internal") { test_replace_impl(50, false); }
36 0 SECTION("internal") { test_replace_impl(50, false); }
36 0 SECTION("internal") { test_replace_impl(50, false); }
36 0 SECTION("internal") { test_replace_impl(50, false); }
7 29 SECTION("internal") { test_replace_impl(50, false); }
7 0 SECTION("internal") { test_replace_impl(50, false); }
2426 36 0 SECTION("external") { test_replace_impl(50, true); }
36 0 SECTION("external") { test_replace_impl(50, true); }
36 0 SECTION("external") { test_replace_impl(50, true); }
36 0 SECTION("external") { test_replace_impl(50, true); }
7 29 SECTION("external") { test_replace_impl(50, true); }
7 0 SECTION("external") { test_replace_impl(50, true); }
2428 36 0 String s (cstr("hello, world"));
36 0 String s (cstr("hello, world"));
2429 36 0 String a (cstr(" suka"));
36 0 String a (cstr(" suka"));
2430 36 0 String2 a2(cstr(" suka"));
36 0 String2 a2(cstr(" suka"));
2432 36 0 SECTION("str") {
36 0 SECTION("str") {
36 0 SECTION("str") {
36 0 SECTION("str") {
1 35 SECTION("str") {
2433 1 0 s.replace(6, 6, a);
2434 1 0 REQUIRE_STRM(s, mstr("hello, suka"));
1 0 REQUIRE_STRM(s, mstr("hello, suka"));
2435 1 0 s.replace(5, 1000, a);
2436 1 0 REQUIRE_STRM(s, mstr("hello suka"));
1 0 REQUIRE_STRM(s, mstr("hello suka"));
2437 1 0 REQUIRE_THROWS(s.replace(1000, 1, a));
1 0 REQUIRE_THROWS(s.replace(1000, 1, a));
1 0 REQUIRE_THROWS(s.replace(1000, 1, a));
0 1 REQUIRE_THROWS(s.replace(1000, 1, a));
0 0 REQUIRE_THROWS(s.replace(1000, 1, a));
0 0 REQUIRE_THROWS(s.replace(1000, 1, a));
1 0 REQUIRE_THROWS(s.replace(1000, 1, a));
1 0 REQUIRE_THROWS(s.replace(1000, 1, a));
1 0 REQUIRE_THROWS(s.replace(1000, 1, a));
2439 36 0 SECTION("fstr") {
36 0 SECTION("fstr") {
36 0 SECTION("fstr") {
36 0 SECTION("fstr") {
1 35 SECTION("fstr") {
2440 1 0 s.replace(1, String::npos, a2);
2441 1 0 REQUIRE_STRM(s, mstr("h suka"));
1 0 REQUIRE_STRM(s, mstr("h suka"));
2443 36 0 SECTION("it/str") {
36 0 SECTION("it/str") {
36 0 SECTION("it/str") {
36 0 SECTION("it/str") {
1 35 SECTION("it/str") {
2444 1 0 s.replace(s.cbegin()+6, s.cbegin()+12, a);
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, a);
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, a);
2445 1 0 REQUIRE_STRM(s, mstr("hello, suka"));
1 0 REQUIRE_STRM(s, mstr("hello, suka"));
2446 1 0 s.replace(s.cbegin()+5, s.cend()+100, a);
1 0 s.replace(s.cbegin()+5, s.cend()+100, a);
1 0 s.replace(s.cbegin()+5, s.cend()+100, a);
2447 1 0 REQUIRE_STRM(s, mstr("hello suka"));
1 0 REQUIRE_STRM(s, mstr("hello suka"));
2448 1 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
1 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
1 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
1 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
1 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
1 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
0 1 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
0 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
0 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
1 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
1 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
1 0 REQUIRE_THROWS(s.replace(s.cend()+1, s.end(), a));
2451 36 0 SECTION("it/fstr") {
36 0 SECTION("it/fstr") {
36 0 SECTION("it/fstr") {
36 0 SECTION("it/fstr") {
1 35 SECTION("it/fstr") {
2452 1 0 s.replace(s.cbegin()+1, s.cend(), a2);
1 0 s.replace(s.cbegin()+1, s.cend(), a2);
1 0 s.replace(s.cbegin()+1, s.cend(), a2);
2453 1 0 REQUIRE_STRM(s, mstr("h suka"));
1 0 REQUIRE_STRM(s, mstr("h suka"));
2455 36 0 SECTION("str&pos/len") {
36 0 SECTION("str&pos/len") {
36 0 SECTION("str&pos/len") {
36 0 SECTION("str&pos/len") {
1 35 SECTION("str&pos/len") {
2456 1 0 s.replace(6, 6, a, 1, 2);
2457 1 0 REQUIRE_STRM(s, mstr("hello,su"));
1 0 REQUIRE_STRM(s, mstr("hello,su"));
2458 1 0 s.replace(6, 6, a, 1, 20);
2459 1 0 REQUIRE_STRM(s, mstr("hello,suka"));
1 0 REQUIRE_STRM(s, mstr("hello,suka"));
2460 1 0 s.replace(6, 6, a, 1);
2461 1 0 REQUIRE_STRM(s, mstr("hello,suka"));
1 0 REQUIRE_STRM(s, mstr("hello,suka"));
2462 1 0 REQUIRE_THROWS(s.replace(6,6,a,10));
1 0 REQUIRE_THROWS(s.replace(6,6,a,10));
1 0 REQUIRE_THROWS(s.replace(6,6,a,10));
0 1 REQUIRE_THROWS(s.replace(6,6,a,10));
0 0 REQUIRE_THROWS(s.replace(6,6,a,10));
0 0 REQUIRE_THROWS(s.replace(6,6,a,10));
1 0 REQUIRE_THROWS(s.replace(6,6,a,10));
1 0 REQUIRE_THROWS(s.replace(6,6,a,10));
1 0 REQUIRE_THROWS(s.replace(6,6,a,10));
2464 36 0 SECTION("fstr&pos/len") {
36 0 SECTION("fstr&pos/len") {
36 0 SECTION("fstr&pos/len") {
36 0 SECTION("fstr&pos/len") {
1 35 SECTION("fstr&pos/len") {
2465 1 0 s.replace(6, 6, a2, 1, 2);
2466 1 0 REQUIRE_STRM(s, mstr("hello,su"));
1 0 REQUIRE_STRM(s, mstr("hello,su"));
2468 36 0 SECTION("ptr") {
36 0 SECTION("ptr") {
36 0 SECTION("ptr") {
36 0 SECTION("ptr") {
1 35 SECTION("ptr") {
2469 1 0 s.replace(6, 6, cstr(" guy"));
1 0 s.replace(6, 6, cstr(" guy"));
2470 1 0 REQUIRE_STRM(s, mstr("hello, guy"));
1 0 REQUIRE_STRM(s, mstr("hello, guy"));
2472 36 0 SECTION("ptr&len") {
36 0 SECTION("ptr&len") {
36 0 SECTION("ptr&len") {
36 0 SECTION("ptr&len") {
1 35 SECTION("ptr&len") {
2473 1 0 s.replace(6, 6, cstr(" guy"), 3);
1 0 s.replace(6, 6, cstr(" guy"), 3);
2474 1 0 REQUIRE_STRM(s, mstr("hello, gu"));
1 0 REQUIRE_STRM(s, mstr("hello, gu"));
2476 36 0 SECTION("=literal=") {
36 0 SECTION("=literal=") {
36 0 SECTION("=literal=") {
36 0 SECTION("=literal=") {
1 35 SECTION("=literal=") {
2477 1 0 s.replace(6,6, LITERAL);
2478 1 0 REQUIRE_STRM(s, mstr("hello,")+StdString(LITERAL));
1 0 REQUIRE_STRM(s, mstr("hello,")+StdString(LITERAL));
1 0 REQUIRE_STRM(s, mstr("hello,")+StdString(LITERAL));
1 0 REQUIRE_STRM(s, mstr("hello,")+StdString(LITERAL));
2480 36 0 SECTION("it/ptr") {
36 0 SECTION("it/ptr") {
36 0 SECTION("it/ptr") {
36 0 SECTION("it/ptr") {
1 35 SECTION("it/ptr") {
2481 1 0 s.replace(s.cbegin()+6, s.cbegin()+12, cstr(" guy"));
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, cstr(" guy"));
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, cstr(" guy"));
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, cstr(" guy"));
2482 1 0 REQUIRE_STRM(s, mstr("hello, guy"));
1 0 REQUIRE_STRM(s, mstr("hello, guy"));
2484 36 0 SECTION("it/ptr&len") {
36 0 SECTION("it/ptr&len") {
36 0 SECTION("it/ptr&len") {
36 0 SECTION("it/ptr&len") {
1 35 SECTION("it/ptr&len") {
2485 1 0 s.replace(s.cbegin()+6, s.cbegin()+12, cstr(" guy"), 3);
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, cstr(" guy"), 3);
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, cstr(" guy"), 3);
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, cstr(" guy"), 3);
2486 1 0 REQUIRE_STRM(s, mstr("hello, gu"));
1 0 REQUIRE_STRM(s, mstr("hello, gu"));
2488 36 0 SECTION("it/=literal=") {
36 0 SECTION("it/=literal=") {
36 0 SECTION("it/=literal=") {
36 0 SECTION("it/=literal=") {
1 35 SECTION("it/=literal=") {
2489 1 0 s.replace(s.cbegin()+6, s.cbegin()+12, LITERAL);
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, LITERAL);
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, LITERAL);
2490 1 0 REQUIRE_STRM(s, mstr("hello,")+StdString(LITERAL));
1 0 REQUIRE_STRM(s, mstr("hello,")+StdString(LITERAL));
1 0 REQUIRE_STRM(s, mstr("hello,")+StdString(LITERAL));
1 0 REQUIRE_STRM(s, mstr("hello,")+StdString(LITERAL));
2492 36 0 SECTION("count char") {
36 0 SECTION("count char") {
36 0 SECTION("count char") {
36 0 SECTION("count char") {
1 35 SECTION("count char") {
2493 1 0 s.replace(6, 5, 10, (T)'x');
2494 1 0 REQUIRE_STRM(s, mstr("hello,xxxxxxxxxxd"));
1 0 REQUIRE_STRM(s, mstr("hello,xxxxxxxxxxd"));
2496 36 0 SECTION("it/count char") {
36 0 SECTION("it/count char") {
36 0 SECTION("it/count char") {
36 0 SECTION("it/count char") {
1 35 SECTION("it/count char") {
2497 1 0 s.replace(s.cbegin()+6, s.cbegin()+11, 10, (T)'x');
1 0 s.replace(s.cbegin()+6, s.cbegin()+11, 10, (T)'x');
1 0 s.replace(s.cbegin()+6, s.cbegin()+11, 10, (T)'x');
2498 1 0 REQUIRE_STRM(s, mstr("hello,xxxxxxxxxxd"));
1 0 REQUIRE_STRM(s, mstr("hello,xxxxxxxxxxd"));
2500 36 0 SECTION("initializer list") {
36 0 SECTION("initializer list") {
36 0 SECTION("initializer list") {
36 0 SECTION("initializer list") {
1 35 SECTION("initializer list") {
2501 1 0 s.replace(s.cbegin()+6, s.cbegin()+11, {(T)'h', (T)'i'});
1 0 s.replace(s.cbegin()+6, s.cbegin()+11, {(T)'h', (T)'i'});
1 0 s.replace(s.cbegin()+6, s.cbegin()+11, {(T)'h', (T)'i'});
2502 1 0 REQUIRE_STRM(s, mstr("hello,hid"));
1 0 REQUIRE_STRM(s, mstr("hello,hid"));
2504 36 0 SECTION("string_view") {
36 0 SECTION("string_view") {
36 0 SECTION("string_view") {
36 0 SECTION("string_view") {
1 35 SECTION("string_view") {
2505 1 0 s.replace(6, 6, svstr(" guy"));
1 0 s.replace(6, 6, svstr(" guy"));
2506 1 0 REQUIRE_STRM(s, mstr("hello, guy"));
1 0 REQUIRE_STRM(s, mstr("hello, guy"));
2508 36 0 SECTION("it/string_view") {
36 0 SECTION("it/string_view") {
36 0 SECTION("it/string_view") {
36 0 SECTION("it/string_view") {
1 35 SECTION("it/string_view") {
2509 1 0 s.replace(s.cbegin()+6, s.cbegin()+12, svstr(" guy"));
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, svstr(" guy"));
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, svstr(" guy"));
1 0 s.replace(s.cbegin()+6, s.cbegin()+12, svstr(" guy"));
2510 1 0 REQUIRE_STRM(s, mstr("hello, guy"));
1 0 REQUIRE_STRM(s, mstr("hello, guy"));
2512 36 0 SECTION("self") {
36 0 SECTION("self") {
36 0 SECTION("self") {
36 0 SECTION("self") {
1 35 SECTION("self") {
2513 1 0 s = cstr("1234567890", 2);
1 0 s = cstr("1234567890", 2);
2514 1 0 s.replace(3, 5, s);
2515 1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
2517 36 0 SECTION("self&pos/len") {
36 0 SECTION("self&pos/len") {
36 0 SECTION("self&pos/len") {
36 0 SECTION("self&pos/len") {
1 35 SECTION("self&pos/len") {
2518 1 0 s = cstr("1234567890", 2);
1 0 s = cstr("1234567890", 2);
2519 1 0 s.replace(3, 5, s, 2, 15);
2520 1 0 REQUIRE_STRM(s, mstr("123")+mstr("345678901234567")+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("345678901234567")+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("345678901234567")+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("345678901234567")+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("345678901234567")+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("345678901234567")+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("345678901234567")+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("345678901234567")+mstr("90")+mstr("1234567890"));
2522 36 0 SECTION("it/self") {
36 0 SECTION("it/self") {
36 0 SECTION("it/self") {
36 0 SECTION("it/self") {
1 35 SECTION("it/self") {
2523 1 0 s = cstr("1234567890", 2);
1 0 s = cstr("1234567890", 2);
2524 1 0 s.replace(s.cbegin()+3, s.cbegin()+8, s);
1 0 s.replace(s.cbegin()+3, s.cbegin()+8, s);
1 0 s.replace(s.cbegin()+3, s.cbegin()+8, s);
2525 1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
1 0 REQUIRE_STRM(s, mstr("123")+mstr("1234567890",2)+mstr("90")+mstr("1234567890"));
2531 4 0 SECTION("literal") {
4 0 SECTION("literal") {
4 0 SECTION("literal") {
4 0 SECTION("literal") {
1 3 SECTION("literal") {
2534 1 0 s.shared_buf();
2535 1 0 REQUIRE(s.capacity() == llen); // detached
1 0 REQUIRE(s.capacity() == llen); // detached
1 0 REQUIRE(s.capacity() == llen); // detached
1 0 REQUIRE(s.capacity() == llen); // detached
1 0 REQUIRE(s.capacity() == llen); // detached
1 0 REQUIRE(s.capacity() == llen); // detached
0 0 REQUIRE(s.capacity() == llen); // detached
0 0 REQUIRE(s.capacity() == llen); // detached
2536 1 0 CHECK_ALLOCS(1, BUF_CHARS + LITERAL_LEN);
2538 4 0 SECTION("sso") {
4 0 SECTION("sso") {
4 0 SECTION("sso") {
4 0 SECTION("sso") {
1 3 SECTION("sso") {
2540 1 0 String s(cstr("ab"));
1 0 String s(cstr("ab"));
2541 1 0 s.shared_buf();
2542 1 0 REQUIRE(s.capacity() == msc); // noop
1 0 REQUIRE(s.capacity() == msc); // noop
1 0 REQUIRE(s.capacity() == msc); // noop
1 0 REQUIRE(s.capacity() == msc); // noop
1 0 REQUIRE(s.capacity() == msc); // noop
1 0 REQUIRE(s.capacity() == msc); // noop
0 0 REQUIRE(s.capacity() == msc); // noop
0 0 REQUIRE(s.capacity() == msc); // noop
2543 1 0 CHECK_ALLOCS();
2545 4 0 SECTION("internal") {
4 0 SECTION("internal") {
4 0 SECTION("internal") {
4 0 SECTION("internal") {
1 3 SECTION("internal") {
2546 1 0 String s(cstr("a", 50));
1 0 String s(cstr("a", 50));
2548 1 0 s.offset(0, 10);
2549 1 0 s.shared_buf();
2550 1 0 REQUIRE(s.capacity() == 50); // noop
1 0 REQUIRE(s.capacity() == 50); // noop
1 0 REQUIRE(s.capacity() == 50); // noop
1 0 REQUIRE(s.capacity() == 50); // noop
1 0 REQUIRE(s.capacity() == 50); // noop
1 0 REQUIRE(s.capacity() == 50); // noop
0 0 REQUIRE(s.capacity() == 50); // noop
0 0 REQUIRE(s.capacity() == 50); // noop
2551 1 0 CHECK_ALLOCS();
2552 1 0 String tmp(s);
2553 1 0 s.shared_buf();
2554 1 0 REQUIRE(s.shared_capacity() == 50); // noop
1 0 REQUIRE(s.shared_capacity() == 50); // noop
1 0 REQUIRE(s.shared_capacity() == 50); // noop
1 0 REQUIRE(s.shared_capacity() == 50); // noop
1 0 REQUIRE(s.shared_capacity() == 50); // noop
1 0 REQUIRE(s.shared_capacity() == 50); // noop
0 0 REQUIRE(s.shared_capacity() == 50); // noop
0 0 REQUIRE(s.shared_capacity() == 50); // noop
2555 1 0 CHECK_ALLOCS();
2557 4 0 SECTION("external") {
4 0 SECTION("external") {
4 0 SECTION("external") {
4 0 SECTION("external") {
1 3 SECTION("external") {
2558 1 0 String s = create_external(mstr("a",50));
1 0 String s = create_external(mstr("a",50));
2560 1 0 s.offset(0, 10);
2561 1 0 s.shared_buf();
2562 1 0 REQUIRE(s.capacity() == 50); // noop
1 0 REQUIRE(s.capacity() == 50); // noop
1 0 REQUIRE(s.capacity() == 50); // noop
1 0 REQUIRE(s.capacity() == 50); // noop
1 0 REQUIRE(s.capacity() == 50); // noop
1 0 REQUIRE(s.capacity() == 50); // noop
0 0 REQUIRE(s.capacity() == 50); // noop
0 0 REQUIRE(s.capacity() == 50); // noop
2563 1 0 CHECK_ALLOCS();
2564 1 0 String tmp(s);
2565 1 0 s.shared_buf();
2566 1 0 REQUIRE(s.shared_capacity() == 50); // noop
1 0 REQUIRE(s.shared_capacity() == 50); // noop
1 0 REQUIRE(s.shared_capacity() == 50); // noop
1 0 REQUIRE(s.shared_capacity() == 50); // noop
1 0 REQUIRE(s.shared_capacity() == 50); // noop
1 0 REQUIRE(s.shared_capacity() == 50); // noop
0 0 REQUIRE(s.shared_capacity() == 50); // noop
0 0 REQUIRE(s.shared_capacity() == 50); // noop
2567 1 0 CHECK_ALLOCS();
2615 5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
5 0 SECTION("from literal") {
1 4 SECTION("from literal") {
2617 1 0 String s(src);
2618 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
2619 1 0 s = EMPTY; src = EMPTY;
1 0 s = EMPTY; src = EMPTY;
2620 1 0 CHECK_ALLOCS();
2622 5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
5 0 SECTION("from sso") {
1 4 SECTION("from sso") {
2623 1 0 auto exp = mstr("ab");
2624 1 0 String2 src(exp.c_str());
2625 1 0 String s(src);
2626 1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
2627 1 0 s = EMPTY; src = EMPTY;
1 0 s = EMPTY; src = EMPTY;
2628 1 0 CHECK_ALLOCS();
2630 5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
5 0 SECTION("from internal") {
1 4 SECTION("from internal") {
2631 1 0 auto exp = mstr("a", 50);
2632 1 0 String2 src(exp.c_str());
2633 1 0 CHECK_ALLOCS(1, BUF_CHARS+exp.size());
2634 1 0 String s(src);
2635 1 0 CHECK_ALLOCS();
2636 1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
2637 1 0 src = EMPTY;
2638 1 0 CHECK_ALLOCS();
2639 1 0 s = EMPTY;
2640 1 0 CHECK_ALLOCS(0,0,1,BUF_CHARS+exp.size());
2642 5 0 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
5 0 SECTION("from external") {
1 4 SECTION("from external") {
2643 1 0 auto exp = mstr("b", 50);
2644 1 0 String2 src = create_external(exp);
1 0 String2 src = create_external(exp);
2645 1 0 CHECK_ALLOCS(1, EBUF_CHARS);
2646 1 0 String s(src);
2647 1 0 CHECK_ALLOCS();
2648 1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
2649 1 0 src = EMPTY;
2650 1 0 CHECK_ALLOCS();
2651 1 0 s = EMPTY;
2652 1 0 CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp.size());
2654 5 0 SECTION("from external with custom buf") {
5 0 SECTION("from external with custom buf") {
5 0 SECTION("from external with custom buf") {
5 0 SECTION("from external with custom buf") {
1 4 SECTION("from external with custom buf") {
2655 1 0 auto exp = mstr("b", 50);
2656 1 0 String2 src = create_external_cbuf(exp);
1 0 String2 src = create_external_cbuf(exp);
2657 1 0 String s(src);
2658 1 0 CHECK_ALLOCS();
2659 1 0 REQUIRE_STR(s, exp, 0, exp.size());
1 0 REQUIRE_STR(s, exp, 0, exp.size());
2660 1 0 src = EMPTY;
2661 1 0 CHECK_ALLOCS();
2662 1 0 s = EMPTY;
2663 1 0 CHECK_ALLOCS(0,0,0,0,0,0,1,exp.size(),1);
2668 6 0 SECTION("empty") {
6 0 SECTION("empty") {
6 0 SECTION("empty") {
6 0 SECTION("empty") {
1 5 SECTION("empty") {
2670 1 0 REQUIRE(s.c_str()[0] == 0);
1 0 REQUIRE(s.c_str()[0] == 0);
1 0 REQUIRE(s.c_str()[0] == 0);
1 0 REQUIRE(s.c_str()[0] == 0);
1 0 REQUIRE(s.c_str()[0] == 0);
1 0 REQUIRE(s.c_str()[0] == 0);
0 0 REQUIRE(s.c_str()[0] == 0);
0 0 REQUIRE(s.c_str()[0] == 0);
2671 1 0 REQUIRE_STR(s, EMPTY);
2672 1 0 CHECK_ALLOCS();
2674 6 0 SECTION("literal") {
6 0 SECTION("literal") {
6 0 SECTION("literal") {
6 0 SECTION("literal") {
1 5 SECTION("literal") {
2676 1 0 REQUIRE(s.c_str()[LITERAL_LEN] == 0);
1 0 REQUIRE(s.c_str()[LITERAL_LEN] == 0);
1 0 REQUIRE(s.c_str()[LITERAL_LEN] == 0);
1 0 REQUIRE(s.c_str()[LITERAL_LEN] == 0);
1 0 REQUIRE(s.c_str()[LITERAL_LEN] == 0);
1 0 REQUIRE(s.c_str()[LITERAL_LEN] == 0);
0 0 REQUIRE(s.c_str()[LITERAL_LEN] == 0);
0 0 REQUIRE(s.c_str()[LITERAL_LEN] == 0);
2677 1 0 REQUIRE_STR(s, LITERAL, LITERAL_LEN, 0);
2678 1 0 CHECK_ALLOCS();
2680 6 0 SECTION("sso") {
6 0 SECTION("sso") {
6 0 SECTION("sso") {
6 0 SECTION("sso") {
2 4 SECTION("sso") {
2681 2 0 SECTION("self") {
2 0 SECTION("self") {
2 0 SECTION("self") {
2 0 SECTION("self") {
1 1 SECTION("self") {
2682 1 0 auto exp = mstr("a", MAX_SSO_CHARS-1);
2683 1 0 String s(exp.c_str());
2684 1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
0 0 REQUIRE(s.c_str()[exp.length()] == 0);
0 0 REQUIRE(s.c_str()[exp.length()] == 0);
2685 1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, exp, MAX_SSO_CHARS);
2686 1 0 CHECK_ALLOCS();
2688 2 0 SECTION("detach") {
2 0 SECTION("detach") {
2 0 SECTION("detach") {
2 0 SECTION("detach") {
1 1 SECTION("detach") {
2689 1 0 auto exp = mstr("a", 50);
2690 1 0 String src(exp.c_str());
2692 1 0 String s = src.substr(0, MAX_SSO_CHARS-1);
2693 1 0 CHECK(s.c_str()[MAX_SSO_CHARS-1] == 0);
1 0 CHECK(s.c_str()[MAX_SSO_CHARS-1] == 0);
1 0 CHECK(s.c_str()[MAX_SSO_CHARS-1] == 0);
1 0 CHECK(s.c_str()[MAX_SSO_CHARS-1] == 0);
1 0 CHECK(s.c_str()[MAX_SSO_CHARS-1] == 0);
1 0 CHECK(s.c_str()[MAX_SSO_CHARS-1] == 0);
0 0 CHECK(s.c_str()[MAX_SSO_CHARS-1] == 0);
0 0 CHECK(s.c_str()[MAX_SSO_CHARS-1] == 0);
2694 1 0 REQUIRE_STR(s, mstr("a", MAX_SSO_CHARS-1), MAX_SSO_CHARS);
1 0 REQUIRE_STR(s, mstr("a", MAX_SSO_CHARS-1), MAX_SSO_CHARS);
2695 1 0 CHECK_ALLOCS();
2698 6 0 SECTION("internal") {
6 0 SECTION("internal") {
6 0 SECTION("internal") {
6 0 SECTION("internal") {
2 4 SECTION("internal") {
2699 2 0 SECTION("self") {
2 0 SECTION("self") {
2 0 SECTION("self") {
2 0 SECTION("self") {
1 1 SECTION("self") {
2700 1 0 auto exp = mstr("ab", 50);
2701 1 0 String s(exp.c_str());
2703 1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
0 0 REQUIRE(s.c_str()[exp.length()] == 0);
0 0 REQUIRE(s.c_str()[exp.length()] == 0);
2704 1 0 REQUIRE_STR(s, exp, exp.length() + 1);
1 0 REQUIRE_STR(s, exp, exp.length() + 1);
2705 1 0 CHECK_ALLOCS(0,0,0,0,1,1);
2706 1 0 s.c_str();
2707 1 0 CHECK_ALLOCS();
2709 2 0 SECTION("detach") {
2 0 SECTION("detach") {
2 0 SECTION("detach") {
2 0 SECTION("detach") {
1 1 SECTION("detach") {
2710 1 0 auto exp = mstr("ab", 50);
2711 1 0 String s(exp.c_str());
2713 1 0 String s2(s);
2714 1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
1 0 REQUIRE(s.c_str()[exp.length()] == 0);
0 0 REQUIRE(s.c_str()[exp.length()] == 0);
0 0 REQUIRE(s.c_str()[exp.length()] == 0);
2715 1 0 REQUIRE_STR(s, exp, exp.length() + 1);
1 0 REQUIRE_STR(s, exp, exp.length() + 1);
2716 1 0 CHECK_ALLOCS(1,BUF_CHARS+exp.size()+1,0,0,0,0);
2717 1 0 s.c_str();
2718 1 0 CHECK_ALLOCS();
2726 388 0 SECTION("ctor") { test_ctor(); }
388 0 SECTION("ctor") { test_ctor(); }
388 0 SECTION("ctor") { test_ctor(); }
388 0 SECTION("ctor") { test_ctor(); }
11 377 SECTION("ctor") { test_ctor(); }
11 0 SECTION("ctor") { test_ctor(); }
2727 388 0 SECTION("copy ctor") {
388 0 SECTION("copy ctor") {
388 0 SECTION("copy ctor") {
388 0 SECTION("copy ctor") {
10 378 SECTION("copy ctor") {
2728 10 0 SECTION("local") { test_copy_ctor(); }
10 0 SECTION("local") { test_copy_ctor(); }
10 0 SECTION("local") { test_copy_ctor(); }
10 0 SECTION("local") { test_copy_ctor(); }
5 5 SECTION("local") { test_copy_ctor(); }
5 0 SECTION("local") { test_copy_ctor(); }
2729 10 0 SECTION("foreign") { test_copy_ctor(); }
10 0 SECTION("foreign") { test_copy_ctor(); }
10 0 SECTION("foreign") { test_copy_ctor(); }
10 0 SECTION("foreign") { test_copy_ctor(); }
5 5 SECTION("foreign") { test_copy_ctor(); }
5 0 SECTION("foreign") { test_copy_ctor(); }
2731 388 0 SECTION("move ctor") {
388 0 SECTION("move ctor") {
388 0 SECTION("move ctor") {
388 0 SECTION("move ctor") {
10 378 SECTION("move ctor") {
2732 10 0 SECTION("local") { test_move_ctor(); }
10 0 SECTION("local") { test_move_ctor(); }
10 0 SECTION("local") { test_move_ctor(); }
10 0 SECTION("local") { test_move_ctor(); }
5 5 SECTION("local") { test_move_ctor(); }
5 0 SECTION("local") { test_move_ctor(); }
2733 10 0 SECTION("foreign") { test_move_ctor(); }
10 0 SECTION("foreign") { test_move_ctor(); }
10 0 SECTION("foreign") { test_move_ctor(); }
10 0 SECTION("foreign") { test_move_ctor(); }
5 5 SECTION("foreign") { test_move_ctor(); }
5 0 SECTION("foreign") { test_move_ctor(); }
2735 388 0 SECTION("copy ctor with offset") {
388 0 SECTION("copy ctor with offset") {
388 0 SECTION("copy ctor with offset") {
388 0 SECTION("copy ctor with offset") {
12 376 SECTION("copy ctor with offset") {
2736 12 0 SECTION("local") { test_copy_ctor_offset(); }
12 0 SECTION("local") { test_copy_ctor_offset(); }
12 0 SECTION("local") { test_copy_ctor_offset(); }
12 0 SECTION("local") { test_copy_ctor_offset(); }
6 6 SECTION("local") { test_copy_ctor_offset(); }
6 0 SECTION("local") { test_copy_ctor_offset(); }
2737 12 0 SECTION("foreign") { test_copy_ctor_offset(); }
12 0 SECTION("foreign") { test_copy_ctor_offset(); }
12 0 SECTION("foreign") { test_copy_ctor_offset(); }
12 0 SECTION("foreign") { test_copy_ctor_offset(); }
6 6 SECTION("foreign") { test_copy_ctor_offset(); }
6 0 SECTION("foreign") { test_copy_ctor_offset(); }
2739 388 0 SECTION("substr") { test_substr(); }
388 0 SECTION("substr") { test_substr(); }
388 0 SECTION("substr") { test_substr(); }
388 0 SECTION("substr") { test_substr(); }
1 387 SECTION("substr") { test_substr(); }
1 0 SECTION("substr") { test_substr(); }
2740 388 0 SECTION("clear") { test_clear(); }
388 0 SECTION("clear") { test_clear(); }
388 0 SECTION("clear") { test_clear(); }
388 0 SECTION("clear") { test_clear(); }
4 384 SECTION("clear") { test_clear(); }
4 0 SECTION("clear") { test_clear(); }
2741 388 0 SECTION("assign") {
388 0 SECTION("assign") {
388 0 SECTION("assign") {
388 0 SECTION("assign") {
106 282 SECTION("assign") {
2742 106 0 SECTION("local") { test_assign(); }
106 0 SECTION("local") { test_assign(); }
106 0 SECTION("local") { test_assign(); }
106 0 SECTION("local") { test_assign(); }
53 53 SECTION("local") { test_assign(); }
53 0 SECTION("local") { test_assign(); }
2743 106 0 SECTION("foreign") { test_assign(); }
106 0 SECTION("foreign") { test_assign(); }
106 0 SECTION("foreign") { test_assign(); }
106 0 SECTION("foreign") { test_assign(); }
53 53 SECTION("foreign") { test_assign(); }
53 0 SECTION("foreign") { test_assign(); }
2745 388 0 SECTION("offset") { test_offset(); }
388 0 SECTION("offset") { test_offset(); }
388 0 SECTION("offset") { test_offset(); }
388 0 SECTION("offset") { test_offset(); }
6 382 SECTION("offset") { test_offset(); }
6 0 SECTION("offset") { test_offset(); }
2746 388 0 SECTION("swap") {
388 0 SECTION("swap") {
388 0 SECTION("swap") {
388 0 SECTION("swap") {
20 368 SECTION("swap") {
2747 20 0 SECTION("local") { test_swap(); }
20 0 SECTION("local") { test_swap(); }
20 0 SECTION("local") { test_swap(); }
20 0 SECTION("local") { test_swap(); }
10 10 SECTION("local") { test_swap(); }
10 0 SECTION("local") { test_swap(); }
2748 20 0 SECTION("foreign") { test_swap(); }
20 0 SECTION("foreign") { test_swap(); }
20 0 SECTION("foreign") { test_swap(); }
20 0 SECTION("foreign") { test_swap(); }
10 10 SECTION("foreign") { test_swap(); }
10 0 SECTION("foreign") { test_swap(); }
2750 388 0 SECTION("copy") { test_copy(); }
388 0 SECTION("copy") { test_copy(); }
388 0 SECTION("copy") { test_copy(); }
388 0 SECTION("copy") { test_copy(); }
1 387 SECTION("copy") { test_copy(); }
1 0 SECTION("copy") { test_copy(); }
2751 388 0 SECTION("to_bool, empty") { test_bool_empty(); }
388 0 SECTION("to_bool, empty") { test_bool_empty(); }
388 0 SECTION("to_bool, empty") { test_bool_empty(); }
388 0 SECTION("to_bool, empty") { test_bool_empty(); }
1 387 SECTION("to_bool, empty") { test_bool_empty(); }
1 0 SECTION("to_bool, empty") { test_bool_empty(); }
2752 388 0 SECTION("use_count") { test_use_count(); }
388 0 SECTION("use_count") { test_use_count(); }
388 0 SECTION("use_count") { test_use_count(); }
388 0 SECTION("use_count") { test_use_count(); }
1 387 SECTION("use_count") { test_use_count(); }
1 0 SECTION("use_count") { test_use_count(); }
2753 388 0 SECTION("detach") { test_detach(); }
388 0 SECTION("detach") { test_detach(); }
388 0 SECTION("detach") { test_detach(); }
388 0 SECTION("detach") { test_detach(); }
4 384 SECTION("detach") { test_detach(); }
4 0 SECTION("detach") { test_detach(); }
2755 388 0 SECTION("at/op[]/front/[pop_]back") { test_at_front_back(); }
388 0 SECTION("at/op[]/front/[pop_]back") { test_at_front_back(); }
388 0 SECTION("at/op[]/front/[pop_]back") { test_at_front_back(); }
388 0 SECTION("at/op[]/front/[pop_]back") { test_at_front_back(); }
5 383 SECTION("at/op[]/front/[pop_]back") { test_at_front_back(); }
5 0 SECTION("at/op[]/front/[pop_]back") { test_at_front_back(); }
2756 388 0 SECTION("iterator") { test_iterator(); }
388 0 SECTION("iterator") { test_iterator(); }
388 0 SECTION("iterator") { test_iterator(); }
388 0 SECTION("iterator") { test_iterator(); }
7 381 SECTION("iterator") { test_iterator(); }
7 0 SECTION("iterator") { test_iterator(); }
2758 388 0 SECTION("erase") { test_erase(); }
388 0 SECTION("erase") { test_erase(); }
388 0 SECTION("erase") { test_erase(); }
388 0 SECTION("erase") { test_erase(); }
4 384 SECTION("erase") { test_erase(); }
4 0 SECTION("erase") { test_erase(); }
2759 388 0 SECTION("compare") {
388 0 SECTION("compare") {
388 0 SECTION("compare") {
388 0 SECTION("compare") {
2 386 SECTION("compare") {
2760 2 0 SECTION("local") { test_compare(); }
2 0 SECTION("local") { test_compare(); }
2 0 SECTION("local") { test_compare(); }
2 0 SECTION("local") { test_compare(); }
1 1 SECTION("local") { test_compare(); }
1 0 SECTION("local") { test_compare(); }
2761 2 0 SECTION("foreign") { test_compare(); }
2 0 SECTION("foreign") { test_compare(); }
2 0 SECTION("foreign") { test_compare(); }
2 0 SECTION("foreign") { test_compare(); }
1 1 SECTION("foreign") { test_compare(); }
1 0 SECTION("foreign") { test_compare(); }
2763 388 0 SECTION("find") {
388 0 SECTION("find") {
388 0 SECTION("find") {
388 0 SECTION("find") {
12 376 SECTION("find") {
2764 12 0 SECTION("local") { test_find(); }
12 0 SECTION("local") { test_find(); }
12 0 SECTION("local") { test_find(); }
12 0 SECTION("local") { test_find(); }
6 6 SECTION("local") { test_find(); }
6 0 SECTION("local") { test_find(); }
2765 12 0 SECTION("foreign") { test_find(); }
12 0 SECTION("foreign") { test_find(); }
12 0 SECTION("foreign") { test_find(); }
12 0 SECTION("foreign") { test_find(); }
6 6 SECTION("foreign") { test_find(); }
6 0 SECTION("foreign") { test_find(); }
2767 388 0 SECTION("reserve") { test_reserve(); }
388 0 SECTION("reserve") { test_reserve(); }
388 0 SECTION("reserve") { test_reserve(); }
388 0 SECTION("reserve") { test_reserve(); }
17 371 SECTION("reserve") { test_reserve(); }
17 0 SECTION("reserve") { test_reserve(); }
2768 388 0 SECTION("resize") { test_resize(); }
388 0 SECTION("resize") { test_resize(); }
388 0 SECTION("resize") { test_resize(); }
388 0 SECTION("resize") { test_resize(); }
6 382 SECTION("resize") { test_resize(); }
6 0 SECTION("resize") { test_resize(); }
2769 388 0 SECTION("shrink_to_fit") { test_shrink_to_fit(); }
388 0 SECTION("shrink_to_fit") { test_shrink_to_fit(); }
388 0 SECTION("shrink_to_fit") { test_shrink_to_fit(); }
388 0 SECTION("shrink_to_fit") { test_shrink_to_fit(); }
6 382 SECTION("shrink_to_fit") { test_shrink_to_fit(); }
6 0 SECTION("shrink_to_fit") { test_shrink_to_fit(); }
2770 388 0 SECTION("append") { test_append(); }
388 0 SECTION("append") { test_append(); }
388 0 SECTION("append") { test_append(); }
388 0 SECTION("append") { test_append(); }
10 378 SECTION("append") { test_append(); }
10 0 SECTION("append") { test_append(); }
2771 388 0 SECTION("operator +") {
388 0 SECTION("operator +") {
388 0 SECTION("operator +") {
388 0 SECTION("operator +") {
24 364 SECTION("operator +") {
2772 24 0 SECTION("local") { test_op_plus(); }
24 0 SECTION("local") { test_op_plus(); }
24 0 SECTION("local") { test_op_plus(); }
24 0 SECTION("local") { test_op_plus(); }
12 12 SECTION("local") { test_op_plus(); }
12 0 SECTION("local") { test_op_plus(); }
2773 24 0 SECTION("foreign") { test_op_plus(); }
24 0 SECTION("foreign") { test_op_plus(); }
24 0 SECTION("foreign") { test_op_plus(); }
24 0 SECTION("foreign") { test_op_plus(); }
12 12 SECTION("foreign") { test_op_plus(); }
12 0 SECTION("foreign") { test_op_plus(); }
2775 388 0 SECTION("insert") { test_insert(); }
388 0 SECTION("insert") { test_insert(); }
388 0 SECTION("insert") { test_insert(); }
388 0 SECTION("insert") { test_insert(); }
56 332 SECTION("insert") { test_insert(); }
56 0 SECTION("insert") { test_insert(); }
2776 388 0 SECTION("replace") { test_replace(); }
388 0 SECTION("replace") { test_replace(); }
388 0 SECTION("replace") { test_replace(); }
388 0 SECTION("replace") { test_replace(); }
36 352 SECTION("replace") { test_replace(); }
36 0 SECTION("replace") { test_replace(); }
2777 388 0 SECTION("shared_detach") { test_shared_detach(); }
388 0 SECTION("shared_detach") { test_shared_detach(); }
388 0 SECTION("shared_detach") { test_shared_detach(); }
388 0 SECTION("shared_detach") { test_shared_detach(); }
4 384 SECTION("shared_detach") { test_shared_detach(); }
4 0 SECTION("shared_detach") { test_shared_detach(); }
2778 388 0 SECTION("to/from_number") { test_to_from_number(); }
388 0 SECTION("to/from_number") { test_to_from_number(); }
388 0 SECTION("to/from_number") { test_to_from_number(); }
388 0 SECTION("to/from_number") { test_to_from_number(); }
1 387 SECTION("to/from_number") { test_to_from_number(); }
1 0 SECTION("to/from_number") { test_to_from_number(); }
2779 388 0 SECTION("from foreign allocator") { test_foreign_allocator(); }
388 0 SECTION("from foreign allocator") { test_foreign_allocator(); }
388 0 SECTION("from foreign allocator") { test_foreign_allocator(); }
388 0 SECTION("from foreign allocator") { test_foreign_allocator(); }
5 383 SECTION("from foreign allocator") { test_foreign_allocator(); }
5 0 SECTION("from foreign allocator") { test_foreign_allocator(); }
2780 388 0 SECTION("c_str") { test_cstr(); }
388 0 SECTION("c_str") { test_cstr(); }
388 0 SECTION("c_str") { test_cstr(); }
388 0 SECTION("c_str") { test_cstr(); }
6 382 SECTION("c_str") { test_cstr(); }
6 0 SECTION("c_str") { test_cstr(); }