aboutsummaryrefslogtreecommitdiff
path: root/test/common/subreadstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/common/subreadstream.h')
-rw-r--r--test/common/subreadstream.h15
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 );
}