summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/archive.cpp4
-rw-r--r--src/tests/cache.cpp18
-rw-r--r--src/tests/fastcgi.cpp8
-rw-r--r--src/tests/fstratsptr.cpp8
-rw-r--r--src/tests/fstrformat.cpp4
-rw-r--r--src/tests/fstring.cpp28
-rw-r--r--src/tests/fstrstd.cpp4
-rw-r--r--src/tests/hash2.cpp4
-rw-r--r--src/tests/heap.cpp14
-rw-r--r--src/tests/listsort.cpp6
-rw-r--r--src/tests/mmparse.cpp2
-rw-r--r--src/tests/optparser.cpp2
-rw-r--r--src/tests/sha1.cpp4
-rw-r--r--src/tests/signals.cpp24
-rw-r--r--src/tests/size.cpp6
-rw-r--r--src/tests/speed.cpp6
-rw-r--r--src/tests/streamstack.cpp4
-rw-r--r--src/tests/telnetsrv.cpp2
18 files changed, 74 insertions, 74 deletions
diff --git a/src/tests/archive.cpp b/src/tests/archive.cpp
index 08e3b17..de227b0 100644
--- a/src/tests/archive.cpp
+++ b/src/tests/archive.cpp
@@ -7,7 +7,7 @@
7 7
8#include "bu/archive.h" 8#include "bu/archive.h"
9#include "bu/file.h" 9#include "bu/file.h"
10#include "bu/fstring.h" 10#include "bu/string.h"
11 11
12using namespace Bu; 12using namespace Bu;
13 13
@@ -16,7 +16,7 @@ int main()
16 File f("test.dat", File::WriteNew ); 16 File f("test.dat", File::WriteNew );
17 Archive ar( f, Archive::save ); 17 Archive ar( f, Archive::save );
18 18
19 Bu::FString s("Hello there"); 19 Bu::String s("Hello there");
20 ar << s; 20 ar << s;
21 21
22 ar.setProp("hi", 45 ); 22 ar.setProp("hi", 45 );
diff --git a/src/tests/cache.cpp b/src/tests/cache.cpp
index 7fe660a..38a5591 100644
--- a/src/tests/cache.cpp
+++ b/src/tests/cache.cpp
@@ -14,7 +14,7 @@
14 14
15#include "bu/cache.h" 15#include "bu/cache.h"
16#include "bu/file.h" 16#include "bu/file.h"
17#include "bu/fstring.h" 17#include "bu/string.h"
18#include "bu/cachecalc.h" 18#include "bu/cachecalc.h"
19 19
20class Bob 20class Bob
@@ -90,7 +90,7 @@ public:
90 writeNum("bobcache/last", cLastId ); 90 writeNum("bobcache/last", cLastId );
91 } 91 }
92 92
93 long readNum( const Bu::FString &sFile ) 93 long readNum( const Bu::String &sFile )
94 { 94 {
95 TRACE( sFile ); 95 TRACE( sFile );
96 Bu::File f( sFile, Bu::File::Read ); 96 Bu::File f( sFile, Bu::File::Read );
@@ -99,13 +99,13 @@ public:
99 return strtol( buf, NULL, 0 ); 99 return strtol( buf, NULL, 0 );
100 } 100 }
101 101
102 void writeNum( const Bu::FString &sFile, long num ) 102 void writeNum( const Bu::String &sFile, long num )
103 { 103 {
104 TRACE( sFile, num ); 104 TRACE( sFile, num );
105 Bu::File f( sFile, 105 Bu::File f( sFile,
106 Bu::File::Write|Bu::File::Create|Bu::File::Truncate 106 Bu::File::Write|Bu::File::Create|Bu::File::Truncate
107 ); 107 );
108 Bu::FString s; 108 Bu::String s;
109 s.format("%d", num ); 109 s.format("%d", num );
110 f.write( s ); 110 f.write( s );
111 } 111 }
@@ -126,7 +126,7 @@ public:
126 virtual Bob *load( const long &key ) 126 virtual Bob *load( const long &key )
127 { 127 {
128 TRACE( key ); 128 TRACE( key );
129 Bu::FString sDest; 129 Bu::String sDest;
130 sDest.format("bobcache/%d", key ); 130 sDest.format("bobcache/%d", key );
131 return new Bob( readNum( sDest ) ); 131 return new Bob( readNum( sDest ) );
132 } 132 }
@@ -134,7 +134,7 @@ public:
134 virtual void unload( Bob *pObj, const long &key ) 134 virtual void unload( Bob *pObj, const long &key )
135 { 135 {
136 TRACE( pObj, key ); 136 TRACE( pObj, key );
137 Bu::FString sDest; 137 Bu::String sDest;
138 sDest.format("bobcache/%d", key ); 138 sDest.format("bobcache/%d", key );
139 writeNum( sDest, pObj->getInt() ); 139 writeNum( sDest, pObj->getInt() );
140 delete pObj; 140 delete pObj;
@@ -144,7 +144,7 @@ public:
144 { 144 {
145 TRACE( rSrc ); 145 TRACE( rSrc );
146 long id = ++cLastId; 146 long id = ++cLastId;
147 Bu::FString sDest; 147 Bu::String sDest;
148 sDest.format("bobcache/%d", id ); 148 sDest.format("bobcache/%d", id );
149 writeNum( sDest, rSrc->getInt() ); 149 writeNum( sDest, rSrc->getInt() );
150 return id; 150 return id;
@@ -153,7 +153,7 @@ public:
153 virtual void destroy( Bob *pObj, const long &key ) 153 virtual void destroy( Bob *pObj, const long &key )
154 { 154 {
155 TRACE( pObj, key ); 155 TRACE( pObj, key );
156 Bu::FString sDest; 156 Bu::String sDest;
157 sDest.format("bobcache/%d", key ); 157 sDest.format("bobcache/%d", key );
158 if( !access( sDest.getStr(), F_OK ) ) 158 if( !access( sDest.getStr(), F_OK ) )
159 unlink( sDest.getStr() ); 159 unlink( sDest.getStr() );
@@ -163,7 +163,7 @@ public:
163 virtual void destroy( const long &key ) 163 virtual void destroy( const long &key )
164 { 164 {
165 TRACE( pObj, key ); 165 TRACE( pObj, key );
166 Bu::FString sDest; 166 Bu::String sDest;
167 sDest.format("bobcache/%d", key ); 167 sDest.format("bobcache/%d", key );
168 if( !access( sDest.getStr(), F_OK ) ) 168 if( !access( sDest.getStr(), F_OK ) )
169 unlink( sDest.getStr() ); 169 unlink( sDest.getStr() );
diff --git a/src/tests/fastcgi.cpp b/src/tests/fastcgi.cpp
index a3fa675..5f7758e 100644
--- a/src/tests/fastcgi.cpp
+++ b/src/tests/fastcgi.cpp
@@ -27,10 +27,10 @@ public:
27 } 27 }
28 28
29 virtual int onRequest( const StrHash &hParams, 29 virtual int onRequest( const StrHash &hParams,
30 const Bu::FString &sStdIn, Bu::Stream &sStdOut, 30 const Bu::String &sStdIn, Bu::Stream &sStdOut,
31 Bu::Stream &/*sStdErr*/ ) 31 Bu::Stream &/*sStdErr*/ )
32 { 32 {
33 Bu::FString sOut("Content-Type: text/html\r\n\r\n"); 33 Bu::String sOut("Content-Type: text/html\r\n\r\n");
34 sOut += "<html><body><h1>Environment:</h1><ul>"; 34 sOut += "<html><body><h1>Environment:</h1><ul>";
35 for( StrHash::const_iterator i = hParams.begin(); i; i++ ) 35 for( StrHash::const_iterator i = hParams.begin(); i; i++ )
36 { 36 {
@@ -44,8 +44,8 @@ public:
44 sOut += "</li></ul>"; 44 sOut += "</li></ul>";
45 sOut += "<h1>Stdin:</h1>"; 45 sOut += "<h1>Stdin:</h1>";
46 sOut.formatAppend("%d bytes<pre>", sStdIn.getSize() ); 46 sOut.formatAppend("%d bytes<pre>", sStdIn.getSize() );
47 Bu::FString sL, sR; 47 Bu::String sL, sR;
48 for( Bu::FString::const_iterator i = sStdIn.begin(); 48 for( Bu::String::const_iterator i = sStdIn.begin();
49 i; i++ ) 49 i; i++ )
50 { 50 {
51 sL.formatAppend("%02X ", 51 sL.formatAppend("%02X ",
diff --git a/src/tests/fstratsptr.cpp b/src/tests/fstratsptr.cpp
index 2303d6a..fa38459 100644
--- a/src/tests/fstratsptr.cpp
+++ b/src/tests/fstratsptr.cpp
@@ -5,7 +5,7 @@
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
6 */ 6 */
7 7
8#include "bu/fstring.h" 8#include "bu/string.h"
9#include "bu/atom.h" 9#include "bu/atom.h"
10#include "bu/sptr.h" 10#include "bu/sptr.h"
11 11
@@ -15,8 +15,8 @@ public:
15 Person(){}; 15 Person(){};
16 virtual ~Person(){}; 16 virtual ~Person(){};
17 17
18 Bu::Atom<Bu::FString> sFirstName; 18 Bu::Atom<Bu::String> sFirstName;
19 Bu::Atom<Bu::FString> sLastName; 19 Bu::Atom<Bu::String> sLastName;
20}; 20};
21 21
22typedef Bu::SPtr<Person> PersonPtr; 22typedef Bu::SPtr<Person> PersonPtr;
@@ -45,7 +45,7 @@ int main()
45 Swap(one, two); 45 Swap(one, two);
46*/ 46*/
47 47
48 Bu::Atom<Bu::FString> sOne, sTwo; 48 Bu::Atom<Bu::String> sOne, sTwo;
49 sOne = "Hello"; 49 sOne = "Hello";
50 sTwo = sOne; 50 sTwo = sOne;
51 51
diff --git a/src/tests/fstrformat.cpp b/src/tests/fstrformat.cpp
index a8e9def..2f04fe9 100644
--- a/src/tests/fstrformat.cpp
+++ b/src/tests/fstrformat.cpp
@@ -5,12 +5,12 @@
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
6 */ 6 */
7 7
8#include "bu/fstring.h" 8#include "bu/string.h"
9#include <stdio.h> 9#include <stdio.h>
10 10
11int main() 11int main()
12{ 12{
13 Bu::FString s; 13 Bu::String s;
14 14
15 s.format("%d, %f, \'%s\'", 144, 12.5, "bob" ); 15 s.format("%d, %f, \'%s\'", 144, 12.5, "bob" );
16 16
diff --git a/src/tests/fstring.cpp b/src/tests/fstring.cpp
index c343172..acc3558 100644
--- a/src/tests/fstring.cpp
+++ b/src/tests/fstring.cpp
@@ -6,7 +6,7 @@
6 */ 6 */
7 7
8#include "bu/hash.h" 8#include "bu/hash.h"
9#include "bu/fstring.h" 9#include "bu/string.h"
10#include <sys/time.h> 10#include <sys/time.h>
11#include <string> 11#include <string>
12 12
@@ -27,9 +27,9 @@ inline double getTime()
27} 27}
28#endif 28#endif
29 29
30Bu::FString genThing() 30Bu::String genThing()
31{ 31{
32 Bu::FString bob; 32 Bu::String bob;
33 bob.append("ab "); 33 bob.append("ab ");
34 bob += "cd "; 34 bob += "cd ";
35 bob += "efg"; 35 bob += "efg";
@@ -39,7 +39,7 @@ Bu::FString genThing()
39 return bob; 39 return bob;
40} 40}
41 41
42void thing( Bu::FString str ) 42void thing( Bu::String str )
43{ 43{
44 printf("Hey: %s\n", str.getStr() ); 44 printf("Hey: %s\n", str.getStr() );
45} 45}
@@ -49,21 +49,21 @@ void copyfunc( std::string temp )
49 temp += "Hi"; 49 temp += "Hi";
50} 50}
51 51
52void copyfunc( Bu::FString temp ) 52void copyfunc( Bu::String temp )
53{ 53{
54 temp += "Hi"; 54 temp += "Hi";
55} 55}
56 56
57void doTimings() 57void doTimings()
58{ 58{
59 Bu::FString fs1, fs2; 59 Bu::String fs1, fs2;
60 std::string ss1, ss2; 60 std::string ss1, ss2;
61 double dStart, dEnd, tfs1, tfs2, tfs3, tss1, tss2, tss3; 61 double dStart, dEnd, tfs1, tfs2, tfs3, tss1, tss2, tss3;
62 int nChars = 500000, nChunks=5000, nCopies=5000000, nChunkSize=1024*4; 62 int nChars = 500000, nChunks=5000, nCopies=5000000, nChunkSize=1024*4;
63 char *buf = new char[nChunkSize]; 63 char *buf = new char[nChunkSize];
64 memset( buf, '!', nChunkSize ); 64 memset( buf, '!', nChunkSize );
65 65
66 printf("Timing Bu::FString single chars...\n"); 66 printf("Timing Bu::String single chars...\n");
67 dStart = getTime(); 67 dStart = getTime();
68 for( int j = 0; j < nChars; j++ ) fs1 += (char)('a'+(j%26)); 68 for( int j = 0; j < nChars; j++ ) fs1 += (char)('a'+(j%26));
69 fs1.getStr(); 69 fs1.getStr();
@@ -77,7 +77,7 @@ void doTimings()
77 dEnd = getTime(); 77 dEnd = getTime();
78 tss1 = dEnd-dStart; 78 tss1 = dEnd-dStart;
79 79
80 printf("Timing Bu::FString %d char chunks...\n", nChunkSize); 80 printf("Timing Bu::String %d char chunks...\n", nChunkSize);
81 dStart = getTime(); 81 dStart = getTime();
82 for( int j = 0; j < nChunks; j++ ) fs2.append(buf, nChunkSize); 82 for( int j = 0; j < nChunks; j++ ) fs2.append(buf, nChunkSize);
83 fs2.getStr(); 83 fs2.getStr();
@@ -93,9 +93,9 @@ void doTimings()
93 93
94 fs2 = "Hello there."; 94 fs2 = "Hello there.";
95 ss2 = "Hello there."; 95 ss2 = "Hello there.";
96 printf("Timing Bu::FString copies...\n"); 96 printf("Timing Bu::String copies...\n");
97 dStart = getTime(); 97 dStart = getTime();
98 for( int j = 0; j < nCopies; j++ ) Bu::FString stmp = fs2; 98 for( int j = 0; j < nCopies; j++ ) Bu::String stmp = fs2;
99 dEnd = getTime(); 99 dEnd = getTime();
100 tfs3 = dEnd-dStart; 100 tfs3 = dEnd-dStart;
101 101
@@ -107,7 +107,7 @@ void doTimings()
107 107
108 printf( 108 printf(
109 "Results: singles: chunks: copies:\n" 109 "Results: singles: chunks: copies:\n"
110 "Bu::FString %10.2f/s %10.2f/s %10.2f/s\n" 110 "Bu::String %10.2f/s %10.2f/s %10.2f/s\n"
111 "std::string %10.2f/s %10.2f/s %10.2f/s\n", 111 "std::string %10.2f/s %10.2f/s %10.2f/s\n",
112 nChars/tfs1, nChunks/tfs2, nCopies/tfs3, 112 nChars/tfs1, nChunks/tfs2, nCopies/tfs3,
113 nChars/tss1, nChunks/tss2, nCopies/tss3 ); 113 nChars/tss1, nChunks/tss2, nCopies/tss3 );
@@ -118,16 +118,16 @@ void doTimings()
118#define pem printf("---------\n%08tX: %s\n%08tX: %s\n", (ptrdiff_t)str.getStr(), str.getStr(), (ptrdiff_t)str2.getStr(), str2.getStr() ); 118#define pem printf("---------\n%08tX: %s\n%08tX: %s\n", (ptrdiff_t)str.getStr(), str.getStr(), (ptrdiff_t)str2.getStr(), str2.getStr() );
119int main( ) 119int main( )
120{ 120{
121 Bu::FString fs1; 121 Bu::String fs1;
122 for( int j = 0; j < 500000; j++ ) fs1 += (char)('a'+(j%26)); 122 for( int j = 0; j < 500000; j++ ) fs1 += (char)('a'+(j%26));
123 return 0; 123 return 0;
124 124
125 Bu::FString str("th"); 125 Bu::String str("th");
126 126
127 str.prepend("Hello "); 127 str.prepend("Hello ");
128 str.append("ere."); 128 str.append("ere.");
129 129
130 Bu::FString str2( str ); 130 Bu::String str2( str );
131 pem; 131 pem;
132 str += " What's up?"; 132 str += " What's up?";
133 pem; 133 pem;
diff --git a/src/tests/fstrstd.cpp b/src/tests/fstrstd.cpp
index 86d7c5c..4209c65 100644
--- a/src/tests/fstrstd.cpp
+++ b/src/tests/fstrstd.cpp
@@ -6,11 +6,11 @@
6 */ 6 */
7 7
8#include <iostream> 8#include <iostream>
9#include "bu/fstring.h" 9#include "bu/string.h"
10 10
11int main() 11int main()
12{ 12{
13 Bu::FString s("Hey there, dude.\n"); 13 Bu::String s("Hey there, dude.\n");
14 14
15// std::cout << s << 5; 15// std::cout << s << 5;
16} 16}
diff --git a/src/tests/hash2.cpp b/src/tests/hash2.cpp
index 4db248e..5f1dd09 100644
--- a/src/tests/hash2.cpp
+++ b/src/tests/hash2.cpp
@@ -5,12 +5,12 @@
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
6 */ 6 */
7 7
8#include <bu/fstring.h> 8#include <bu/string.h>
9#include <bu/hash.h> 9#include <bu/hash.h>
10 10
11int main() 11int main()
12{ 12{
13 Bu::Hash<Bu::FString, int> hCmd; 13 Bu::Hash<Bu::String, int> hCmd;
14 14
15 hCmd.insert("help", 5 ); 15 hCmd.insert("help", 5 );
16 hCmd.insert("exit", 5 ); 16 hCmd.insert("exit", 5 );
diff --git a/src/tests/heap.cpp b/src/tests/heap.cpp
index 7538936..3576f25 100644
--- a/src/tests/heap.cpp
+++ b/src/tests/heap.cpp
@@ -10,7 +10,7 @@
10 10
11#include "bu/formatter.h" 11#include "bu/formatter.h"
12#include "bu/heap.h" 12#include "bu/heap.h"
13#include "bu/fstring.h" 13#include "bu/string.h"
14#include "bu/file.h" 14#include "bu/file.h"
15 15
16typedef struct num 16typedef struct num
@@ -38,15 +38,15 @@ typedef struct num
38 } 38 }
39} num; 39} num;
40 40
41void printHeap( Bu::Heap<Bu::FString> &h, int j ) 41void printHeap( Bu::Heap<Bu::String> &h, int j )
42{ 42{
43// return; 43// return;
44 Bu::FString sFName; 44 Bu::String sFName;
45 sFName.format("graph-step-%02d.dot", j ); 45 sFName.format("graph-step-%02d.dot", j );
46 Bu::File fOut( sFName, Bu::File::WriteNew ); 46 Bu::File fOut( sFName, Bu::File::WriteNew );
47 Bu::Formatter f( fOut ); 47 Bu::Formatter f( fOut );
48 f << "Graph step: " << j << ", total size: " << h.getSize() << f.nl; 48 f << "Graph step: " << j << ", total size: " << h.getSize() << f.nl;
49 for( Bu::Heap<Bu::FString>::iterator i = h.begin(); i; i++ ) 49 for( Bu::Heap<Bu::String>::iterator i = h.begin(); i; i++ )
50 { 50 {
51 f << *i << f.nl; 51 f << *i << f.nl;
52 } 52 }
@@ -73,7 +73,7 @@ int main()
73 } 73 }
74 printf("\n"); 74 printf("\n");
75*/ 75*/
76 Bu::Heap<Bu::FString> hStr; 76 Bu::Heap<Bu::String> hStr;
77 int j = 0; 77 int j = 0;
78 78
79 hStr.enqueue("George"); 79 hStr.enqueue("George");
@@ -100,7 +100,7 @@ int main()
100 } 100 }
101 printf("\n"); 101 printf("\n");
102 102
103 Bu::List<Bu::FString> lStr; 103 Bu::List<Bu::String> lStr;
104 104
105 lStr.insertSorted("George"); 105 lStr.insertSorted("George");
106 lStr.insertSorted("George"); 106 lStr.insertSorted("George");
@@ -110,7 +110,7 @@ int main()
110 lStr.insertSorted("Brianna"); 110 lStr.insertSorted("Brianna");
111 lStr.insertSorted("Kate"); 111 lStr.insertSorted("Kate");
112 lStr.insertSorted("Soggy"); 112 lStr.insertSorted("Soggy");
113 for( Bu::List<Bu::FString>::iterator i = lStr.begin(); i; i++ ) 113 for( Bu::List<Bu::String>::iterator i = lStr.begin(); i; i++ )
114 { 114 {
115 printf("\"%s\" ", (*i).getStr() ); 115 printf("\"%s\" ", (*i).getStr() );
116 } 116 }
diff --git a/src/tests/listsort.cpp b/src/tests/listsort.cpp
index 60d9611..00e7268 100644
--- a/src/tests/listsort.cpp
+++ b/src/tests/listsort.cpp
@@ -7,7 +7,7 @@
7 7
8#include <bu/list.h> 8#include <bu/list.h>
9#include <bu/sio.h> 9#include <bu/sio.h>
10#include <bu/fstring.h> 10#include <bu/string.h>
11 11
12using namespace Bu; 12using namespace Bu;
13 13
@@ -25,7 +25,7 @@ int main()
25 il.sortI( cmp ); 25 il.sortI( cmp );
26 */ 26 */
27 27
28 FString a("Soggy"), b("Sam"); 28 String a("Soggy"), b("Sam");
29 29
30 if( a < b ) 30 if( a < b )
31 { 31 {
@@ -36,7 +36,7 @@ int main()
36 sio << "Good" << sio.nl; 36 sio << "Good" << sio.nl;
37 } 37 }
38 38
39 typedef List<FString> StrList; 39 typedef List<String> StrList;
40 40
41 StrList lNames; 41 StrList lNames;
42 42
diff --git a/src/tests/mmparse.cpp b/src/tests/mmparse.cpp
index b2c3bf5..1123d21 100644
--- a/src/tests/mmparse.cpp
+++ b/src/tests/mmparse.cpp
@@ -6,7 +6,7 @@
6 */ 6 */
7 7
8#include "bu/minimacro.h" 8#include "bu/minimacro.h"
9#include "bu/fstring.h" 9#include "bu/string.h"
10 10
11int main() 11int main()
12{ 12{
diff --git a/src/tests/optparser.cpp b/src/tests/optparser.cpp
index f5d1512..ae658df 100644
--- a/src/tests/optparser.cpp
+++ b/src/tests/optparser.cpp
@@ -72,7 +72,7 @@ public:
72 72
73 int iBob; 73 int iBob;
74 float dBob; 74 float dBob;
75 Bu::FString sVar; 75 Bu::String sVar;
76}; 76};
77 77
78int main( int argc, char *argv[] ) 78int main( int argc, char *argv[] )
diff --git a/src/tests/sha1.cpp b/src/tests/sha1.cpp
index b1c798a..84cebe5 100644
--- a/src/tests/sha1.cpp
+++ b/src/tests/sha1.cpp
@@ -28,8 +28,8 @@ int main( int argc, char *argv[] )
28 break; 28 break;
29 } 29 }
30 30
31 Bu::FString sRes = m.getResult(); 31 Bu::String sRes = m.getResult();
32 for( Bu::FString::iterator i = sRes.begin(); i; i++ ) 32 for( Bu::String::iterator i = sRes.begin(); i; i++ )
33 { 33 {
34 sio << Fmt::hex(2,false) << (int)(unsigned char)(*i); 34 sio << Fmt::hex(2,false) << (int)(unsigned char)(*i);
35 } 35 }
diff --git a/src/tests/signals.cpp b/src/tests/signals.cpp
index e53c16e..a8c8c4e 100644
--- a/src/tests/signals.cpp
+++ b/src/tests/signals.cpp
@@ -32,22 +32,22 @@ public:
32 sio << iState << ": void fnc1( " << a << " )" << sio.nl; 32 sio << iState << ": void fnc1( " << a << " )" << sio.nl;
33 } 33 }
34 34
35 void fnc2( int a, Bu::FString b ) 35 void fnc2( int a, Bu::String b )
36 { 36 {
37 sio << iState << ": void fnc2( " << a << ", \"" << b << "\" )" << sio.nl; 37 sio << iState << ": void fnc2( " << a << ", \"" << b << "\" )" << sio.nl;
38 } 38 }
39 39
40 void fnc3( int a, Bu::FString b, double c ) 40 void fnc3( int a, Bu::String b, double c )
41 { 41 {
42 sio << iState << ": void fnc3( " << a << ", \"" << b << "\", " << c << " )" << sio.nl; 42 sio << iState << ": void fnc3( " << a << ", \"" << b << "\", " << c << " )" << sio.nl;
43 } 43 }
44 44
45 void fnc4( int a, Bu::FString b, double c, char d ) 45 void fnc4( int a, Bu::String b, double c, char d )
46 { 46 {
47 sio << iState << ": void fnc4( " << a << ", \"" << b << "\", " << c << ", '" << d << "' )" << sio.nl; 47 sio << iState << ": void fnc4( " << a << ", \"" << b << "\", " << c << ", '" << d << "' )" << sio.nl;
48 } 48 }
49 49
50 void fnc5( int a, Bu::FString b, double c, char d, long e ) 50 void fnc5( int a, Bu::String b, double c, char d, long e )
51 { 51 {
52 sio << iState << ": void fnc5( " << a << ", \"" << b << "\", " << c << ", '" << d << "', " << e << " )" << sio.nl; 52 sio << iState << ": void fnc5( " << a << ", \"" << b << "\", " << c << ", '" << d << "', " << e << " )" << sio.nl;
53 } 53 }
@@ -66,22 +66,22 @@ void pfnc1( int a )
66 sio << ": void pfnc1( " << a << " )" << sio.nl; 66 sio << ": void pfnc1( " << a << " )" << sio.nl;
67} 67}
68 68
69void pfnc2( int a, Bu::FString b ) 69void pfnc2( int a, Bu::String b )
70{ 70{
71 sio << ": void pfnc2( " << a << ", \"" << b << "\" )" << sio.nl; 71 sio << ": void pfnc2( " << a << ", \"" << b << "\" )" << sio.nl;
72} 72}
73 73
74void pfnc3( int a, Bu::FString b, double c ) 74void pfnc3( int a, Bu::String b, double c )
75{ 75{
76 sio << ": void pfnc3( " << a << ", \"" << b << "\", " << c << " )" << sio.nl; 76 sio << ": void pfnc3( " << a << ", \"" << b << "\", " << c << " )" << sio.nl;
77} 77}
78 78
79void pfnc4( int a, Bu::FString b, double c, char d ) 79void pfnc4( int a, Bu::String b, double c, char d )
80{ 80{
81 sio << ": void pfnc4( " << a << ", \"" << b << "\", " << c << ", '" << d << "' )" << sio.nl; 81 sio << ": void pfnc4( " << a << ", \"" << b << "\", " << c << ", '" << d << "' )" << sio.nl;
82} 82}
83 83
84void pfnc5( int a, Bu::FString b, double c, char d, long e ) 84void pfnc5( int a, Bu::String b, double c, char d, long e )
85{ 85{
86 sio << ": void pfnc5( " << a << ", \"" << b << "\", " << c << ", '" << d << "', " << e << " )" << sio.nl; 86 sio << ": void pfnc5( " << a << ", \"" << b << "\", " << c << ", '" << d << "', " << e << " )" << sio.nl;
87} 87}
@@ -105,22 +105,22 @@ int main()
105 cb1 = slot( &pfnc1 ); 105 cb1 = slot( &pfnc1 );
106 cb1( 5 ); 106 cb1( 5 );
107 107
108 Signal2<void, int, Bu::FString> cb2( slot( &t, &Thing::fnc2 ) ); 108 Signal2<void, int, Bu::String> cb2( slot( &t, &Thing::fnc2 ) );
109 cb2( 5, "Hi there" ); 109 cb2( 5, "Hi there" );
110 cb2 = slot( &pfnc2 ); 110 cb2 = slot( &pfnc2 );
111 cb2( 5, "Hi there" ); 111 cb2( 5, "Hi there" );
112 112
113 Signal3<void, int, Bu::FString, double> cb3( slot( &t, &Thing::fnc3 ) ); 113 Signal3<void, int, Bu::String, double> cb3( slot( &t, &Thing::fnc3 ) );
114 cb3( 5, "Hi there", 12.85 ); 114 cb3( 5, "Hi there", 12.85 );
115 cb3 = slot( &pfnc3 ); 115 cb3 = slot( &pfnc3 );
116 cb3( 5, "Hi there", 12.85 ); 116 cb3( 5, "Hi there", 12.85 );
117 117
118 Signal4<void, int, Bu::FString, double, char> cb4( slot( &t, &Thing::fnc4 ) ); 118 Signal4<void, int, Bu::String, double, char> cb4( slot( &t, &Thing::fnc4 ) );
119 cb4( 5, "Hi there", 12.85, 'z' ); 119 cb4( 5, "Hi there", 12.85, 'z' );
120 cb4 = slot( &pfnc4 ); 120 cb4 = slot( &pfnc4 );
121 cb4( 5, "Hi there", 12.85, 'z' ); 121 cb4( 5, "Hi there", 12.85, 'z' );
122 122
123 Signal5<void, int, Bu::FString, double, char, long> cb5( slot( &t, &Thing::fnc5 ) ); 123 Signal5<void, int, Bu::String, double, char, long> cb5( slot( &t, &Thing::fnc5 ) );
124 cb5( 5, "Hi there", 12.85, 'z', 849 ); 124 cb5( 5, "Hi there", 12.85, 'z', 849 );
125 cb5 = slot( &pfnc5 ); 125 cb5 = slot( &pfnc5 );
126 cb5( 5, "Hi there", 12.85, 'z', 849 ); 126 cb5( 5, "Hi there", 12.85, 'z', 849 );
diff --git a/src/tests/size.cpp b/src/tests/size.cpp
index a9a921d..841325d 100644
--- a/src/tests/size.cpp
+++ b/src/tests/size.cpp
@@ -6,15 +6,15 @@
6 */ 6 */
7 7
8#include "bu/hash.h" 8#include "bu/hash.h"
9#include "bu/fstring.h" 9#include "bu/string.h"
10 10
11#define pSize( t ) printf("%15s: %db\n", #t, sizeof( t ) ); 11#define pSize( t ) printf("%15s: %db\n", #t, sizeof( t ) );
12 12
13int main() 13int main()
14{ 14{
15 typedef Bu::Hash<char, char> charcharHash; 15 typedef Bu::Hash<char, char> charcharHash;
16 typedef Bu::Hash<Bu::FString, Bu::FString> strstrHash; 16 typedef Bu::Hash<Bu::String, Bu::String> strstrHash;
17 pSize( Bu::FString ); 17 pSize( Bu::String );
18 pSize( charcharHash ); 18 pSize( charcharHash );
19 pSize( strstrHash ); 19 pSize( strstrHash );
20} 20}
diff --git a/src/tests/speed.cpp b/src/tests/speed.cpp
index c6770de..c78dded 100644
--- a/src/tests/speed.cpp
+++ b/src/tests/speed.cpp
@@ -5,7 +5,7 @@
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
6 */ 6 */
7 7
8#include "bu/fstring.h" 8#include "bu/string.h"
9#include <sys/time.h> 9#include <sys/time.h>
10 10
11template<typename a> 11template<typename a>
@@ -50,9 +50,9 @@ void fullTest( tst t )
50 50
51int main() 51int main()
52{ 52{
53 Bu::FString str; 53 Bu::String str;
54 for( int j = 0; j < 500; j++ ) 54 for( int j = 0; j < 500; j++ )
55 str.append("Hey, this is a test string. It will be reapeated many, many times. How's that?"); 55 str.append("Hey, this is a test string. It will be reapeated many, many times. How's that?");
56 fullTest( tstCopy<Bu::FString>( str ) ); 56 fullTest( tstCopy<Bu::String>( str ) );
57} 57}
58 58
diff --git a/src/tests/streamstack.cpp b/src/tests/streamstack.cpp
index b8c48e7..ea9ec0b 100644
--- a/src/tests/streamstack.cpp
+++ b/src/tests/streamstack.cpp
@@ -24,7 +24,7 @@ public:
24 24
25 void write() 25 void write()
26 { 26 {
27 Bu::FString s; 27 Bu::String s;
28 time_t tNow = time( NULL ); 28 time_t tNow = time( NULL );
29 s = ctime( &tNow ); 29 s = ctime( &tNow );
30 long lSize = s.getSize()-1; 30 long lSize = s.getSize()-1;
@@ -34,7 +34,7 @@ public:
34 34
35 void read() 35 void read()
36 { 36 {
37 Bu::FString s; 37 Bu::String s;
38 long lSize; 38 long lSize;
39 rStream.read( &lSize, sizeof(long) ); 39 rStream.read( &lSize, sizeof(long) );
40 s.setSize( lSize ); 40 s.setSize( lSize );
diff --git a/src/tests/telnetsrv.cpp b/src/tests/telnetsrv.cpp
index 4504aaf..f62714a 100644
--- a/src/tests/telnetsrv.cpp
+++ b/src/tests/telnetsrv.cpp
@@ -36,7 +36,7 @@ public:
36 printf("New dim = (%dx%d)\n", iWidth, iHeight ); 36 printf("New dim = (%dx%d)\n", iWidth, iHeight );
37 } 37 }
38 38
39 virtual void gotLine( Bu::FString &sLine ) 39 virtual void gotLine( Bu::String &sLine )
40 { 40 {
41 printf("Line: \"%s\"\n", sLine.getStr() ); 41 printf("Line: \"%s\"\n", sLine.getStr() );
42 write("\n\r", 2 ); 42 write("\n\r", 2 );