summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/qa/cppunit/test_streamstate.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/qa/cppunit/test_streamstate.cxx b/tools/qa/cppunit/test_streamstate.cxx
index 1040dc660a06..c2a4be0c5e00 100644
--- a/tools/qa/cppunit/test_streamstate.cxx
+++ b/tools/qa/cppunit/test_streamstate.cxx
@@ -68,7 +68,7 @@ namespace
aMemStream.Seek(STREAM_SEEK_TO_END);
//seeking to end doesn't set eof, reading past eof does
- CPPUNIT_ASSERT(!aMemStream.IsEof());
+ CPPUNIT_ASSERT(!aMemStream.eof());
CPPUNIT_ASSERT(aMemStream.good());
std_a = 78;
@@ -86,7 +86,7 @@ namespace
tools_a = 78;
aMemStream >> tools_a;
//so, now eof is set
- CPPUNIT_ASSERT(aMemStream.IsEof());
+ CPPUNIT_ASSERT(aMemStream.eof());
//a failed read doesn't change the data, it remains unchanged
CPPUNIT_ASSERT(tools_a == 78);
//nothing wrong with the stream, so not bad
@@ -94,6 +94,15 @@ namespace
//yet, the read didn't succeed
CPPUNIT_ASSERT(!aMemStream.good());
+ sal_uInt16 tools_b = 0x1122;
+ aMemStream.SeekRel(-1);
+ CPPUNIT_ASSERT(!aMemStream.eof());
+ CPPUNIT_ASSERT(aMemStream.good());
+ aMemStream >> tools_b;
+ CPPUNIT_ASSERT(!aMemStream.good());
+ CPPUNIT_ASSERT(aMemStream.eof());
+// CPPUNIT_ASSERT(tools_b == 0x1122); //nasty, real nasty
+
iss.clear();
iss.seekg(0);
CPPUNIT_ASSERT(iss.good());