summaryrefslogtreecommitdiff
path: root/src/unit
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 19:31:44 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 19:31:44 +0000
commit8c3f900fc99d77e478766a6b0fa34c23253cc79e (patch)
tree7af5fbcf01a15c6cc76c6a10e85e61ae931d32fe /src/unit
parenta9243f2c4e5cecfc0564f7951de92fd267510408 (diff)
downloadlibbu++-8c3f900fc99d77e478766a6b0fa34c23253cc79e.tar.gz
libbu++-8c3f900fc99d77e478766a6b0fa34c23253cc79e.tar.bz2
libbu++-8c3f900fc99d77e478766a6b0fa34c23253cc79e.tar.xz
libbu++-8c3f900fc99d77e478766a6b0fa34c23253cc79e.zip
Fixed a really strang, really hard to nail down corner case in String
Diffstat (limited to 'src/unit')
-rw-r--r--src/unit/string.unit28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/unit/string.unit b/src/unit/string.unit
index f51e4de..872dbed 100644
--- a/src/unit/string.unit
+++ b/src/unit/string.unit
@@ -348,4 +348,32 @@ suite String
348 b = a; 348 b = a;
349 b.getStr(); 349 b.getStr();
350 } 350 }
351
352 test padding1
353 {
354 Bu::String a;
355 a.append('a');
356 a.append('b');
357 a.append('c');
358 a.append("hello");
359 a.clear();
360 }
361
362 test padding2
363 {
364 Bu::String src("It's all sorts of things");
365 Bu::String::const_iterator i = src.find('a');
366 Bu::String::const_iterator j = src.find('f');
367 Bu::String a, b;
368 a.append( i );
369 i += 2;
370 a.append( i, j );
371 a.append('a');
372 a.append('b');
373 a.append('c');
374 a.append("hello");
375 a.append( src );
376 b = a;
377 a.clear();
378 }
351} 379}