aboutsummaryrefslogtreecommitdiffstats
path: root/test/java/org/apache/fop/fotreetest/ext
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2008-02-07 22:41:26 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2008-02-07 22:41:26 +0000
commit8786f3b949673f898cbc4de203e2320e74f2f050 (patch)
treeaa307ea2562860a5258a8e037d246f4a53419930 /test/java/org/apache/fop/fotreetest/ext
parente3d7d048142f35bf93b0ba9f1294124de49be34e (diff)
downloadxmlgraphics-fop-8786f3b949673f898cbc4de203e2320e74f2f050.tar.gz
xmlgraphics-fop-8786f3b949673f898cbc4de203e2320e74f2f050.zip
Tweak: modify PercentLength.toString() to return a value that facilitates debugging.
Moved the original code to a getString() implementation, which is now used by the fotree test suite. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@619674 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache/fop/fotreetest/ext')
-rw-r--r--test/java/org/apache/fop/fotreetest/ext/AssertElement.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/java/org/apache/fop/fotreetest/ext/AssertElement.java b/test/java/org/apache/fop/fotreetest/ext/AssertElement.java
index 38bc0eb00..b141c8f4a 100644
--- a/test/java/org/apache/fop/fotreetest/ext/AssertElement.java
+++ b/test/java/org/apache/fop/fotreetest/ext/AssertElement.java
@@ -27,6 +27,7 @@ import org.apache.fop.fo.PropertyList;
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.PercentLength;
import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.SpaceProperty;
import org.apache.fop.fotreetest.ResultCollector;
@@ -91,7 +92,12 @@ public class AssertElement extends TestObj {
prop = sp.getComponent(FOPropertyMapping.getSubPropertyId(component));
}
}
- String s = String.valueOf(prop);
+ String s;
+ if (prop instanceof PercentLength) {
+ s = ((PercentLength)prop).getString();
+ } else {
+ s = String.valueOf(prop);
+ }
String expected = attlist.getValue("expected");
if (!expected.equals(s)) {
collector.notifyException(