From 6e9f01380445f759699b16f43a37b360f075882a Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 29 Aug 2005 12:03:27 +0000 Subject: Background trait's toString() streamlined. Test cases adjusted accordingly. Test cases without checks will fail from now on!!! Checks for certain test cases and the others are added to the disabled list. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@264120 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/area/Trait.java | 30 +++++++++++++++++----- .../fop/layoutengine/LayoutEngineTester.java | 3 +++ test/layoutengine/disabled-testcases.txt | 20 +++++++++++++++ test/layoutengine/testcases/background-image1.xml | 7 +++++ test/layoutengine/testcases/background-image2.xml | 6 +++++ test/layoutengine/testcases/background-image3.xml | 2 ++ test/layoutengine/testcases/external-graphic3.xml | 2 +- test/layoutengine/testcases/ifo3.xml | 2 +- test/layoutengine/testcases/indent2.xml | 11 ++++++++ test/layoutengine/testcases/inline-block1.xml | 8 +++--- test/layoutengine/testcases/page-master4.xml | 10 ++++---- .../testcases/table-border-separate3.xml | 4 +-- test/layoutengine/testcases/table-cell1.xml | 4 +-- test/layoutengine/testcases/table-hf1.xml | 4 +-- test/layoutengine/testcases/table-row1.xml | 4 +-- test/layoutengine/testcases/table1.xml | 4 +-- test/layoutengine/testcases/table2.xml | 4 +-- 17 files changed, 95 insertions(+), 30 deletions(-) diff --git a/src/java/org/apache/fop/area/Trait.java b/src/java/org/apache/fop/area/Trait.java index fa44ebe4d..044874cc9 100644 --- a/src/java/org/apache/fop/area/Trait.java +++ b/src/java/org/apache/fop/area/Trait.java @@ -14,11 +14,12 @@ * limitations under the License. */ -/* $Id: Trait.java,v 1.4 2004/02/27 17:41:26 jeremias Exp $ */ +/* $Id$ */ package org.apache.fop.area; import org.apache.fop.datatypes.ColorType; +import org.apache.fop.fo.Constants; import org.apache.fop.image.FopImage; import org.apache.fop.traits.BorderProps; @@ -540,14 +541,29 @@ public class Trait implements Serializable { */ public String toString() { StringBuffer sb = new StringBuffer(); - sb.append("color=" + color); + sb.append("color=").append(color); if (url != null) { - sb.append(",url="); - sb.append(url); + sb.append(",url=").append(url); + sb.append(",repeat="); + switch (repeat) { + case Constants.EN_REPEAT: + sb.append("repeat"); + break; + case Constants.EN_REPEATX: + sb.append("repeat-x"); + break; + case Constants.EN_REPEATY: + sb.append("repeat-y"); + break; + case Constants.EN_NOREPEAT: + sb.append("no-repeat"); + break; + default: + sb.append("ILLEGAL!"); + } + sb.append(",horiz=").append(horiz); + sb.append(",vertical=").append(vertical); } - sb.append(",repeat=" + repeat); - sb.append(",horiz=" + horiz); - sb.append(",vertical=" + vertical); return sb.toString(); } diff --git a/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java b/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java index c5247adc0..47ae47924 100644 --- a/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java +++ b/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java @@ -189,6 +189,9 @@ public class LayoutEngineTester { } } + if (checks.size() == 0) { + throw new RuntimeException("No checks are available!"); + } Iterator i = checks.iterator(); while (i.hasNext()) { LayoutEngineCheck check = (LayoutEngineCheck)i.next(); diff --git a/test/layoutengine/disabled-testcases.txt b/test/layoutengine/disabled-testcases.txt index f0907e52a..9d2b0e01a 100644 --- a/test/layoutengine/disabled-testcases.txt +++ b/test/layoutengine/disabled-testcases.txt @@ -1,11 +1,26 @@ +background-image-list1.xml +background-image-list2.xml +background-image-table2.xml +background-image-table3.xml +background-image-table4.xml +background-image-table5.xml +background-image3.xml +background-image5.xml +background-image6.xml +background-image7.xml block-container4a.xml external-graphic1.xml external-graphic2.xml inline-block2.xml +inline-container1.xml keep-with-previous2.xml keep-with-previous3.xml keep-with-previous4.xml keep-with-previous5.xml +leader-dots.xml +leader-rule.xml +leader-space.xml +letter-spacing3.xml list4a.xml multi-column3.xml multi-column4.xml @@ -13,8 +28,13 @@ normal-breaking4.xml page-number3.xml page-number-citation2.xml page-number-citation3.xml +space-block2.xml table-border-collapse1.xml table-border-collapse2.xml table-border-separate1.xml table-column4.xml table-fixed2.xml +word-spacing1.xml +word-spacing2.xml +word-spacing3.xml +word-spacing4.xml diff --git a/test/layoutengine/testcases/background-image1.xml b/test/layoutengine/testcases/background-image1.xml index 8b8c95263..698708739 100644 --- a/test/layoutengine/testcases/background-image1.xml +++ b/test/layoutengine/testcases/background-image1.xml @@ -59,5 +59,12 @@ + + + + + + + diff --git a/test/layoutengine/testcases/background-image2.xml b/test/layoutengine/testcases/background-image2.xml index f13c58784..2b3bbeb0a 100644 --- a/test/layoutengine/testcases/background-image2.xml +++ b/test/layoutengine/testcases/background-image2.xml @@ -56,5 +56,11 @@ + + + + + + diff --git a/test/layoutengine/testcases/background-image3.xml b/test/layoutengine/testcases/background-image3.xml index 342be43cd..2f480ac03 100644 --- a/test/layoutengine/testcases/background-image3.xml +++ b/test/layoutengine/testcases/background-image3.xml @@ -44,5 +44,7 @@ + + diff --git a/test/layoutengine/testcases/external-graphic3.xml b/test/layoutengine/testcases/external-graphic3.xml index f7ea0f3b1..f8bfa4d79 100644 --- a/test/layoutengine/testcases/external-graphic3.xml +++ b/test/layoutengine/testcases/external-graphic3.xml @@ -40,7 +40,7 @@ - + diff --git a/test/layoutengine/testcases/ifo3.xml b/test/layoutengine/testcases/ifo3.xml index 459956115..3a1460ea1 100644 --- a/test/layoutengine/testcases/ifo3.xml +++ b/test/layoutengine/testcases/ifo3.xml @@ -46,7 +46,7 @@ - + diff --git a/test/layoutengine/testcases/indent2.xml b/test/layoutengine/testcases/indent2.xml index 4f4481c75..87009ee82 100644 --- a/test/layoutengine/testcases/indent2.xml +++ b/test/layoutengine/testcases/indent2.xml @@ -61,5 +61,16 @@ the nested block should be indented as well. + + + + + + + + + + + diff --git a/test/layoutengine/testcases/inline-block1.xml b/test/layoutengine/testcases/inline-block1.xml index ef6ae86b9..e0f77824b 100644 --- a/test/layoutengine/testcases/inline-block1.xml +++ b/test/layoutengine/testcases/inline-block1.xml @@ -71,19 +71,19 @@ - + - + - + - + diff --git a/test/layoutengine/testcases/page-master4.xml b/test/layoutengine/testcases/page-master4.xml index f5d730d04..39c662a57 100644 --- a/test/layoutengine/testcases/page-master4.xml +++ b/test/layoutengine/testcases/page-master4.xml @@ -64,25 +64,25 @@ - + - + - + - + - + diff --git a/test/layoutengine/testcases/table-border-separate3.xml b/test/layoutengine/testcases/table-border-separate3.xml index 77d9110cd..12d7e85d5 100644 --- a/test/layoutengine/testcases/table-border-separate3.xml +++ b/test/layoutengine/testcases/table-border-separate3.xml @@ -65,11 +65,11 @@ - + - + diff --git a/test/layoutengine/testcases/table-cell1.xml b/test/layoutengine/testcases/table-cell1.xml index 64493783e..b573106f1 100644 --- a/test/layoutengine/testcases/table-cell1.xml +++ b/test/layoutengine/testcases/table-cell1.xml @@ -128,14 +128,14 @@ - + - + diff --git a/test/layoutengine/testcases/table-hf1.xml b/test/layoutengine/testcases/table-hf1.xml index ec8da5a57..244c7827c 100644 --- a/test/layoutengine/testcases/table-hf1.xml +++ b/test/layoutengine/testcases/table-hf1.xml @@ -80,7 +80,7 @@ - + @@ -97,7 +97,7 @@ - + diff --git a/test/layoutengine/testcases/table-row1.xml b/test/layoutengine/testcases/table-row1.xml index 98cd6088e..693436e41 100644 --- a/test/layoutengine/testcases/table-row1.xml +++ b/test/layoutengine/testcases/table-row1.xml @@ -82,7 +82,7 @@ - + @@ -91,7 +91,7 @@ - + diff --git a/test/layoutengine/testcases/table1.xml b/test/layoutengine/testcases/table1.xml index a508e7be1..9637febb6 100644 --- a/test/layoutengine/testcases/table1.xml +++ b/test/layoutengine/testcases/table1.xml @@ -80,7 +80,7 @@ - + @@ -91,7 +91,7 @@ - + diff --git a/test/layoutengine/testcases/table2.xml b/test/layoutengine/testcases/table2.xml index 96bcd070b..373ae151f 100644 --- a/test/layoutengine/testcases/table2.xml +++ b/test/layoutengine/testcases/table2.xml @@ -93,7 +93,7 @@ - + @@ -104,7 +104,7 @@ - + -- cgit v1.2.3