From 0a80a1bb942b53c91a903aad4a500fbf650cbcae Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 13 Oct 2005 17:39:58 +0000 Subject: [PATCH] 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 --- .../fop/layoutengine/ElementListCheck.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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() -- 2.39.5