diff options
author | Max Horn | 2008-07-29 17:42:19 +0000 |
---|---|---|
committer | Max Horn | 2008-07-29 17:42:19 +0000 |
commit | aaa4d104f7eb4094ec6bd69ef2d44f80edd61aa4 (patch) | |
tree | f515c39e140b5ddd37f46060578d3b41759a15e3 /test/common/subreadstream.h | |
parent | 0a95a4814cbc9453f3af7abb46d6998409d96f53 (diff) | |
download | scummvm-rg350-aaa4d104f7eb4094ec6bd69ef2d44f80edd61aa4.tar.gz scummvm-rg350-aaa4d104f7eb4094ec6bd69ef2d44f80edd61aa4.tar.bz2 scummvm-rg350-aaa4d104f7eb4094ec6bd69ef2d44f80edd61aa4.zip |
Added two new classes, BufferedReadStream & BufferedSeekableReadStream, as proposed on scummvm-devel
svn-id: r33419
Diffstat (limited to 'test/common/subreadstream.h')
-rw-r--r-- | test/common/subreadstream.h | 15 |
1 files changed, 6 insertions, 9 deletions
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 ); } |