summaryrefslogtreecommitdiff
path: root/src/tests/fstring.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-03-15 06:57:03 +0000
committerMike Buland <eichlan@xagasoft.com>2007-03-15 06:57:03 +0000
commit505410a5c3b93f81deda8b9653c2237a433be5c1 (patch)
treee4ac25af48878cdf466571a3d70577de9d3f890a /src/tests/fstring.cpp
parentcf847cc534a2a7ad06750c446028b7c6d126fe21 (diff)
downloadlibbu++-505410a5c3b93f81deda8b9653c2237a433be5c1.tar.gz
libbu++-505410a5c3b93f81deda8b9653c2237a433be5c1.tar.bz2
libbu++-505410a5c3b93f81deda8b9653c2237a433be5c1.tar.xz
libbu++-505410a5c3b93f81deda8b9653c2237a433be5c1.zip
This version may break hashing of strings, but at least you can hash FStrings...
templates are confusing.
Diffstat (limited to '')
-rw-r--r--src/tests/fstring.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tests/fstring.cpp b/src/tests/fstring.cpp
index cb85282..33e24b4 100644
--- a/src/tests/fstring.cpp
+++ b/src/tests/fstring.cpp
@@ -1,3 +1,4 @@
1#include "hash.h"
1#include "fstring.h" 2#include "fstring.h"
2 3
3FString genThing() 4FString genThing()
@@ -11,6 +12,11 @@ FString genThing()
11 return bob; 12 return bob;
12} 13}
13 14
15void thing( FString str )
16{
17 printf("Hey: %s\n", str.c_str() );
18}
19
14#define pem printf("---------\n%08X: %s\n%08X: %s\n", (unsigned int)str.c_str(), str.c_str(), (unsigned int)str2.c_str(), str2.c_str() ); 20#define pem printf("---------\n%08X: %s\n%08X: %s\n", (unsigned int)str.c_str(), str.c_str(), (unsigned int)str2.c_str(), str2.c_str() );
15int main( int argc, char *argv ) 21int main( int argc, char *argv )
16{ 22{
@@ -33,5 +39,9 @@ int main( int argc, char *argv )
33 39
34 str = str2; 40 str = str2;
35 pem; 41 pem;
42
43 thing( str2 );
44
45 printf("%d == %d\n", __calcHashCode( str ), __calcHashCode( str.c_str() ) );
36} 46}
37 47