Check stream error in LastRead() unit test too
It doesn't make sense to call LastRead() if an error happened while reading, so check if it did.
This commit is contained in:
parent
414f211b8a
commit
3978a0df0e
1 changed files with 4 additions and 2 deletions
|
|
@ -170,9 +170,11 @@ protected:
|
|||
|
||||
char buf[5];
|
||||
(void)stream_in.Read(buf, 5);
|
||||
CPPUNIT_ASSERT_EQUAL(5, stream_in.LastRead());
|
||||
REQUIRE( stream_in.GetLastError() == wxSTREAM_NO_ERROR );
|
||||
CHECK( stream_in.LastRead() == 5 );
|
||||
(void)stream_in.GetC();
|
||||
CPPUNIT_ASSERT_EQUAL(1, stream_in.LastRead());
|
||||
REQUIRE( stream_in.GetLastError() == wxSTREAM_NO_ERROR );
|
||||
CHECK( stream_in.LastRead() == 1 );
|
||||
}
|
||||
|
||||
void Input_CanRead()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue