diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-02-11 22:51:25 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-02-11 22:51:25 +0000 |
commit | 3f958097632256329cdbaf2219e2ba15325e9c52 (patch) | |
tree | e7616f7db3709d68ae51d6da0ef8ce44600bd33f /src/tests/stdstream.cpp | |
parent | f4b191f0ea396b58465bfba40749977780a3af58 (diff) | |
download | libbu++-3f958097632256329cdbaf2219e2ba15325e9c52.tar.gz libbu++-3f958097632256329cdbaf2219e2ba15325e9c52.tar.bz2 libbu++-3f958097632256329cdbaf2219e2ba15325e9c52.tar.xz libbu++-3f958097632256329cdbaf2219e2ba15325e9c52.zip |
Hey, formatter, awesome, and look at that...I'm adding uuid support.
Diffstat (limited to '')
-rw-r--r-- | src/tests/stdstream.cpp | 31 |
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 | ||
3 | using Bu::sio; | ||
4 | using Bu::Fmt; | ||
5 | |||
3 | int main() | 6 | int 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 | } |