]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-3091: Fix test
authorSimon Steiner <ssteiner@apache.org>
Thu, 1 Sep 2022 11:36:33 +0000 (11:36 +0000)
committerSimon Steiner <ssteiner@apache.org>
Thu, 1 Sep 2022 11:36:33 +0000 (11:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1903809 13f79535-47bb-0310-9956-ffa450edef68

fop-core/src/test/java/org/apache/fop/afp/AFPRectanglePainterTestCase.java

index 310fff26f3c449368f5cabb7b81b839fff1a7333..720289a73a9721ebda47d684b1d45a71568d12e4 100644 (file)
@@ -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);