aboutsummaryrefslogtreecommitdiff
path: root/src/tests/stdstream.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tests/stdstream.cpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/tests/stdstream.cpp b/src/tests/stdstream.cpp
index d67f9b8..cb22e22 100644
--- a/src/tests/stdstream.cpp
+++ b/src/tests/stdstream.cpp
@@ -1,20 +1,31 @@
1#include "bu/sio.h" 1#include "bu/sio.h"
2 2
3using Bu::sio;
4using Bu::Fmt;
5
3int main() 6int main()
4{ 7{
5 Bu::sio << "Hello there" << Bu::sio.nl; 8 sio << "Hello there" << sio.nl;
9
10 sio << "sizeof(Fmt) = " << sizeof(Fmt) << sio.nl;
11
12 sio << -123 << ", " << 0 << ", " << 123 << sio.nl;
13
14 sio << "+----------+" << sio.nl;
15 sio << "|" << Fmt( 10, 10, Fmt::Center ) << "Test" << "|" << sio.nl;
16 sio << "+----------+" << sio.nl;
17 sio << "|" << Fmt( 10, 10, Fmt::Left ) << 123 << "|" << sio.nl;
18 sio << "|" << Fmt( 10, 10, Fmt::Center ) << 123 << "|" << sio.nl;
19 sio << "|" << Fmt( 10, 10, Fmt::Right ) << 123 << "|" << sio.nl;
20 sio << "+----------+" << sio.nl;
6 21
7 Bu::sio << "sizeof(Fmt) = " << sizeof(Bu::Fmt) << Bu::sio.nl; 22 sio << Fmt(10,Fmt::Left) << "Hexcode:" << Fmt::ptr() << (&sio) << sio.nl;
8 23
9 Bu::sio << -123 << ", " << 0 << ", " << 123 << Bu::sio.nl; 24 sio << 0.123 << sio.nl;
25 sio << true << " and then " << false << sio.nl;
10 26
11 Bu::sio << "+----------+" << Bu::sio.nl; 27 //for( int j = 2; j <= 36; j++ )
12 Bu::sio << "|" << Bu::Fmt( 10, 10, Bu::Fmt::Center ) << "Test" << "|" << Bu::sio.nl; 28 // sio << "radix(" << j << ") = " << Fmt().radix( j ) << 255 << sio.nl;
13 Bu::sio << "+----------+" << Bu::sio.nl;
14 Bu::sio << "|" << Bu::Fmt( 10, 10, Bu::Fmt::Left ) << 123 << "|" << Bu::sio.nl;
15 Bu::sio << "|" << Bu::Fmt( 10, 10, Bu::Fmt::Center ) << 123 << "|" << Bu::sio.nl;
16 Bu::sio << "|" << Bu::Fmt( 10, 10, Bu::Fmt::Right ) << 123 << "|" << Bu::sio.nl;
17 Bu::sio << "+----------+" << Bu::sio.nl;
18 29
19 return 0; 30 return 0;
20} 31}