aboutsummaryrefslogtreecommitdiff
path: root/src/unit
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-04-10 06:23:07 +0000
committerMike Buland <eichlan@xagasoft.com>2009-04-10 06:23:07 +0000
commitfc96db275f65a9d5adc4a40758f50297fc5bdbf0 (patch)
tree6757c7e3dd2f008a243f50c3d1cc2c8fb42b7a94 /src/unit
parenteb23533db14ce9d712dad87b08e4df11d77fa3d3 (diff)
downloadlibbu++-fc96db275f65a9d5adc4a40758f50297fc5bdbf0.tar.gz
libbu++-fc96db275f65a9d5adc4a40758f50297fc5bdbf0.tar.bz2
libbu++-fc96db275f65a9d5adc4a40758f50297fc5bdbf0.tar.xz
libbu++-fc96db275f65a9d5adc4a40758f50297fc5bdbf0.zip
Added some new goodness to the fbasicstring, fixing some inconsistancies and
adding some more helpers. Hopefully this won't affect anything, but if it complains about any functions not working the way they used to, see if they're returning an int or an iterator. I made several functions handle iterators instead of ints, the int versions have an "Idx" suffix added now. I'm trying to switch entirely to iterators to reduce flattening and increase performance and stability. Also...something must have changed in the cache code...
Diffstat (limited to 'src/unit')
-rw-r--r--src/unit/fstring.unit9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/unit/fstring.unit b/src/unit/fstring.unit
index fbebd39..7314095 100644
--- a/src/unit/fstring.unit
+++ b/src/unit/fstring.unit
@@ -141,11 +141,10 @@
141{%subStr1} 141{%subStr1}
142{ 142{
143 Bu::FString a("abcdefghijklmnop"); 143 Bu::FString a("abcdefghijklmnop");
144 unitTest( a.getSubStr( 5, 3 ) == "fgh" ); 144 Bu::FString::iterator i = a.find('f');
145 unitTest( a.getSubStr( 10 ) == "klmnop" ); 145 unitTest( a.getSubStr( i, Bu::FString::iterator() ) == "fghijklmnop" );
146 unitTest( a.getSubStr( 40 ) == "" ); 146 Bu::FString::iterator j = i.find('l');
147 unitTest( a.getSubStr( -10 ) == "abcdefghijklmnop" ); 147 unitTest( a.getSubStr( i, j ) == "fghijk" );
148 unitTest( a.getSubStr( -15, 4 ) == "abcd" );
149} 148}
150 149
151{%compareSub1} 150{%compareSub1}