aboutsummaryrefslogtreecommitdiff
path: root/src/tests/atom.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-06-18 20:25:50 +0000
committerMike Buland <eichlan@xagasoft.com>2007-06-18 20:25:50 +0000
commitf58a0b3a1f657124076b96ba092e1f69e88af263 (patch)
treec8b509438ed537f673d1b4b8cf5d9c97e00ff3c6 /src/tests/atom.cpp
parent8b12972092777af56ae21f65b41f4c40d52c2367 (diff)
downloadlibbu++-f58a0b3a1f657124076b96ba092e1f69e88af263.tar.gz
libbu++-f58a0b3a1f657124076b96ba092e1f69e88af263.tar.bz2
libbu++-f58a0b3a1f657124076b96ba092e1f69e88af263.tar.xz
libbu++-f58a0b3a1f657124076b96ba092e1f69e88af263.zip
Added the atom class and did some more client work, it will close the socket
now when the end has been reached.
Diffstat (limited to 'src/tests/atom.cpp')
-rw-r--r--src/tests/atom.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tests/atom.cpp b/src/tests/atom.cpp
new file mode 100644
index 0000000..cf076b1
--- /dev/null
+++ b/src/tests/atom.cpp
@@ -0,0 +1,17 @@
1#include "bu/atom.h"
2#include <stdio.h>
3#include <stdlib.h>
4
5int main()
6{
7 Bu::Atom<int> aInt;
8 Bu::Atom<char *> aStr;
9
10 aStr.set("Hey there, dude");
11 aInt.set( 55 );
12 int me = aInt;
13 aInt = 12;
14 printf("%d, %d\n", aInt.get(), me );
15 printf("%s\n", aStr.get() );
16}
17