diff options
author | Max Kellermann <max@duempel.org> | 2014-08-19 22:29:52 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-19 22:29:52 +0200 |
commit | bb472206dee0adcff09b2efccfb5795101b45705 (patch) | |
tree | 6c9e7fd526b71113b3991d57cef7a8c944d713bb /test/test_rewind.cxx | |
parent | d87cf5146e8c64907a0c3ee6f3f36745163c295c (diff) | |
download | mpd-bb472206dee0adcff09b2efccfb5795101b45705.tar.gz mpd-bb472206dee0adcff09b2efccfb5795101b45705.tar.xz mpd-bb472206dee0adcff09b2efccfb5795101b45705.zip |
InputStream: move typedef offset_type to Offset.hxx
Reduce header dependencies.
Diffstat (limited to '')
-rw-r--r-- | test/test_rewind.cxx | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/test/test_rewind.cxx b/test/test_rewind.cxx index 193eb905f..3ab37427a 100644 --- a/test/test_rewind.cxx +++ b/test/test_rewind.cxx @@ -72,8 +72,7 @@ public: ris->Update(); CPPUNIT_ASSERT(ris->IsReady()); CPPUNIT_ASSERT(!ris->KnownSize()); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(0), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(0), ris->GetOffset()); Error error; char buffer[16]; @@ -81,50 +80,43 @@ public: CPPUNIT_ASSERT_EQUAL(size_t(2), nbytes); CPPUNIT_ASSERT_EQUAL('f', buffer[0]); CPPUNIT_ASSERT_EQUAL('o', buffer[1]); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(2), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(2), ris->GetOffset()); CPPUNIT_ASSERT(!ris->IsEOF()); nbytes = ris->Read(buffer, 2, error); CPPUNIT_ASSERT_EQUAL(size_t(2), nbytes); CPPUNIT_ASSERT_EQUAL('o', buffer[0]); CPPUNIT_ASSERT_EQUAL(' ', buffer[1]); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(4), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(4), ris->GetOffset()); CPPUNIT_ASSERT(!ris->IsEOF()); CPPUNIT_ASSERT(ris->Seek(1, error)); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(1), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(1), ris->GetOffset()); CPPUNIT_ASSERT(!ris->IsEOF()); nbytes = ris->Read(buffer, 2, error); CPPUNIT_ASSERT_EQUAL(size_t(2), nbytes); CPPUNIT_ASSERT_EQUAL('o', buffer[0]); CPPUNIT_ASSERT_EQUAL('o', buffer[1]); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(3), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(3), ris->GetOffset()); CPPUNIT_ASSERT(!ris->IsEOF()); CPPUNIT_ASSERT(ris->Seek(0, error)); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(0), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(0), ris->GetOffset()); CPPUNIT_ASSERT(!ris->IsEOF()); nbytes = ris->Read(buffer, 2, error); CPPUNIT_ASSERT_EQUAL(size_t(2), nbytes); CPPUNIT_ASSERT_EQUAL('f', buffer[0]); CPPUNIT_ASSERT_EQUAL('o', buffer[1]); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(2), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(2), ris->GetOffset()); CPPUNIT_ASSERT(!ris->IsEOF()); nbytes = ris->Read(buffer, sizeof(buffer), error); CPPUNIT_ASSERT_EQUAL(size_t(2), nbytes); CPPUNIT_ASSERT_EQUAL('o', buffer[0]); CPPUNIT_ASSERT_EQUAL(' ', buffer[1]); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(4), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(4), ris->GetOffset()); CPPUNIT_ASSERT(!ris->IsEOF()); nbytes = ris->Read(buffer, sizeof(buffer), error); @@ -132,13 +124,11 @@ public: CPPUNIT_ASSERT_EQUAL('b', buffer[0]); CPPUNIT_ASSERT_EQUAL('a', buffer[1]); CPPUNIT_ASSERT_EQUAL('r', buffer[2]); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(7), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(7), ris->GetOffset()); CPPUNIT_ASSERT(ris->IsEOF()); CPPUNIT_ASSERT(ris->Seek(3, error)); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(3), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(3), ris->GetOffset()); CPPUNIT_ASSERT(!ris->IsEOF()); nbytes = ris->Read(buffer, sizeof(buffer), error); @@ -147,8 +137,7 @@ public: CPPUNIT_ASSERT_EQUAL('b', buffer[1]); CPPUNIT_ASSERT_EQUAL('a', buffer[2]); CPPUNIT_ASSERT_EQUAL('r', buffer[3]); - CPPUNIT_ASSERT_EQUAL(InputStream::offset_type(7), - ris->GetOffset()); + CPPUNIT_ASSERT_EQUAL(offset_type(7), ris->GetOffset()); CPPUNIT_ASSERT(ris->IsEOF()); } }; |