From a380109af0e7694574b42b2513f98876e0fc48ac Mon Sep 17 00:00:00 2001 From: Matthew Wilber Date: Sat, 1 Nov 2003 13:59:02 +0000 Subject: [PATCH] Added workarounds for problems with Be's version git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5227 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/kits/translation/BitmapStreamTest.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/tests/kits/translation/BitmapStreamTest.cpp b/src/tests/kits/translation/BitmapStreamTest.cpp index 68ece18170..9a00ce4796 100644 --- a/src/tests/kits/translation/BitmapStreamTest.cpp +++ b/src/tests/kits/translation/BitmapStreamTest.cpp @@ -69,15 +69,15 @@ BitmapStreamTest::Suite() suite->addTest(new TC("BitmapStreamTest::DetachBitmap Test", &BitmapStreamTest::DetachBitmapTest)); - - suite->addTest(new TC("BitmapStreamTest::ReadWrite Test", - &BitmapStreamTest::ReadWriteTest)); suite->addTest(new TC("BitmapStreamTest::Seek Test", &BitmapStreamTest::SeekTest)); suite->addTest(new TC("BitmapStreamTest::SetSize Test", &BitmapStreamTest::SetSizeTest)); + + suite->addTest(new TC("BitmapStreamTest::ReadWrite Test", + &BitmapStreamTest::ReadWriteTest)); return suite; } @@ -302,7 +302,13 @@ BitmapStreamTest::ReadWriteTest() 1) == B_ERROR); CPPUNIT_ASSERT(stream.ReadAt(stream.Size() + 1, &(chbuf[0]), 1) == B_ERROR); - CPPUNIT_ASSERT(stream.ReadAt(0, NULL, 1) == B_BAD_VALUE); + #if !TEST_R5 + // Be's version doesn't check for NULL + CPPUNIT_ASSERT(stream.ReadAt(0, NULL, 1) == B_BAD_VALUE); + #endif + + // There is a segment violation with Be's version when stream is destroyed. + // Don't yet know why. } /**