From: Simon Steiner Date: Thu, 1 Sep 2022 11:36:33 +0000 (+0000) Subject: FOP-3091: Fix test X-Git-Tag: fop-2_8~2^2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=11d681d2bf92cbac970e57f4a47dd0de12a04ebd;p=xmlgraphics-fop.git FOP-3091: Fix test git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1903809 13f79535-47bb-0310-9956-ffa450edef68 --- 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);