aboutsummaryrefslogtreecommitdiff
path: root/src/tests/fstring.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-03-15 04:03:52 +0000
committerMike Buland <eichlan@xagasoft.com>2007-03-15 04:03:52 +0000
commit46725741fc82866e41652dee7adeddf376fde618 (patch)
treec3577a311ce4a5242f7eaf0d8359649013fb4cf8 /src/tests/fstring.cpp
parent571f489db6a49809e29c6b1f9c3f2fd08089f012 (diff)
downloadlibbu++-46725741fc82866e41652dee7adeddf376fde618.tar.gz
libbu++-46725741fc82866e41652dee7adeddf376fde618.tar.bz2
libbu++-46725741fc82866e41652dee7adeddf376fde618.tar.xz
libbu++-46725741fc82866e41652dee7adeddf376fde618.zip
FString is totally usable, a few more helpers must be written before it surpases
the other classes in functionality. It's already rather fast.
Diffstat (limited to 'src/tests/fstring.cpp')
-rw-r--r--src/tests/fstring.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tests/fstring.cpp b/src/tests/fstring.cpp
new file mode 100644
index 0000000..26905ac
--- /dev/null
+++ b/src/tests/fstring.cpp
@@ -0,0 +1,28 @@
1#include "fstring.h"
2
3int main( int argc, char *argv )
4{
5 FString str("[] this won't be in there", 3);
6
7 str.append("Hello");
8 str.append(" th");
9 str.append("ere.");
10
11 if( str == "[] Hello there." )
12 printf("1) check\n");
13
14 if( str != "[] Hello there. " )
15 printf("2) check\n");
16
17 if( str != "[] Hello there." )
18 printf("3) failed\n");
19 else
20 printf("3) check\n");
21
22 str += " How are you?";
23
24 str.prepend("Bob says: ");
25
26 printf("%s\n", str.c_str() );
27}
28