From aaa4d104f7eb4094ec6bd69ef2d44f80edd61aa4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 29 Jul 2008 17:42:19 +0000 Subject: Added two new classes, BufferedReadStream & BufferedSeekableReadStream, as proposed on scummvm-devel svn-id: r33419 --- test/common/subreadstream.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'test/common/subreadstream.h') diff --git a/test/common/subreadstream.h b/test/common/subreadstream.h index c48f57c3a8..4e14448c06 100644 --- a/test/common/subreadstream.h +++ b/test/common/subreadstream.h @@ -2,25 +2,22 @@ #include "common/stream.h" -class SubReadStreamTestSuite : public CxxTest::TestSuite -{ +class SubReadStreamTestSuite : public CxxTest::TestSuite { public: - void test_traverse( void ) - { + void test_traverse(void) { byte contents[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - Common::MemoryReadStream ms = Common::MemoryReadStream(contents, 10); + Common::MemoryReadStream ms(contents, 10); int end = 5; - Common::SubReadStream srs = Common::SubReadStream(&ms, end); + Common::SubReadStream srs(&ms, end); int i; byte b; - for (i = 0; i < end; ++i) - { + for (i = 0; i < end; ++i) { TS_ASSERT( !srs.eos() ); - srs.read(&b, 1); + b = srs.readByte(); TS_ASSERT_EQUALS( i, b ); } -- cgit v1.2.3