aboutsummaryrefslogtreecommitdiff
path: root/src/unit
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-07-10 02:28:04 +0000
committerMike Buland <eichlan@xagasoft.com>2007-07-10 02:28:04 +0000
commitee53f39e9acfc255fd584c695ca4a23b9deb8511 (patch)
tree631f9141a20e751c424de8a5c2f00dae728eae89 /src/unit
parent59b42558f5fca931c054df87d94c119f87130ec0 (diff)
downloadlibbu++-ee53f39e9acfc255fd584c695ca4a23b9deb8511.tar.gz
libbu++-ee53f39e9acfc255fd584c695ca4a23b9deb8511.tar.bz2
libbu++-ee53f39e9acfc255fd584c695ca4a23b9deb8511.tar.xz
libbu++-ee53f39e9acfc255fd584c695ca4a23b9deb8511.zip
OK, this time I really fixed it so that it compares raw strings and FStrings
the right way.
Diffstat (limited to '')
-rw-r--r--src/unit/fstring.cpp17
1 files changed, 13 insertions, 4 deletions
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:
7 Unit() 7 Unit()
8 { 8 {
9 setName("FString"); 9 setName("FString");
10 addTest( Unit::test1 ); 10 addTest( Unit::compare1 );
11 addTest( Unit::compare2 );
11 } 12 }
12 13
13 virtual ~Unit() 14 virtual ~Unit()
14 { 15 {
15 } 16 }
16 17
17 void test1() 18 void compare1()
18 { 19 {
19 unitTest( 1 == 1 ); 20 Bu::FString b("Bob");
20 unitTest( 1 == 0 ); 21 unitTest( !(b == "Bobo") );
22 unitTest( b == "Bob" );
23 }
24
25 void compare2()
26 {
27 Bu::FString b("Bobo");
28 unitTest( !(b == "Bob") );
29 unitTest( b == "Bobo" );
21 } 30 }
22}; 31};
23 32