From 53d9ceb63801e094e8ca209bf8e43db3b0ba975d Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 11 Dec 2008 14:38:25 +0000 Subject: [PATCH] Run AT tests only if there are such tests. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@725702 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/layoutengine/LayoutEngineTester.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java b/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java index 27209e37f..583a41954 100644 --- a/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java +++ b/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java @@ -223,11 +223,15 @@ public class LayoutEngineTester { Document doc = (Document)res.getNode(); Element root = doc.getDocumentElement(); - Element atChecks = (Element)root.getElementsByTagName("at-checks").item(0); - doATChecks(atChecks, result); + NodeList nodes; + //AT tests only when checks are available + nodes = root.getElementsByTagName("at-checks"); + if (nodes.getLength() > 0) { + Element atChecks = (Element)nodes.item(0); + doATChecks(atChecks, result); + } //IF tests only when checks are available - NodeList nodes; nodes = root.getElementsByTagName("if-checks"); if (nodes.getLength() > 0) { Element ifChecks = (Element)nodes.item(0); -- 2.39.5