From ee53f39e9acfc255fd584c695ca4a23b9deb8511 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 10 Jul 2007 02:28:04 +0000 Subject: OK, this time I really fixed it so that it compares raw strings and FStrings the right way. --- src/unit/fstring.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/unit') diff --git a/src/unit/fstring.cpp b/src/unit/fstring.cpp index 72755eb..2c6bf7a 100644 --- a/src/unit/fstring.cpp +++ b/src/unit/fstring.cpp @@ -7,17 +7,26 @@ public: Unit() { setName("FString"); - addTest( Unit::test1 ); + addTest( Unit::compare1 ); + addTest( Unit::compare2 ); } virtual ~Unit() { } - void test1() + void compare1() { - unitTest( 1 == 1 ); - unitTest( 1 == 0 ); + Bu::FString b("Bob"); + unitTest( !(b == "Bobo") ); + unitTest( b == "Bob" ); + } + + void compare2() + { + Bu::FString b("Bobo"); + unitTest( !(b == "Bob") ); + unitTest( b == "Bobo" ); } }; -- cgit v1.2.3