From 46725741fc82866e41652dee7adeddf376fde618 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 15 Mar 2007 04:03:52 +0000 Subject: FString is totally usable, a few more helpers must be written before it surpases the other classes in functionality. It's already rather fast. --- src/tests/fstring.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/tests/fstring.cpp (limited to 'src/tests/fstring.cpp') 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 @@ +#include "fstring.h" + +int main( int argc, char *argv ) +{ + FString str("[] this won't be in there", 3); + + str.append("Hello"); + str.append(" th"); + str.append("ere."); + + if( str == "[] Hello there." ) + printf("1) check\n"); + + if( str != "[] Hello there. " ) + printf("2) check\n"); + + if( str != "[] Hello there." ) + printf("3) failed\n"); + else + printf("3) check\n"); + + str += " How are you?"; + + str.prepend("Bob says: "); + + printf("%s\n", str.c_str() ); +} + -- cgit v1.2.3