From c6523112b63839a418648a3107f1b07026b9ce2d Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 10 Sep 2009 20:30:12 +0000 Subject: Hey, minor updates to the formatter and a unit test, nothing important. --- src/formatter.h | 2 +- src/tests/stdstream.cpp | 2 +- src/unit/fstring.unit | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/formatter.h b/src/formatter.h index 9f407a4..9e25529 100644 --- a/src/formatter.h +++ b/src/formatter.h @@ -241,7 +241,7 @@ namespace Bu Formatter &operator<<( Formatter &rOut, bool b ); template - Formatter &operator<<( Formatter &rOut, type *p ) + Formatter &operator<<( Formatter &rOut, const type *p ) { rOut << (ptrdiff_t)(p); return rOut; diff --git a/src/tests/stdstream.cpp b/src/tests/stdstream.cpp index 3aa9005..33d44b7 100644 --- a/src/tests/stdstream.cpp +++ b/src/tests/stdstream.cpp @@ -26,7 +26,7 @@ int main() sio << "|" << Fmt( 10, 10, Fmt::Right ) << 123 << "|" << sio.nl; sio << "+----------+" << sio.nl; - sio << Fmt(10,Fmt::Left) << "Hexcode:" << Fmt::ptr() << (&sio) << sio.nl; + sio << Fmt(10,Fmt::Left) << "Hexcode:" << Fmt::ptr() << (void*)(&sio) << sio.nl; sio << 0.123 << sio.nl; sio << true << " and then " << false << sio.nl; diff --git a/src/unit/fstring.unit b/src/unit/fstring.unit index 53ae780..3e4456d 100644 --- a/src/unit/fstring.unit +++ b/src/unit/fstring.unit @@ -301,3 +301,14 @@ l.set( b.begin() ); unitTest( l == "thisthisthisthithisthisthisth" ); } + +{%isSet1} +{ + Bu::FString bob; + + unitTest( bob.isSet() == false ); + bob = "something"; + unitTest( bob.isSet() == true ); + bob = ""; + unitTest( bob.isSet() == false ); +} -- cgit v1.2.3