From: Jeremias Maerki Date: Thu, 13 Oct 2005 17:39:58 +0000 (+0000) Subject: Enable stretch and shrink checking on glues. X-Git-Tag: fop-0_90-alpha1~133 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0a80a1bb942b53c91a903aad4a500fbf650cbcae;p=xmlgraphics-fop.git Enable stretch and shrink checking on glues. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@320822 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/java/org/apache/fop/layoutengine/ElementListCheck.java b/test/java/org/apache/fop/layoutengine/ElementListCheck.java index bf6cc0fdb..151dbd18d 100644 --- a/test/java/org/apache/fop/layoutengine/ElementListCheck.java +++ b/test/java/org/apache/fop/layoutengine/ElementListCheck.java @@ -185,7 +185,22 @@ public class ElementListCheck implements LayoutEngineCheck { + " but got: " + knuthEl.getW()); } } - //TODO Check stretch and shrink + if (domEl.getAttribute("y").length() > 0) { + int stretch = Integer.parseInt(domEl.getAttribute("y")); + if (stretch != knuthEl.getY()) { + fail("Expected y=" + stretch + + " (stretch) at position " + pos + + " but got: " + knuthEl.getY()); + } + } + if (domEl.getAttribute("z").length() > 0) { + int shrink = Integer.parseInt(domEl.getAttribute("z")); + if (shrink != knuthEl.getZ()) { + fail("Expected z=" + shrink + + " (shrink) at position " + pos + + " but got: " + knuthEl.getZ()); + } + } } else { throw new IllegalArgumentException("Invalid child node for 'element-list': " + domEl.getLocalName()