From: Vincent Hennebert Date: Wed, 14 Feb 2007 16:09:22 +0000 (+0000) Subject: Add the very same test cases with tables using starts-row/ends-row instead of fo... X-Git-Tag: fop-0_94~216 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ed334742b69c192dd4e36dff87c63d65e3bc2a78;p=xmlgraphics-fop.git Add the very same test cases with tables using starts-row/ends-row instead of fo:table-row objects git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@507597 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/java/org/apache/fop/layoutmgr/table/TableRowIteratorTestCase.java b/test/java/org/apache/fop/layoutmgr/table/TableRowIteratorTestCase.java index 9714c7d17..b6959143f 100644 --- a/test/java/org/apache/fop/layoutmgr/table/TableRowIteratorTestCase.java +++ b/test/java/org/apache/fop/layoutmgr/table/TableRowIteratorTestCase.java @@ -137,8 +137,8 @@ public class TableRowIteratorTestCase extends TestCase { checkTablePartRowGroups(tri, expectedBodyRowLengths); } - public void testSimple() throws Exception { - setUp("TableRowIterator_simple.fo"); + public void checkSimple(String filename) throws Exception { + setUp(filename); // Table 1: no header, no footer, one body (1 row) checkNextTableRowGroups(null, null, new int[] {1}); @@ -168,8 +168,8 @@ public class TableRowIteratorTestCase extends TestCase { checkNextTableRowGroups(new int[] {1, 1, 1}, new int[] {1, 1}, new int[] {1, 1, 1, 1, 1, 1}); } - public void testSpans() throws Exception { - setUp("TableRowIterator_spans.fo"); + public void checkSpans(String filename) throws Exception { + setUp(filename); // Table 1: no header, no footer, one body (1 row with column-span) checkNextTableRowGroups(null, null, new int[] {1}); @@ -190,4 +190,20 @@ public class TableRowIteratorTestCase extends TestCase { // one body (1 row-group of 2 rows, 1 row, 1 row-group of 3 rows) checkNextTableRowGroups(new int[] {2}, new int[] {1, 3}, new int[] {2, 1, 3}); } -} + + public void testWithRowsSimple() throws Exception { + checkSimple("TableRowIterator_simple.fo"); + } + + public void testWithRowsSpans() throws Exception { + checkSpans("TableRowIterator_spans.fo"); + } + + public void testNoRowSimple() throws Exception { + checkSimple("TableRowIterator_no-row_simple.fo"); + } + + public void testNoRowSpans() throws Exception { + checkSpans("TableRowIterator_no-row_spans.fo"); + } +} \ No newline at end of file diff --git a/test/layoutmgr/table/TableRowIterator_no-row_simple.fo b/test/layoutmgr/table/TableRowIterator_no-row_simple.fo new file mode 100644 index 000000000..b7ab28e33 --- /dev/null +++ b/test/layoutmgr/table/TableRowIterator_no-row_simple.fo @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + Cell 1 + Cell 2 + + + + + + + + Cell 1 + Cell 2 + Cell 3 + Cell 4 + + + + + + + + Cell 1 + Cell 2 + + + Cell 3 + Cell 4 + + + + + + + + Cell 1 + Cell 2 + Cell 3 + Cell 4 + + + Cell 5 + Cell 6 + Cell 7 + Cell 8 + Cell 9 + Cell 10 + + + + + + + + Header 1 + Header 2 + + + Cell 1 + Cell 2 + + + + + + + + Footer 1 + Footer 2 + + + Cell 1 + Cell 2 + + + + + + + + Header 1 + Header 2 + + + Footer 1 + Footer 2 + + + Cell 1 + Cell 2 + + + + + + + + Header 1 + Header 2 + Header 3 + Header 4 + + + Footer 1 + Footer 2 + Footer 4 + Footer 5 + Footer 5 + Footer 6 + + + Cell 1 + Cell 2 + Cell 3 + Cell 4 + + + + + + + + Header 1 + Header 2 + Header 3 + Header 4 + Header 5 + Header 6 + + + Footer 1 + Footer 2 + Footer 4 + Footer 5 + + + Cell 1 + Cell 2 + Cell 3 + Cell 4 + + + Cell 5 + Cell 6 + + + Cell 7 + Cell 8 + Cell 9 + Cell 10 + Cell 10 + Cell 11 + + + + + + diff --git a/test/layoutmgr/table/TableRowIterator_no-row_spans.fo b/test/layoutmgr/table/TableRowIterator_no-row_spans.fo new file mode 100644 index 000000000..83597dbbd --- /dev/null +++ b/test/layoutmgr/table/TableRowIterator_no-row_spans.fo @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + Cell 1 + + + + + + + + Cell 1 + Cell 2 + Cell 4 + + + + + + + + Cell 1 + Cell 2 + Cell 4 + Cell 5 + Cell 6 + + + + + + + + Cell 1 + Cell 2 + Cell 3 + Cell 5 + Cell 7 + + + + + + + + Cell 1 + Cell 2 + Cell 3 + Cell 4 + Cell 5 + Cell 8 + Cell 9 + Cell 10 + + + + + + + + Header 1 + Header 2 + Header 4 + + + Footer 1 + Footer 2 + Footer 3 + Footer 4 + Footer 6 + Footer 7 + + + Cell 1 + Cell 2 + Cell 3 + Cell 5 + Cell 6 + Cell 7 + Cell 8 + Cell 9 + Cell 10 + + + + + +