aboutsummaryrefslogtreecommitdiff
path: root/src/unit
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/unit/fstring.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/unit/fstring.cpp b/src/unit/fstring.cpp
index 7be03a7..9430a83 100644
--- a/src/unit/fstring.cpp
+++ b/src/unit/fstring.cpp
@@ -8,6 +8,8 @@
8#include "bu/fstring.h" 8#include "bu/fstring.h"
9#include "bu/unitsuite.h" 9#include "bu/unitsuite.h"
10 10
11#include <dirent.h>
12
11class Unit : public Bu::UnitSuite 13class Unit : public Bu::UnitSuite
12{ 14{
13public: 15public:
@@ -25,6 +27,7 @@ public:
25 addTest( Unit::add3 ); 27 addTest( Unit::add3 );
26 addTest( Unit::add4 ); 28 addTest( Unit::add4 );
27 addTest( Unit::add5 ); 29 addTest( Unit::add5 );
30 addTest( Unit::add6 );
28 addTest( Unit::subStr1 ); 31 addTest( Unit::subStr1 );
29 } 32 }
30 33
@@ -140,6 +143,15 @@ public:
140 unitTest( b == "hey, sup?" ); 143 unitTest( b == "hey, sup?" );
141 } 144 }
142 145
146 void add6()
147 {
148 Bu::FString a("Hello");
149 char b[256] = {"Dude"};
150 Bu::FString c = a + "/" + b;
151
152 unitTest( c == "Hello/Dude" );
153 }
154
143 void subStr1() 155 void subStr1()
144 { 156 {
145 Bu::FString a("abcdefghijklmnop"); 157 Bu::FString a("abcdefghijklmnop");