From 3f958097632256329cdbaf2219e2ba15325e9c52 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 11 Feb 2009 22:51:25 +0000 Subject: Hey, formatter, awesome, and look at that...I'm adding uuid support. --- src/tests/stdstream.cpp | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'src/tests') 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 @@ #include "bu/sio.h" +using Bu::sio; +using Bu::Fmt; + int main() { - Bu::sio << "Hello there" << Bu::sio.nl; + sio << "Hello there" << sio.nl; + + sio << "sizeof(Fmt) = " << sizeof(Fmt) << sio.nl; + + sio << -123 << ", " << 0 << ", " << 123 << sio.nl; + + sio << "+----------+" << sio.nl; + sio << "|" << Fmt( 10, 10, Fmt::Center ) << "Test" << "|" << sio.nl; + sio << "+----------+" << sio.nl; + sio << "|" << Fmt( 10, 10, Fmt::Left ) << 123 << "|" << sio.nl; + sio << "|" << Fmt( 10, 10, Fmt::Center ) << 123 << "|" << sio.nl; + sio << "|" << Fmt( 10, 10, Fmt::Right ) << 123 << "|" << sio.nl; + sio << "+----------+" << sio.nl; - Bu::sio << "sizeof(Fmt) = " << sizeof(Bu::Fmt) << Bu::sio.nl; + sio << Fmt(10,Fmt::Left) << "Hexcode:" << Fmt::ptr() << (&sio) << sio.nl; - Bu::sio << -123 << ", " << 0 << ", " << 123 << Bu::sio.nl; + sio << 0.123 << sio.nl; + sio << true << " and then " << false << sio.nl; - Bu::sio << "+----------+" << Bu::sio.nl; - Bu::sio << "|" << Bu::Fmt( 10, 10, Bu::Fmt::Center ) << "Test" << "|" << Bu::sio.nl; - Bu::sio << "+----------+" << Bu::sio.nl; - Bu::sio << "|" << Bu::Fmt( 10, 10, Bu::Fmt::Left ) << 123 << "|" << Bu::sio.nl; - Bu::sio << "|" << Bu::Fmt( 10, 10, Bu::Fmt::Center ) << 123 << "|" << Bu::sio.nl; - Bu::sio << "|" << Bu::Fmt( 10, 10, Bu::Fmt::Right ) << 123 << "|" << Bu::sio.nl; - Bu::sio << "+----------+" << Bu::sio.nl; + //for( int j = 2; j <= 36; j++ ) + // sio << "radix(" << j << ") = " << Fmt().radix( j ) << 255 << sio.nl; return 0; } -- cgit v1.2.3