summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-02 14:09:13 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-10-07 17:04:45 +0200
commit0d00e5650679786728231a580b1cd46e409038cc (patch)
tree716b543df2c850966beef1bdf25fda23d0615301
parenta9a6e154301fef99fe294591e0b327ace7e0945f (diff)
adjust a confusing test
GetPrefSize() at this point is Size(0,0), so the test was testing topleft corner. And getPixel() takes Y,X , so even then it wasn't testing the center. Change-Id: Ie2e489a693fae2b7ea41075ebe6fa3ef405545d5 Reviewed-on: https://gerrit.libreoffice.org/80351 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r--vcl/qa/cppunit/gen/gen.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qa/cppunit/gen/gen.cxx b/vcl/qa/cppunit/gen/gen.cxx
index 6dfd3da71079..dfcfaa997b80 100644
--- a/vcl/qa/cppunit/gen/gen.cxx
+++ b/vcl/qa/cppunit/gen/gen.cxx
@@ -68,8 +68,8 @@ CPPUNIT_TEST_FIXTURE(GenTest, testTdf121120)
{
Bitmap aBitmap = load("tdf121120.png");
Bitmap::ScopedReadAccess pAccess(aBitmap);
- const Size& rSize = aBitmap.GetPrefSize();
- Color aColor(pAccess->GetPixel(rSize.getWidth() / 2, rSize.getHeight() / 2));
+ const Size& rSize = aBitmap.GetSizePixel();
+ Color aColor(pAccess->GetPixel(rSize.getHeight() / 2, rSize.getWidth() / 2));
// Without the accompanying fix in place, this test would have failed with 'Expected: 255;
// Actual : 1'. I.e. center of the preview (which has the background color) was ~black, not
// white.