summaryrefslogtreecommitdiff
path: root/src/tests/console.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-08-09 05:30:34 +0000
committerMike Buland <eichlan@xagasoft.com>2009-08-09 05:30:34 +0000
commit4e86c50016ecfea40a72930cdd0460143f9edf4a (patch)
treee13c153b8042752a64134b3565e0e87a61d51398 /src/tests/console.cpp
parent9e48c6f7d602364eb1c18de7e1e4c00e4852839c (diff)
downloadlibbu++-4e86c50016ecfea40a72930cdd0460143f9edf4a.tar.gz
libbu++-4e86c50016ecfea40a72930cdd0460143f9edf4a.tar.bz2
libbu++-4e86c50016ecfea40a72930cdd0460143f9edf4a.tar.xz
libbu++-4e86c50016ecfea40a72930cdd0460143f9edf4a.zip
Really, just a lot of documenting.
Diffstat (limited to 'src/tests/console.cpp')
-rw-r--r--src/tests/console.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/tests/console.cpp b/src/tests/console.cpp
new file mode 100644
index 0000000..628482b
--- /dev/null
+++ b/src/tests/console.cpp
@@ -0,0 +1,36 @@
1#include <bu/sio.h>
2using namespace Bu;
3
4#include <iostream>
5using namespace std;
6
7typedef struct Counter
8{
9 Counter() : i( 0 )
10 {
11 }
12
13 int get()
14 {
15 i++;
16 return i-1;
17 }
18
19 int i;
20} Counter;
21
22template<typename a>
23void runtest( a &out )
24{
25 Counter c;
26 out << c.get() << ", " << c.get() << ", " << c.get() << ", " << c.get() << ", " << c.get() << "\n";
27}
28
29int main()
30{
31 runtest( cout );
32 runtest( sio );
33
34 return 0;
35}
36