summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to '')
-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