From 8c3f900fc99d77e478766a6b0fa34c23253cc79e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 20 Jan 2011 19:31:44 +0000 Subject: Fixed a really strang, really hard to nail down corner case in String --- src/unit/string.unit | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/unit/string.unit') 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 b = a; b.getStr(); } + + test padding1 + { + Bu::String a; + a.append('a'); + a.append('b'); + a.append('c'); + a.append("hello"); + a.clear(); + } + + test padding2 + { + Bu::String src("It's all sorts of things"); + Bu::String::const_iterator i = src.find('a'); + Bu::String::const_iterator j = src.find('f'); + Bu::String a, b; + a.append( i ); + i += 2; + a.append( i, j ); + a.append('a'); + a.append('b'); + a.append('c'); + a.append("hello"); + a.append( src ); + b = a; + a.clear(); + } } -- cgit v1.2.3