diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2006-08-22 01:39:35 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2006-08-22 01:39:35 +0000 |
commit | 2fbfddde42fe4517837957e557c7323b2414f290 (patch) | |
tree | 90a0eee8c873d96e3c7d4e6fc6f02dcc9f1037df /test/java/org/apache/fop | |
parent | 72f287ef6f7991b08e92185475d6f6dfc332b289 (diff) | |
download | xmlgraphics-fop-2fbfddde42fe4517837957e557c7323b2414f290.tar.gz xmlgraphics-fop-2fbfddde42fe4517837957e557c7323b2414f290.zip |
Minor enhancement of FOTree test output
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@433456 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache/fop')
-rw-r--r-- | test/java/org/apache/fop/fotreetest/ext/AssertElement.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/test/java/org/apache/fop/fotreetest/ext/AssertElement.java b/test/java/org/apache/fop/fotreetest/ext/AssertElement.java index 3b678cdae..38bc0eb00 100644 --- a/test/java/org/apache/fop/fotreetest/ext/AssertElement.java +++ b/test/java/org/apache/fop/fotreetest/ext/AssertElement.java @@ -28,6 +28,7 @@ import org.apache.fop.fo.properties.KeepProperty; import org.apache.fop.fo.properties.LengthPairProperty; import org.apache.fop.fo.properties.LengthRangeProperty; import org.apache.fop.fo.properties.Property; +import org.apache.fop.fo.properties.SpaceProperty; import org.apache.fop.fotreetest.ResultCollector; import org.xml.sax.Attributes; @@ -85,14 +86,23 @@ public class AssertElement extends TestObj { if (kp != null) { prop = kp.getComponent(FOPropertyMapping.getSubPropertyId(component)); } + SpaceProperty sp = mainProp.getSpace(); + if (sp != null) { + prop = sp.getComponent(FOPropertyMapping.getSubPropertyId(component)); + } } String s = String.valueOf(prop); String expected = attlist.getValue("expected"); if (!expected.equals(s)) { - collector.notifyException(new IllegalStateException("Property '" + propName - + "' expected to evaluate to '" + expected + "' but got: " + s - + "\nLine #" + locator.getLineNumber() - + " Column #" + locator.getColumnNumber())); + collector.notifyException( + new IllegalStateException(locator.getSystemId() + + "\nProperty '" + propName + + "' expected to evaluate to '" + expected + + "' but got '" + s + + "'\n(test:assert in " + + propertyList.getParentFObj().getName() + + " at line #" + locator.getLineNumber() + + ", column #" + locator.getColumnNumber() + ")\n")); } } |