From 11d681d2bf92cbac970e57f4a47dd0de12a04ebd Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Thu, 1 Sep 2022 11:36:33 +0000 Subject: [PATCH] FOP-3091: Fix test git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1903809 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/afp/AFPRectanglePainterTestCase.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fop-core/src/test/java/org/apache/fop/afp/AFPRectanglePainterTestCase.java b/fop-core/src/test/java/org/apache/fop/afp/AFPRectanglePainterTestCase.java index 310fff26f..720289a73 100644 --- a/fop-core/src/test/java/org/apache/fop/afp/AFPRectanglePainterTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/afp/AFPRectanglePainterTestCase.java @@ -33,6 +33,8 @@ import org.apache.fop.afp.parser.MODCAParser; import org.apache.fop.afp.parser.UnparsedStructuredField; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.FopFactory; +import org.apache.fop.util.bitmap.BitmapImageUtil; +import org.apache.fop.util.bitmap.DefaultMonochromeBitmapConverter; public class AFPRectanglePainterTestCase { @Test @@ -43,7 +45,11 @@ public class AFPRectanglePainterTestCase { bis.skip(59); Assert.assertEquals(bis.read(), 0x8E); //start bis.skip(20); - Assert.assertEquals(bis.read(), 170); //mask data + if (BitmapImageUtil.createDefaultMonochromeBitmapConverter() instanceof DefaultMonochromeBitmapConverter) { + Assert.assertEquals(bis.read(), 255); //mask data + } else { + Assert.assertEquals(bis.read(), 170); //mask data + } bis.skip(1299); Assert.assertEquals(bis.read(), 0x8F); //end bis.skip(89); -- 2.39.5