From 5ec9a131e12d021c42b46b601f5e79502485bebb Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 27 Jun 2007 15:42:50 +0000 Subject: The MemBuf works just fine, although it still can't over-write data in the buffer. --- src/unit/file.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/unit/file.cpp') diff --git a/src/unit/file.cpp b/src/unit/file.cpp index a45b8d7..1eaaf36 100644 --- a/src/unit/file.cpp +++ b/src/unit/file.cpp @@ -87,8 +87,14 @@ public: unitTest( sf.isEOS() == false ); try { - sf.read( buf, 5 ); - unitFailed("No exception thrown"); + if( sf.read( buf, 5 ) > 0 ) + { + unitFailed("Non-zero read result"); + } + else + { + sf.close(); + } } catch( Bu::FileException &e ) { -- cgit v1.2.3