diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-09-10 20:30:12 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-09-10 20:30:12 +0000 |
commit | c6523112b63839a418648a3107f1b07026b9ce2d (patch) | |
tree | b8785f0f232b1af313a0179fbee7b6abcdf01368 | |
parent | 2c1bfa4da2ae809b6580ed1d6cd420cdba2806d0 (diff) | |
download | libbu++-c6523112b63839a418648a3107f1b07026b9ce2d.tar.gz libbu++-c6523112b63839a418648a3107f1b07026b9ce2d.tar.bz2 libbu++-c6523112b63839a418648a3107f1b07026b9ce2d.tar.xz libbu++-c6523112b63839a418648a3107f1b07026b9ce2d.zip |
Hey, minor updates to the formatter and a unit test, nothing important.
Diffstat (limited to '')
-rw-r--r-- | src/formatter.h | 2 | ||||
-rw-r--r-- | src/tests/stdstream.cpp | 2 | ||||
-rw-r--r-- | src/unit/fstring.unit | 11 |
3 files changed, 13 insertions, 2 deletions
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 | |||
241 | Formatter &operator<<( Formatter &rOut, bool b ); | 241 | Formatter &operator<<( Formatter &rOut, bool b ); |
242 | 242 | ||
243 | template<typename type> | 243 | template<typename type> |
244 | Formatter &operator<<( Formatter &rOut, type *p ) | 244 | Formatter &operator<<( Formatter &rOut, const type *p ) |
245 | { | 245 | { |
246 | rOut << (ptrdiff_t)(p); | 246 | rOut << (ptrdiff_t)(p); |
247 | return rOut; | 247 | 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() | |||
26 | sio << "|" << Fmt( 10, 10, Fmt::Right ) << 123 << "|" << sio.nl; | 26 | sio << "|" << Fmt( 10, 10, Fmt::Right ) << 123 << "|" << sio.nl; |
27 | sio << "+----------+" << sio.nl; | 27 | sio << "+----------+" << sio.nl; |
28 | 28 | ||
29 | sio << Fmt(10,Fmt::Left) << "Hexcode:" << Fmt::ptr() << (&sio) << sio.nl; | 29 | sio << Fmt(10,Fmt::Left) << "Hexcode:" << Fmt::ptr() << (void*)(&sio) << sio.nl; |
30 | 30 | ||
31 | sio << 0.123 << sio.nl; | 31 | sio << 0.123 << sio.nl; |
32 | sio << true << " and then " << false << sio.nl; | 32 | 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 @@ | |||
301 | l.set( b.begin() ); | 301 | l.set( b.begin() ); |
302 | unitTest( l == "thisthisthisthithisthisthisth" ); | 302 | unitTest( l == "thisthisthisthithisthisthisth" ); |
303 | } | 303 | } |
304 | |||
305 | {%isSet1} | ||
306 | { | ||
307 | Bu::FString bob; | ||
308 | |||
309 | unitTest( bob.isSet() == false ); | ||
310 | bob = "something"; | ||
311 | unitTest( bob.isSet() == true ); | ||
312 | bob = ""; | ||
313 | unitTest( bob.isSet() == false ); | ||
314 | } | ||