aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-05-17 05:56:26 +0000
committerMike Buland <eichlan@xagasoft.com>2007-05-17 05:56:26 +0000
commite0e7932a122614a0ff566fbfd8de5776de8b9f6d (patch)
treeae87ab46b677bfd05f340051a56f1edbc94862a9 /src/tests
parentdda94f3b53e02e117e6eb5758afa1410e1664c9f (diff)
downloadlibbu++-e0e7932a122614a0ff566fbfd8de5776de8b9f6d.tar.gz
libbu++-e0e7932a122614a0ff566fbfd8de5776de8b9f6d.tar.bz2
libbu++-e0e7932a122614a0ff566fbfd8de5776de8b9f6d.tar.xz
libbu++-e0e7932a122614a0ff566fbfd8de5776de8b9f6d.zip
Lots of cool new stuff, the Server class actually works for everything except
actually interacting with clients, and the Client class is almost there, except that it doesn't really do anything yet.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/hash.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/tests/hash.cpp b/src/tests/hash.cpp
new file mode 100644
index 0000000..73cfb27
--- /dev/null
+++ b/src/tests/hash.cpp
@@ -0,0 +1,24 @@
1#include "bu/hash.h"
2#include "bu/sptr.h"
3
4typedef struct Bob
5{
6 int nID;
7} Bob;
8
9int main()
10{
11 Bu::Hash<int, Bu::SPtr<const Bob> > lb;
12 for( int j = 0; j < 10; j++ )
13 {
14 Bob *b = new Bob;
15 b->nID = j;
16 lb.insert( j, b );
17 }
18
19 for( int j = 0; j < 10; j++ )
20 {
21 printf("%d\n", lb[j].value()->nID );
22 }
23}
24