diff options
author | Willem Jan Palenstijn | 2008-09-14 22:28:53 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2008-09-14 22:28:53 +0000 |
commit | c8eeae8d4dffa5849a23cf963884027a7789504b (patch) | |
tree | 1f2a0de23851cb7e7d1d77114c8379aa27f4fb85 /test/common/bufferedreadstream.h | |
parent | fbfe30bf861af9b83325e0c7fecd4b0a68da5af9 (diff) | |
download | scummvm-rg350-c8eeae8d4dffa5849a23cf963884027a7789504b.tar.gz scummvm-rg350-c8eeae8d4dffa5849a23cf963884027a7789504b.tar.bz2 scummvm-rg350-c8eeae8d4dffa5849a23cf963884027a7789504b.zip |
Big patch changing semantics of ReadStream::eos():
eos() now only returns true _after_ trying to read past the end of the stream.
This has a large potential for regressions. Please test!
svn-id: r34549
Diffstat (limited to 'test/common/bufferedreadstream.h')
-rw-r--r-- | test/common/bufferedreadstream.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/common/bufferedreadstream.h b/test/common/bufferedreadstream.h index 2644745af2..c580fd18de 100644 --- a/test/common/bufferedreadstream.h +++ b/test/common/bufferedreadstream.h @@ -9,7 +9,7 @@ class BufferedReadStreamTestSuite : public CxxTest::TestSuite { Common::MemoryReadStream ms(contents, 10); // Use a buffer size of 4 -- note that 10 % 4 != 0, - // so we test what happens if the cache can't be completly + // so we test what happens if the cache can't be completely // refilled. Common::BufferedReadStream srs(&ms, 4); @@ -21,6 +21,10 @@ class BufferedReadStreamTestSuite : public CxxTest::TestSuite { TS_ASSERT_EQUALS( i, b ); } - TS_ASSERT( srs.eos() ); + TS_ASSERT( !srs.eos() ); + + b = srs.readByte(); + + TS_ASSERT ( srs.eos() ); } }; |