vcl/qa/cppunit/BitmapTest.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit ea45b306d824938d2dc01e6988be210c3a042efe Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Oct 8 11:40:55 2019 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Jun 16 14:29:48 2020 +0200 Document that accessing an empty bitmap is legal It no longer triggers an assert in --enable-assert-always-abort builds since 2293aa3a15a0fc0566c0e15872fdc215d0ab2fe6 "Remove dubious assert 'Forbidden Access to empty bitmap!'". Change-Id: I1c50b7f167fa1e1ba0b465934eabd195285abd4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/80437 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index 640c477e3515..02d9fdf2cd56 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -48,6 +48,7 @@ class BitmapTest : public CppUnit::TestFixture void testErase(); void testBitmap32(); void testOctree(); + void testEmptyAccess(); CPPUNIT_TEST_SUITE(BitmapTest); CPPUNIT_TEST(testCreation); @@ -62,6 +63,7 @@ class BitmapTest : public CppUnit::TestFixture CPPUNIT_TEST(testErase); CPPUNIT_TEST(testBitmap32); CPPUNIT_TEST(testOctree); + CPPUNIT_TEST(testEmptyAccess); CPPUNIT_TEST_SUITE_END(); }; @@ -651,6 +653,14 @@ void BitmapTest::testOctree() } } +void BitmapTest::testEmptyAccess() +{ + Bitmap empty; + BitmapInfoAccess access(empty); + CPPUNIT_ASSERT_EQUAL(long(0), access.Width()); + CPPUNIT_ASSERT_EQUAL(long(0), access.Height()); +} + } // namespace CPPUNIT_TEST_SUITE_REGISTRATION(BitmapTest); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits