aboutsummaryrefslogtreecommitdiff
path: root/src/tests/console.cpp
diff options
context:
space:
mode:
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