foray-commit Mailing List for FOray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
(1) |
11
|
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
|
26
|
27
|
28
|
29
|
30
|
|
|
|
From: <vic...@us...> - 2006-11-10 01:08:42
|
Revision: 8452
http://svn.sourceforge.net/foray/?rev=8452&view=rev
Author: victormote
Date: 2006-11-09 17:08:30 -0800 (Thu, 09 Nov 2006)
Log Message:
-----------
Add a test class for the LineHeight property.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/TestFOrayFOTree.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/TestProperty.java
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLineHeight.java
Modified: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/TestFOrayFOTree.java
===================================================================
--- trunk/foray/foray-fotree/src/javatest/org/foray/fotree/TestFOrayFOTree.java 2006-10-28 23:43:14 UTC (rev 8451)
+++ trunk/foray/foray-fotree/src/javatest/org/foray/fotree/TestFOrayFOTree.java 2006-11-10 01:08:30 UTC (rev 8452)
@@ -28,6 +28,7 @@
package org.foray.fotree;
+import org.foray.fotree.fo.prop.TestLineHeight;
import org.foray.fotree.value.TestDtLength;
import junit.framework.Test;
@@ -45,7 +46,13 @@
*/
public static Test suite() {
final TestSuite testSuite = new TestSuite();
+
+ /* Add tests of property value classes. */
testSuite.addTestSuite(TestDtLength.class);
+
+ /* Add tests of FO properties. */
+ testSuite.addTestSuite(TestLineHeight.class);
+
return testSuite;
}
Added: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/TestProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/javatest/org/foray/fotree/TestProperty.java (rev 0)
+++ trunk/foray/foray-fotree/src/javatest/org/foray/fotree/TestProperty.java 2006-11-10 01:08:30 UTC (rev 8452)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2006 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree;
+
+import org.foray.fotree.fo.obj.Root;
+
+import org.axsl.foR.FOContext;
+import org.axsl.foR.fo.RetrieveMarker;
+
+import junit.framework.TestCase;
+
+/**
+ * Superclass for all tests of Property classes.
+ */
+public class TestProperty extends TestCase {
+
+ /** Constant providing a standard instance of PropertyList to be used
+ * during property construction. */
+ protected static final PropertyList STD_PROPERTY_LIST = new PropertyList();
+
+ /** Constant providing a standard instance of Root to be used during
+ * property construction. */
+ protected static final Root STD_ROOT = new Root(null, STD_PROPERTY_LIST,
+ "JUnit", -1, -1);
+
+ /** Constant providing a standard, but completely bogus context to be
+ * used during retrieval of property values. */
+ protected static final FOContext STD_FO_CONTEXT = new FOContext() {
+ public RetrieveMarker getRetrieveMarker() {
+ return null;
+ }
+ };
+
+ /** The instance of Property List to be used for this test. */
+ private PropertyList propertyList = STD_PROPERTY_LIST;
+
+ protected PropertyList propertyList() {
+ return this.propertyList;
+ }
+
+}
Property changes on: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/TestProperty.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLineHeight.java
===================================================================
--- trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLineHeight.java (rev 0)
+++ trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLineHeight.java 2006-11-10 01:08:30 UTC (rev 8452)
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2006 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.fo.prop;
+
+import org.foray.fotree.FObj;
+import org.foray.fotree.PropertyException;
+import org.foray.fotree.TestProperty;
+
+import org.axsl.common.Constants;
+
+/**
+ * JUnit test class for the class {@link LineHeight}.
+ */
+public class TestLineHeight extends TestProperty {
+
+ /**
+ * Unit test for a "length" value.
+ */
+ public void testLength() throws PropertyException {
+ final LineHeight lh = new LineHeight(propertyList(),
+ Constants.FOPROP_LINE_HEIGHT, "", "3.7cm");
+ propertyList().addProperty(lh);
+ final FObj fobj = STD_PROPERTY_LIST.getFObj();
+ final int halfLeadingMax = fobj.traitHalfLeadingMax(STD_FO_CONTEXT);
+ /* D = Distance between baselines = 3.7cm = 104,882 millipoints.
+ * L = Leading = D - the default font size of 12,000 = 92,882
+ * millipoints.
+ * HL = L / 2 = 46,441 millipoints. */
+ assertEquals(46441, halfLeadingMax);
+ final int halfLeadingOpt = fobj.traitHalfLeadingOpt(STD_FO_CONTEXT);
+ assertEquals(46441, halfLeadingOpt);
+ final int halfLeadingMin = fobj.traitHalfLeadingOpt(STD_FO_CONTEXT);
+ assertEquals(46441, halfLeadingMin);
+ }
+
+}
Property changes on: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLineHeight.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|