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
(3) |
|
8
|
9
(1) |
10
|
11
|
12
|
13
(3) |
14
(14) |
|
15
(4) |
16
(6) |
17
(1) |
18
|
19
|
20
|
21
(10) |
|
22
(2) |
23
|
24
|
25
|
26
|
27
|
28
|
|
29
|
30
|
31
|
|
|
|
|
|
From: <vic...@us...> - 2010-08-22 01:02:28
|
Revision: 11046
http://foray.svn.sourceforge.net/foray/?rev=11046&view=rev
Author: victormote
Date: 2010-08-22 01:02:21 +0000 (Sun, 22 Aug 2010)
Log Message:
-----------
Add @Ignore annotation to unwritten tests.
Modified Paths:
--------------
trunk/foray/foray-ps/src/test/java/org/foray/ps/TestPsSystemDict.java
Modified: trunk/foray/foray-ps/src/test/java/org/foray/ps/TestPsSystemDict.java
===================================================================
--- trunk/foray/foray-ps/src/test/java/org/foray/ps/TestPsSystemDict.java 2010-08-22 00:47:56 UTC (rev 11045)
+++ trunk/foray/foray-ps/src/test/java/org/foray/ps/TestPsSystemDict.java 2010-08-22 01:02:21 UTC (rev 11046)
@@ -34,6 +34,7 @@
import org.axsl.ps.PsInput;
+import org.junit.Ignore;
import org.junit.Test;
import java.math.BigDecimal;
@@ -261,6 +262,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testDup01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -305,6 +307,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testReadonly01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -315,6 +318,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testExecuteonly01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -325,6 +329,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testNoaccess01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -335,6 +340,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testDef01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -345,6 +351,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testEnd01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -355,6 +362,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testMark01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -365,6 +373,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testCreateArray01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -375,6 +384,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurrentdict01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -385,6 +395,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurrentfile01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -395,6 +406,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testCounttomark01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -405,6 +417,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testEexec01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -415,6 +428,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testString01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -425,6 +439,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testExch01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -435,6 +450,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testReadstring01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -445,6 +461,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testRoll01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -455,6 +472,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testIfOperator01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -465,6 +483,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testIfElseOperator01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -475,6 +494,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testPut01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -485,6 +505,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testArray01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -495,6 +516,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testClosefile01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -505,6 +527,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testIndex01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -515,6 +538,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testGet01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -525,6 +549,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testDefinefont01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -535,6 +560,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testKnown01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -806,6 +832,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testLoad01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -816,6 +843,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testBind01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -968,6 +996,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testType01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -995,6 +1024,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testIdentmatrix01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1005,6 +1035,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCleartomark01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1015,6 +1046,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testWhere01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1025,6 +1057,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testInternaldict01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1035,6 +1068,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurrentflat01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1045,6 +1079,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetflat01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1055,6 +1090,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testGsave01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1065,6 +1101,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testGrestore01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1075,6 +1112,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetcmykcolor01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1085,6 +1123,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetrgbcolor01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1095,6 +1134,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetgray01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1105,6 +1145,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetdash01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1115,6 +1156,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetlinejoin01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1125,6 +1167,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurrentlinejoin01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1135,6 +1178,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetlinecap01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1145,6 +1189,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurrentlinecap01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1155,6 +1200,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetlinewidth01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1165,6 +1211,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurrentlinewidth01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1175,6 +1222,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetmiterlimit01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1185,6 +1233,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurrentmiterlimit01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1195,6 +1244,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetmatrix01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1205,6 +1255,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurrentmatrix01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1215,6 +1266,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testRound01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1225,6 +1277,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testLength01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1235,6 +1288,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testConcat01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1245,6 +1299,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testConcatmatrix01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1255,6 +1310,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testStopped01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1265,6 +1321,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testTransform01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1275,6 +1332,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testItransform01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1285,6 +1343,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testDtransform01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1295,6 +1354,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testIdtransform01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1305,6 +1365,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCopy01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1316,6 +1377,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCopyStack01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1327,6 +1389,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCopyObject01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1337,6 +1400,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCopyArray01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1347,6 +1411,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCopyDictionary01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1357,6 +1422,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCopyString01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1367,6 +1433,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCopyGraphicsState01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1377,6 +1444,7 @@
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
@Test
+ @Ignore
public void testTranslate01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1389,6 +1457,7 @@
* @throws PsInterpreterException4a For errors during execution of the contained procedure.
*/
@Test
+ @Ignore
public void testForOperator01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1399,6 +1468,7 @@
* @throws PsInterpreterException4a For errors during execution of the contained procedure.
*/
@Test
+ @Ignore
public void testForall01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1409,6 +1479,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testAshow01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1419,6 +1490,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCharpath01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1429,6 +1501,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testStringwidth01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1439,6 +1512,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testFindfont01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1449,6 +1523,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testScalefont01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1459,6 +1534,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetfont01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1469,6 +1545,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testMaxlength01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1479,6 +1556,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testSetpacking01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1489,6 +1567,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurrentpacking01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1499,6 +1578,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testNewpath01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1509,6 +1589,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testMoveto01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1519,6 +1600,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testClosepath01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1529,6 +1611,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testLineto01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1539,6 +1622,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurrentpoint01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1549,6 +1633,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testCurveto01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1559,6 +1644,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testFill01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1569,6 +1655,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testStroke01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1579,6 +1666,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testRlineto01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1589,6 +1677,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testRmoveto01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1599,6 +1688,7 @@
* @throws PsOperatorException For PostScript operator errors.
*/
@Test
+ @Ignore
public void testLanguagelevel01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-22 00:48:04
|
Revision: 11045
http://foray.svn.sourceforge.net/foray/?rev=11045&view=rev
Author: victormote
Date: 2010-08-22 00:47:56 +0000 (Sun, 22 Aug 2010)
Log Message:
-----------
Convert some test classes to the Junit 4 style annotations.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestAbstractGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestBmpGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGifGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGraphicServer4a.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestJpegGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestPngGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestSvgGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestTiffGraphic.java
trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestHyphenationServer4a.java
trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestHyphenationTree.java
trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/util/TestNaturalLanguage.java
trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/util/TestWordList.java
trunk/foray/foray-ps/src/test/java/org/foray/ps/TestPsSystemDict.java
trunk/foray/foray-ps/src/test/java/org/foray/ps/encode/TestEncodingParser.java
trunk/foray/foray-ps/src/test/java/org/foray/ps/encode/TestGlyphListParser.java
trunk/foray/foray-ps/src/test/java/org/foray/ps/filter/TestAscii85EncodeFilter.java
trunk/foray/foray-ps/src/test/java/org/foray/ps/filter/TestRunLengthEncodeFilter.java
trunk/foray/foray-render/src/test/java/org/foray/render/TestRenderer.java
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestAbstractGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestAbstractGraphic.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestAbstractGraphic.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -31,15 +31,15 @@
import org.foray.common.Environment;
import org.foray.common.url.URLFactory;
+import org.junit.Before;
+
import java.io.IOException;
import java.net.URL;
-import junit.framework.TestCase;
-
/**
* Abstract superclass for tests of specific graphic types.
*/
-public abstract class TestAbstractGraphic extends TestCase {
+public abstract class TestAbstractGraphic {
/** The graphic server. */
private GraphicServer4a server;
@@ -51,6 +51,7 @@
* Standard setup code for all methods.
* @throws IOException For any errors reading the build properties.
*/
+ @Before
public void setUp() throws IOException {
this.server = new GraphicServer4a(null);
final URL graphicsUrl = URLFactory.createURL("file", null,
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestBmpGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestBmpGraphic.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestBmpGraphic.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,8 +28,16 @@
package org.foray.graphic;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
import org.axsl.graphic.GraphicException;
+import org.junit.Test;
+
import java.awt.color.ColorSpace;
import java.io.IOException;
@@ -43,6 +51,7 @@
* @throws GraphicException For errors processing image.
* @throws IOException For errors reading image.
*/
+ @Test
public void testGraphic01() throws GraphicException, IOException {
final Graphic4a bmp = this.getServer().makeGraphic("linux.bmp", this.getBaseURLs(), false);
assertNotNull(bmp);
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGifGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGifGraphic.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGifGraphic.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,8 +28,14 @@
package org.foray.graphic;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
import org.axsl.graphic.GraphicException;
+import org.junit.Test;
+
import java.awt.Color;
import java.awt.color.ColorSpace;
import java.io.IOException;
@@ -44,6 +50,7 @@
* @throws GraphicException For errors processing image.
* @throws IOException For errors reading image.
*/
+ @Test
public void testGraphic01() throws GraphicException, IOException {
final Graphic4a gif = this.getServer().makeGraphic("xml_feather.gif",
this.getBaseURLs(), false);
@@ -73,6 +80,7 @@
* @throws GraphicException For errors processing image.
* @throws IOException For errors reading image.
*/
+ @Test
public void testGraphic02() throws GraphicException, IOException {
final Graphic4a gif = this.getServer().makeGraphic(
"xml_feather_transparent.gif", this.getBaseURLs(), false);
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGraphicServer4a.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGraphicServer4a.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -35,15 +35,15 @@
import org.apache.commons.logging.Log;
+import org.junit.Test;
+
import java.io.File;
import java.io.IOException;
-import junit.framework.TestCase;
-
/**
* Tests for the class {@link GraphicServer4a}.
*/
-public class TestGraphicServer4a extends TestCase {
+public class TestGraphicServer4a {
/** A GraphicServer available for testing. */
private static GraphicServer4a graphicServer;
@@ -90,6 +90,7 @@
* Stub test to ensure at least one "test" in this class.
* TODO: Remove this method when we get some real tests in this class.
*/
+ @Test
public void testDummy() {
}
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestJpegGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestJpegGraphic.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestJpegGraphic.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,8 +28,15 @@
package org.foray.graphic;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
import org.axsl.graphic.GraphicException;
+import org.junit.Assert;
+import org.junit.Test;
+
import java.awt.color.ColorSpace;
import java.io.IOException;
@@ -43,6 +50,7 @@
* @throws GraphicException For errors processing image.
* @throws IOException For errors reading image.
*/
+ @Test
public void testGraphic01() throws GraphicException, IOException {
final Graphic4a jpeg = this.getServer().makeGraphic("jpeg-test1.jpg",
this.getBaseURLs(), false);
@@ -52,8 +60,8 @@
assertEquals(144, jpeg.pixelHeight());
assertEquals(8, jpeg.getBitsPerComponent());
assertTrue(jpeg.getColorSpace().getType() == ColorSpace.TYPE_RGB);
- assertFalse(jpeg.isTransparent());
- assertNull(jpeg.getTransparentColor());
+ Assert.assertFalse(jpeg.isTransparent());
+ Assert.assertNull(jpeg.getTransparentColor());
final byte[] rawContent = jpeg.getRawSamples();
assertNotNull(rawContent);
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestPngGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestPngGraphic.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestPngGraphic.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,8 +28,16 @@
package org.foray.graphic;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
import org.axsl.graphic.GraphicException;
+import org.junit.Test;
+
import java.awt.color.ColorSpace;
import java.io.IOException;
@@ -43,6 +51,7 @@
* @throws GraphicException For errors processing image.
* @throws IOException For errors reading image.
*/
+ @Test
public void testGraphic01() throws GraphicException, IOException {
final Graphic4a png = this.getServer().makeGraphic("png-test1.png",
this.getBaseURLs(), false);
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestSvgGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestSvgGraphic.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestSvgGraphic.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,6 +28,10 @@
package org.foray.graphic;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
import org.axsl.graphic.GraphicException;
import org.apache.batik.dom.GenericText;
@@ -36,6 +40,7 @@
import org.apache.batik.dom.svg.SVGOMStyleElement;
import org.apache.batik.dom.svg.SVGOMTextElement;
+import org.junit.Test;
import org.w3c.dom.Attr;
import org.w3c.dom.Comment;
import org.w3c.dom.NamedNodeMap;
@@ -56,6 +61,7 @@
* @throws GraphicException For errors processing image.
* @throws IOException For errors reading image.
*/
+ @Test
public void testText001() throws GraphicException, IOException {
/* This test ends up being somewhat a test of Batik, which we really
* should not need to test. However, this will flag changes that they
@@ -132,6 +138,7 @@
* @throws GraphicException For errors processing image.
* @throws IOException For errors reading image.
*/
+ @Test
public void testFontEmbed() throws GraphicException, IOException {
final Graphic4a graphic = this.getServer().makeGraphic(
"font-embed.svg", this.getBaseURLs(), false);
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestTiffGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestTiffGraphic.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestTiffGraphic.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,8 +28,16 @@
package org.foray.graphic;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
import org.axsl.graphic.GraphicException;
+import org.junit.Test;
+
import java.awt.color.ColorSpace;
import java.io.IOException;
@@ -43,6 +51,7 @@
* @throws GraphicException For errors processing image.
* @throws IOException For errors reading image.
*/
+ @Test
public void testGraphic01() throws GraphicException, IOException {
final Graphic4a tiff = this.getServer().makeGraphic("xml_fax.tif",
this.getBaseURLs(), false);
Modified: trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestHyphenationServer4a.java
===================================================================
--- trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestHyphenationServer4a.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestHyphenationServer4a.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,6 +28,10 @@
package org.foray.hyphen;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
import org.foray.common.Environment;
import org.foray.common.Logging;
@@ -38,6 +42,8 @@
import org.apache.commons.logging.Log;
+import org.junit.Test;
+
import java.io.IOException;
import java.net.URL;
import java.util.Properties;
@@ -83,6 +89,7 @@
* Make sure that the resource files that are supposed to be available actually are.
* @throws HyphenationException For errors obtaining the various tree instances.
*/
+ @Test
public void testResources() throws HyphenationException {
final HyphenationServer4a server = makeHyphenationServer();
Modified: trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestHyphenationTree.java
===================================================================
--- trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestHyphenationTree.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestHyphenationTree.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,16 +28,19 @@
package org.foray.hyphen;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link HyphenationTree}.
*/
-public class TestHyphenationTree extends TestCase {
+public class TestHyphenationTree {
/**
* Unit test of {@link HyphenationTree#getPatternChars(String)}.
*/
+ @Test
public void testGetPatternChars() {
final String testInputString = ".ab4i";
final String result = HyphenationTree.getPatternChars(testInputString);
@@ -47,6 +50,7 @@
/**
* Unit test of {@link HyphenationTree#getInterletterValues(String)}.
*/
+ @Test
public void testGetInterletterValues() {
final String testInputString = ".ab4i";
final String result = HyphenationTree.getInterletterValues(testInputString);
Modified: trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/util/TestNaturalLanguage.java
===================================================================
--- trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/util/TestNaturalLanguage.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/util/TestNaturalLanguage.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,24 +28,27 @@
package org.foray.hyphen.util;
+import static org.junit.Assert.assertEquals;
+
import org.foray.hyphen.HyphenationServer4a;
import org.foray.hyphen.TestHyphenationServer4a;
import org.axsl.common.value.Iso639;
+import org.junit.Test;
+
import java.io.IOException;
-import junit.framework.TestCase;
-
/**
* JUnit test class for the class {@link NaturalLanguage}.
*/
-public class TestNaturalLanguage extends TestCase {
+public class TestNaturalLanguage {
/**
* Tests various Strings against the method {@link NaturalLanguage#validateText(CharSequence)}.
* @throws IOException For errors creating the Hyphenation server.
*/
+ @Test
public void testValidateText() throws IOException {
final HyphenationServer4a server = TestHyphenationServer4a.makeHyphenationServerStatic();
final NaturalLanguage nl = server.getNaturalLanguage(Iso639.MARSHALLESE);
Modified: trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/util/TestWordList.java
===================================================================
--- trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/util/TestWordList.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/util/TestWordList.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,17 +28,20 @@
package org.foray.hyphen.util;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link WordList}.
*/
-public class TestWordList extends TestCase {
+public class TestWordList {
/**
* Tests various Strings against the method
* {@link WordList#containsNonWord(String)}.
*/
+@Test
public void testContainsNonWord() {
String testString = "abc";
boolean containsNonWord = WordList.containsNonWord(testString);
@@ -53,6 +56,7 @@
* Tests various Strings agains the method
* {@link WordList#removeNonWordChars(String)}.
*/
+@Test
public void testRemoveNonWordChars() {
String testString = "abc";
String newString = WordList.removeNonWordChars(testString);
Modified: trunk/foray/foray-ps/src/test/java/org/foray/ps/TestPsSystemDict.java
===================================================================
--- trunk/foray/foray-ps/src/test/java/org/foray/ps/TestPsSystemDict.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-ps/src/test/java/org/foray/ps/TestPsSystemDict.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,22 +28,27 @@
package org.foray.ps;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import org.axsl.ps.PsInput;
+import org.junit.Test;
+
import java.math.BigDecimal;
-import junit.framework.TestCase;
-
/**
* Tests for the class {@link PsSystemDict4a}.
*/
-public class TestPsSystemDict extends TestCase {
+public class TestPsSystemDict {
/**
* Test of the "dict" operator.
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testDict01() throws PsInterpreterException4a, PsOperatorException {
final PsInput input = new PsStringInput("3 dict");
final PsInterpreter4a interpreter = new PsInterpreter4a(input, null);
@@ -59,6 +64,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testPop01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd ed. */
PsInput input = new PsStringInput("1 2 3 pop");
@@ -95,6 +101,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testBegin01() throws PsInterpreterException4a, PsOperatorException {
final PsInput input = new PsStringInput("17 dict begin");
final PsInterpreter4a interpreter = new PsInterpreter4a(input, null);
@@ -109,6 +116,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testDiv01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd ed. */
PsInput input = new PsStringInput("3 2 div");
@@ -118,7 +126,7 @@
PsObject object = interpreter.getOperandStack().pop();
assertTrue(object instanceof PsReal);
PsReal real = (PsReal) object;
- assertEquals(1.5, real.getDoubleValue());
+ assertEquals(1.5, real.getDoubleValue(), .0000001);
/* Second example from the PSLRM, 2nd ed. */
input = new PsStringInput("4 2 div");
@@ -128,7 +136,7 @@
object = interpreter.getOperandStack().pop();
assertTrue(object instanceof PsReal);
real = (PsReal) object;
- assertEquals(2.0, real.getDoubleValue());
+ assertEquals(2.0, real.getDoubleValue(), .0000001);
}
/**
@@ -136,6 +144,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testIdiv01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd ed. */
PsInput input = new PsStringInput("3 2 idiv");
@@ -173,6 +182,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testAdd01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd ed. */
PsInput input = new PsStringInput("3 4 add");
@@ -190,7 +200,7 @@
object = interpreter.getOperandStack().pop();
assertTrue(object instanceof PsReal);
final PsReal real = (PsReal) object;
- assertEquals(11.0, real.getDoubleValue());
+ assertEquals(11.0, real.getDoubleValue(), .00000001);
}
/**
@@ -198,6 +208,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSub01() throws PsInterpreterException4a, PsOperatorException {
/* Inverse of the first example for "add" from the PSLRM, 2nd ed. */
PsInput input = new PsStringInput("7 3 sub");
@@ -223,6 +234,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testMul01() throws PsInterpreterException4a, PsOperatorException {
/* Use the same operands as for the "add" operator tests. */
PsInput input = new PsStringInput("3 4 mul");
@@ -248,6 +260,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testDup01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -257,6 +270,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testTrueOperator01() throws PsInterpreterException4a, PsOperatorException {
final PsInput input = new PsStringInput("true");
final PsInterpreter4a interpreter = new PsInterpreter4a(input, null);
@@ -273,6 +287,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testFalseOperator01() throws PsInterpreterException4a, PsOperatorException {
final PsInput input = new PsStringInput("false");
final PsInterpreter4a interpreter = new PsInterpreter4a(input, null);
@@ -289,6 +304,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testReadonly01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -298,6 +314,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testExecuteonly01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -307,6 +324,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testNoaccess01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -316,6 +334,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testDef01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -325,6 +344,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testEnd01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -334,6 +354,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testMark01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -343,6 +364,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testCreateArray01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -352,6 +374,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurrentdict01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -361,6 +384,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurrentfile01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -370,6 +394,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testCounttomark01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -379,6 +404,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testEexec01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -388,6 +414,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testString01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -397,6 +424,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testExch01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -406,6 +434,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testReadstring01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -415,6 +444,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testRoll01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -424,6 +454,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testIfOperator01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -433,6 +464,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testIfElseOperator01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -442,6 +474,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testPut01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -451,6 +484,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testArray01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -460,6 +494,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testClosefile01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -469,6 +504,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testIndex01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -478,6 +514,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testGet01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -487,6 +524,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testDefinefont01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -496,6 +534,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testKnown01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -505,6 +544,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testNeg01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd Ed. */
PsInput input = new PsStringInput("4.5 neg");
@@ -528,6 +568,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testNot01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd Ed. */
generalBooleanTest("true not", false);
@@ -549,6 +590,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testOr01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd Ed. */
generalBooleanTest("true true or", true);
@@ -576,6 +618,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testXor01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd Ed. */
generalBooleanTest("true true xor", false);
@@ -611,6 +654,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testAnd01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd Ed. */
generalBooleanTest("true true and", true);
@@ -646,6 +690,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCvx01() throws PsInterpreterException4a, PsOperatorException {
/* First create a name and make sure it is not executable. */
PsInput input = new PsStringInput("/literal");
@@ -694,6 +739,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testExec01() throws PsInterpreterException4a, PsOperatorException {
final PsInput input = new PsStringInput("(3 2 add) cvx exec");
final PsInterpreter4a interpreter = new PsInterpreter4a(input, null);
@@ -711,6 +757,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testExec02() throws PsInterpreterException4a, PsOperatorException {
final PsInput input = new PsStringInput("3 2 /add exec");
final PsInterpreter4a interpreter = new PsInterpreter4a(input, null);
@@ -740,6 +787,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testExec03() throws PsInterpreterException4a, PsOperatorException {
final PsInput input = new PsStringInput("3 2 /add cvx exec");
final PsInterpreter4a interpreter = new PsInterpreter4a(input, null);
@@ -757,6 +805,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testLoad01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -766,6 +815,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testBind01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -775,6 +825,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCount01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd ed. */
PsInput input = new PsStringInput("clear count");
@@ -800,6 +851,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testEq01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd ed. */
PsInput input = new PsStringInput("4.0 4 eq");
@@ -857,6 +909,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testNe01() throws PsInterpreterException4a, PsOperatorException {
/* First example (for "eq") from the PSLRM, 2nd ed. */
PsInput input = new PsStringInput("4.0 4 ne");
@@ -914,6 +967,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testType01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -923,6 +977,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testMatrix01() throws PsInterpreterException4a, PsOperatorException {
/* First example from the PSLRM, 2nd ed. */
final PsInput input = new PsStringInput("matrix");
@@ -939,6 +994,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testIdentmatrix01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -948,6 +1004,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCleartomark01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -957,6 +1014,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testWhere01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -966,6 +1024,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testInternaldict01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -975,6 +1034,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurrentflat01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -984,6 +1044,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetflat01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -993,6 +1054,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testGsave01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1002,6 +1064,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testGrestore01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1011,6 +1074,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetcmykcolor01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1020,6 +1084,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetrgbcolor01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1029,6 +1094,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetgray01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1038,6 +1104,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetdash01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1047,6 +1114,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetlinejoin01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1056,6 +1124,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurrentlinejoin01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1065,6 +1134,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetlinecap01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1074,6 +1144,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurrentlinecap01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1083,6 +1154,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetlinewidth01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1092,6 +1164,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurrentlinewidth01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1101,6 +1174,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetmiterlimit01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1110,6 +1184,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurrentmiterlimit01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1119,6 +1194,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetmatrix01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1128,6 +1204,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurrentmatrix01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1137,6 +1214,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testRound01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1146,6 +1224,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testLength01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1155,6 +1234,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testConcat01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1164,6 +1244,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testConcatmatrix01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1173,6 +1254,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testStopped01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1182,6 +1264,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testTransform01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1191,6 +1274,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testItransform01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1200,6 +1284,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testDtransform01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1209,6 +1294,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testIdtransform01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1217,7 +1303,8 @@
* Test of the "copy" operator.
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
- */
+ */
+ @Test
public void testCopy01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1228,6 +1315,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCopyStack01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1238,6 +1326,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCopyObject01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1247,6 +1336,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCopyArray01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1256,6 +1346,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCopyDictionary01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1265,6 +1356,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCopyString01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1274,6 +1366,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCopyGraphicsState01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1283,6 +1376,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For PostScript errors during execution.
*/
+ @Test
public void testTranslate01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1294,6 +1388,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For errors during execution of the contained procedure.
*/
+ @Test
public void testForOperator01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1303,6 +1398,7 @@
* @throws PsOperatorException For any PostScript error.
* @throws PsInterpreterException4a For errors during execution of the contained procedure.
*/
+ @Test
public void testForall01() throws PsOperatorException, PsInterpreterException4a {
/* TODO: Add appropriate test. */
}
@@ -1312,6 +1408,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testAshow01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1321,6 +1418,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCharpath01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1330,6 +1428,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testStringwidth01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1339,6 +1438,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testFindfont01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1348,6 +1448,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testScalefont01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1357,6 +1458,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetfont01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1366,6 +1468,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testMaxlength01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1375,6 +1478,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testSetpacking01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1384,6 +1488,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurrentpacking01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1393,6 +1498,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testNewpath01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1402,6 +1508,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testMoveto01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1411,6 +1518,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testClosepath01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1420,6 +1528,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testLineto01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1429,6 +1538,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurrentpoint01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1438,6 +1548,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCurveto01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1447,6 +1558,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testFill01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1456,6 +1568,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testStroke01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1465,6 +1578,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testRlineto01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1474,6 +1588,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testRmoveto01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1483,6 +1598,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testLanguagelevel01() throws PsInterpreterException4a, PsOperatorException {
/* TODO: Add appropriate test. */
}
@@ -1492,6 +1608,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testGt01() throws PsInterpreterException4a, PsOperatorException {
generalComparisonTest("gt", false, false, true);
}
@@ -1501,6 +1618,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testGe01() throws PsInterpreterException4a, PsOperatorException {
generalComparisonTest("ge", false, true, true);
}
@@ -1510,6 +1628,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testLt01() throws PsInterpreterException4a, PsOperatorException {
generalComparisonTest("lt", true, false, false);
}
@@ -1519,6 +1638,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testLe01() throws PsInterpreterException4a, PsOperatorException {
generalComparisonTest("le", true, true, false);
}
@@ -1622,6 +1742,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testVersion01() throws PsInterpreterException4a, PsOperatorException {
final PsInput input = new PsStringInput("version");
final PsInterpreter4a interpreter = new PsInterpreter4a(input, null);
@@ -1638,6 +1759,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testCvr01() throws PsInterpreterException4a, PsOperatorException {
/* Test a real. */
PsInput input = new PsStringInput("9.2");
@@ -1704,6 +1826,7 @@
* @throws PsInterpreterException4a For PostScript errors.
* @throws PsOperatorException For PostScript operator errors.
*/
+ @Test
public void testClear01() throws PsInterpreterException4a, PsOperatorException {
final PsInput input = new PsStringInput("1 2 3 clear");
final PsInterpreter4a interpreter = new PsInterpreter4a(input, null);
Modified: trunk/foray/foray-ps/src/test/java/org/foray/ps/encode/TestEncodingParser.java
===================================================================
--- trunk/foray/foray-ps/src/test/java/org/foray/ps/encode/TestEncodingParser.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-ps/src/test/java/org/foray/ps/encode/TestEncodingParser.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,27 +28,31 @@
package org.foray.ps.encode;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
import org.foray.common.Environment;
import org.axsl.ps.PsException;
+import org.junit.Test;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
-import junit.framework.TestCase;
-
/**
* JUnit test class for the class {@link EncodingParser}.
*/
-public class TestEncodingParser extends TestCase {
+public class TestEncodingParser {
/**
* Black-box test, parsing the glyph list for the WinAnsi Encoding.
* @throws IOException For errors opening or reading the input file.
* @throws PsException For errors parsing the input.
*/
+ @Test
public void testWinAnsi() throws IOException, PsException {
final File sandbox = Environment.getSandbox();
final File testFile = new File(sandbox, "foray-ps/resource/encoding/latin-pdf.txt");
Modified: trunk/foray/foray-ps/src/test/java/org/foray/ps/encode/TestGlyphListParser.java
===================================================================
--- trunk/foray/foray-ps/src/test/java/org/foray/ps/encode/TestGlyphListParser.java 2010-08-21 23:51:35 UTC (rev 11044)
+++ trunk/foray/foray-ps/src/test/java/org/foray/ps/encode/TestGlyphListParser.java 2010-08-22 00:47:56 UTC (rev 11045)
@@ -28,26 +28,30 @@
package org.foray.ps.encode;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
import org.foray.common.Environment;
import org.axsl.ps.PsException;
+import org.junit.Test;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
-import junit.framework.TestCase;
-
/**
* JUnit test class for the class {@link GlyphListParser}.
*/
-public class TestGlyphListParser extends TestCase {
+public class TestGlyphListParser {
/**
* Black-...
[truncated message content] |
|
From: <vic...@us...> - 2010-08-21 23:51:45
|
Revision: 11044
http://foray.svn.sourceforge.net/foray/?rev=11044&view=rev
Author: victormote
Date: 2010-08-21 23:51:35 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Convert some test classes to the Junit 4 style annotations.
Modified Paths:
--------------
trunk/foray/foray-app/src/test/java/org/foray/app/TestFOray.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBlock.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBorder.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestGraphicArea.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestInline.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestMetadata.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestVertical.java
trunk/foray/foray-areatree/src/test/java/org/foray/area/TestPageCollection.java
trunk/foray/foray-common/src/test/java/org/foray/common/TestBit.java
trunk/foray/foray-common/src/test/java/org/foray/common/TestByteVectorPacked.java
trunk/foray/foray-common/src/test/java/org/foray/common/TestCharVector.java
trunk/foray/foray-common/src/test/java/org/foray/common/TestStringUtil.java
trunk/foray/foray-common/src/test/java/org/foray/common/TestTernaryTreeMap.java
trunk/foray/foray-common/src/test/java/org/foray/common/TestUnicodeChar.java
trunk/foray/foray-font/src/test/java/org/foray/font/TestFont4a.java
trunk/foray/foray-font/src/test/java/org/foray/font/TestFontServer4a.java
trunk/foray/foray-font/src/test/java/org/foray/font/format/TestType1PfbFile.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTest.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestAbsoluteDimension.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestAbsoluteOffset.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestBackgroundPosition.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestBorderWidth.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestContentDimension.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestIndent.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestMargin.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestName.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestPadding.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestPageDimension.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestRelativeDimension.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestRelativeSpace.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestString.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CmpLengthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestAlignmentAdjust.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestBaselineShift.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestChangeBarOffset.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestChangeBarWidth.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestColumnGap.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestColumnWidth.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestDestinationPlacementOffset.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestExtent.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestFontFamily.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestFontSize.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestForcePageCount.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestLastLineEndIndent.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestLeaderLength.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestLeaderPatternWidth.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestLetterSpacing.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestLineHeight.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestProvisionalDistanceBetweenStarts.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestProvisionalLabelSeparation.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestRole.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestRuleThickness.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestSwitchTo.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTextAlign.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTextAltitude.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTextDepth.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTextIndent.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestVerticalAlign.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestVoiceFamily.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestWordSpacing.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestDtLength.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnAbs.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnBodyStart.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnCeiling.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnFloor.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnFromPageMasterRegion.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnFromParent.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnFromTableColumn.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnInheritedProp.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnLabelEnd.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnMax.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnMergePropertyValues.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnMin.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnNearestSpecProp.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnProportionalColWidth.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnRgb.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnRgbIcc.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnRound.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnSystemColor.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/TestFnSystemFont.java
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/TestFOray.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/TestFOray.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/TestFOray.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,15 +28,19 @@
package org.foray.app;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.ParseException;
-import junit.framework.TestCase;
+import org.junit.Test;
/**
* Tests of {@link FOray}.
*/
-public class TestFOray extends TestCase {
+public class TestFOray {
/**
* Splits the raw command-line into an array of Strings expected by "main" methods.
@@ -64,6 +68,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* @throws ParseException For errors on the input line.
*/
+ @Test
public void testParseCommandLine001() throws ParseException {
final CommandLine commandLine = parseCommandLine(FOray.COMMAND_LINE_EXAMPLE_001);
assertEquals("foo.fo", commandLine.getOptionValue("fo"));
@@ -74,6 +79,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* @throws ParseException For errors on the input line.
*/
+ @Test
public void testParseCommandLine002() throws ParseException {
final CommandLine commandLine = parseCommandLine(FOray.COMMAND_LINE_EXAMPLE_002);
assertEquals("foo.xml", commandLine.getOptionValue("xml"));
@@ -85,6 +91,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* @throws ParseException For errors on the input line.
*/
+ @Test
public void testParseCommandLine003() throws ParseException {
final CommandLine commandLine = parseCommandLine(FOray.COMMAND_LINE_EXAMPLE_003);
assertEquals("foo.fo", commandLine.getOptionValue("fo"));
@@ -95,6 +102,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* @throws ParseException For errors on the input line.
*/
+ @Test
public void testParseCommandLine004() throws ParseException {
final CommandLine commandLine = parseCommandLine(FOray.COMMAND_LINE_EXAMPLE_004);
assertEquals("foo.fo", commandLine.getOptionValue("fo"));
@@ -105,6 +113,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* Tests case where neither a -fo nor -xml option is provided.
*/
+ @Test
public void testParseCommandLineError001() {
try {
parseCommandLine("-xsl foo.xsl -pdf foo.pdf");
@@ -119,6 +128,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* Tests case where -fo switch is specified, but no value is.
*/
+ @Test
public void testParseCommandLineError002() {
try {
parseCommandLine("-fo -pdf foo.pdf");
@@ -133,6 +143,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* Tests case where -pdf switch is specified, but no value is.
*/
+ @Test
public void testParseCommandLineError003() {
try {
parseCommandLine("-fo foo.fo -pdf");
@@ -147,6 +158,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* Tests case where -xml switch is specified, but no value is.
*/
+ @Test
public void testParseCommandLineError004() {
try {
parseCommandLine("-xml -xsl foo.xsl -pdf foo.pdf");
@@ -161,6 +173,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* Tests case where -xsl switch is specified, but no value is.
*/
+ @Test
public void testParseCommandLineError005() {
try {
parseCommandLine("-xml foo.xml -xsl -pdf foo.pdf");
@@ -175,6 +188,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* Tests case where -xml switch is specified, but -xsl switch is not.
*/
+ @Test
public void testParseCommandLineError006() {
try {
parseCommandLine("-xml foo.xml -pdf foo.pdf");
@@ -189,6 +203,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* Tests case where -xsl switch is specified, but -xml switch is not.
*/
+ @Test
public void testParseCommandLineError007() {
try {
parseCommandLine("-fo foo.fo -xsl foo.xsl -pdf foo.pdf");
@@ -203,6 +218,7 @@
* Test of {@link FOray#parseCommandLine(org.apache.commons.cli.Options, String[])}.
* Tests case where no output option is specified.
*/
+ @Test
public void testParseCommandLineError008() {
try {
parseCommandLine("-fo foo.fo");
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,6 +28,9 @@
package org.foray.app.area;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
import org.foray.area.AreaNode;
import org.foray.area.AreaTree;
import org.foray.area.MainRA;
@@ -46,12 +49,10 @@
import java.util.Iterator;
-import junit.framework.TestCase;
-
/**
* Abstract superclass for test classes testing Area Tree content.
*/
-public abstract class AbstractAreaTreeTest extends TestCase {
+public abstract class AbstractAreaTreeTest {
/**
* Get a font server suitable for testing.
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBlock.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBlock.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBlock.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,6 +28,9 @@
package org.foray.app.area;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import org.foray.area.AreaNode;
import org.foray.area.AreaTree;
import org.foray.area.LineArea;
@@ -40,6 +43,8 @@
import org.axsl.font.FontException;
+import org.junit.Test;
+
/**
* Tests of various block-related concepts at the Area Tree level.
*/
@@ -49,6 +54,7 @@
* Test of fo/block-001.fo.
* @throws FOrayException For errors creating the FO Tree or Area Tree.
*/
+ @Test
public void testBlock001() throws FOrayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree areaTree = creator.buildAreaTree(
@@ -146,6 +152,7 @@
* Test of fo/block-002.fo.
* @throws FOrayException For errors creating the FO Tree or Area Tree.
*/
+ @Test
public void testBlock002() throws FOrayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree areaTree = creator.buildAreaTree(
@@ -225,6 +232,7 @@
* @throws FOrayException For errors creating the FO Tree or Area Tree.
* @throws FontException For errors in the font system.
*/
+ @Test
public void testBlock003() throws FOrayException, FontException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
@@ -286,6 +294,7 @@
* @throws FOrayException For errors creating the FO Tree or Area Tree.
* @throws FontException For font system errors in obtaining the font.
*/
+ @Test
public void testBlock004() throws FOrayException, FontException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree areaTree = creator.buildAreaTree(
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBorder.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBorder.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBorder.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,12 +28,17 @@
package org.foray.app.area;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import org.foray.area.AreaNode;
import org.foray.area.AreaTree;
import org.foray.area.NormalBlockArea;
import org.foray.area.NormalFlowRA;
import org.foray.core.FOrayException;
+import org.junit.Test;
+
/**
* Tests of various border-related concepts at the Area Tree level.
*/
@@ -43,6 +48,7 @@
* Test of fo/border-style-001.fo.
* @throws FOrayException For errors creating the FO Tree or Area Tree.
*/
+ @Test
public void testBorderStyle001() throws FOrayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree areaTree = creator.buildAreaTree(
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestGraphicArea.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestGraphicArea.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestGraphicArea.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,6 +28,9 @@
package org.foray.app.area;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import org.foray.area.AreaNode;
import org.foray.area.AreaTree;
import org.foray.area.ExternalGraphicArea;
@@ -36,6 +39,8 @@
import org.foray.area.NormalFlowRA;
import org.foray.core.FOrayException;
+import org.junit.Test;
+
/**
* Tests of various graphic-related concepts at the Area Tree level.
*/
@@ -47,6 +52,7 @@
* dimensions of the viewport are correct.
* @throws FOrayException For errors creating the FO Tree or Area Tree.
*/
+ @Test
public void testGraphic002() throws FOrayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree areaTree = creator.buildAreaTree(
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestInline.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestInline.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestInline.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,6 +28,9 @@
package org.foray.app.area;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import org.foray.area.AreaNode;
import org.foray.area.AreaTree;
import org.foray.area.InlineArea;
@@ -37,6 +40,8 @@
import org.foray.area.TextArea;
import org.foray.core.FOrayException;
+import org.junit.Test;
+
/**
* Tests of various block-related concepts at the Area Tree level.
*/
@@ -48,6 +53,7 @@
* Also does some basic testing of a text area's ability to return its text.
* @throws FOrayException For errors creating the FO Tree or Area Tree.
*/
+ @Test
public void testInline001() throws FOrayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree areaTree = creator.buildAreaTree(
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestMetadata.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestMetadata.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestMetadata.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,9 +28,14 @@
package org.foray.app.area;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
import org.foray.area.AreaTree;
import org.foray.core.FOrayException;
+import org.junit.Test;
+
/**
* Tests of metadata at the Area Tree level.
*/
@@ -40,6 +45,7 @@
* Test of fo/metadata-001.fo.
* @throws FOrayException For errors creating the FO Tree or Area Tree.
*/
+ @Test
public void testMetadata001() throws FOrayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree areaTree = creator.buildAreaTree(
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestVertical.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestVertical.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestVertical.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,6 +28,9 @@
package org.foray.app.area;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import org.foray.area.AreaNode;
import org.foray.area.AreaTree;
import org.foray.area.InlineArea;
@@ -39,6 +42,8 @@
import org.axsl.font.FontUse;
+import org.junit.Test;
+
/**
* Tests of various vertical positioning concepts at the Area Tree level.
*/
@@ -48,6 +53,7 @@
* Test of fo/vertical-001.fo.
* @throws FOrayException For errors creating the FO Tree or Area Tree.
*/
+ @Test
public void testVertical001() throws FOrayException {
final AreaTreeCreator creator = AreaTreeCreator.getInstance();
final AreaTree areaTree = creator.buildAreaTree("fo/vertical-001.fo");
Modified: trunk/foray/foray-areatree/src/test/java/org/foray/area/TestPageCollection.java
===================================================================
--- trunk/foray/foray-areatree/src/test/java/org/foray/area/TestPageCollection.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-areatree/src/test/java/org/foray/area/TestPageCollection.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,16 +28,17 @@
package org.foray.area;
-import junit.framework.TestCase;
+import org.junit.Test;
/**
* Tests for the class {@link PageCollection}.
*/
-public class TestPageCollection extends TestCase {
+public class TestPageCollection {
/**
* Test of {@link PageCollection#padPagesAtBeginning()}.
*/
+ @Test
public void testPadPagesAtBeginning() {
return;
}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestBit.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestBit.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestBit.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,16 +28,19 @@
package org.foray.common;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link Bit}.
*/
-public class TestBit extends TestCase {
+public class TestBit {
/**
* Unit test of {@link Bit#maskHighOrderBits(byte)}.
*/
+ @Test
public void testMaskHighOrderBits() {
byte inputByte = (byte) 0xFF;
byte actualOutput = Bit.maskHighOrderBits(inputByte);
@@ -53,6 +56,7 @@
/**
* Unit test of {@link Bit#maskLowOrderBits(byte)}.
*/
+ @Test
public void testMaskLowOrderBits() {
byte inputByte = (byte) 0xFF;
byte actualOutput = Bit.maskLowOrderBits(inputByte);
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestByteVectorPacked.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestByteVectorPacked.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestByteVectorPacked.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,14 +28,17 @@
package org.foray.common;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
import java.util.Arrays;
-import junit.framework.TestCase;
-
/**
* JUnit test class for the class {@link ByteVectorPacked}.
*/
-public class TestByteVectorPacked extends TestCase {
+public class TestByteVectorPacked {
/** An array of test bytes. */
private static byte[] testSequence01 = new byte[] {
@@ -49,6 +52,7 @@
/**
* Functional test of the class as a whole.
*/
+ @Test
public void testClass01() {
final ByteVectorPacked testVector = new ByteVectorPacked();
@@ -69,6 +73,7 @@
/**
* Test of {@link ByteVectorPacked#computeByteIndex(int)}.
*/
+ @Test
public void testComputeByteIndex() {
final ByteVectorPacked testVector = new ByteVectorPacked();
@@ -88,6 +93,7 @@
/**
* Test of {@link ByteVectorPacked#indexOf(byte, int)}.
*/
+ @Test
public void testIndexOf() {
final ByteVectorPacked testVector = new ByteVectorPacked();
testVector.add(TestByteVectorPacked.testSequence01);
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestCharVector.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestCharVector.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestCharVector.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,12 +28,15 @@
package org.foray.common;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link CharVector}.
*/
-public class TestCharVector extends TestCase {
+public class TestCharVector {
/** The vector that is built and used for various tests. */
private CharVector testVector;
@@ -73,6 +76,7 @@
/**
* Tests of {@link CharVector#compareNullTerminated(int, CharSequence, int)}.
*/
+ @Test
public void testCompareNullTerminated() {
final CharVector testVector = this.getTestVector();
@@ -97,6 +101,7 @@
/**
* Tests of {@link CharVector#subSequence(int, int)}.
*/
+ @Test
public void testSubSequence() {
final CharVector testVector = this.getTestVector();
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestStringUtil.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestStringUtil.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestStringUtil.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,12 +28,14 @@
package org.foray.common;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link StringUtil}.
*/
-public class TestStringUtil extends TestCase {
+public class TestStringUtil {
/** Array used to test methods using null terminator checks. */
private static final char[] NULL_TERMINATED_CHAR_ARRAY = new char[] {'a', 'b', 'c', 'd', 'e', 'f', 0x00, 'g', 'h'};
@@ -44,6 +46,7 @@
/**
* Unit test of the method {@link StringUtil#nullTerminatedLength(char[], int)}.
*/
+ @Test
public void testNullTerminatedLengthCharArray() {
assertEquals(6, StringUtil.nullTerminatedLength(TestStringUtil.NULL_TERMINATED_CHAR_ARRAY, 0));
assertEquals(4, StringUtil.nullTerminatedLength(TestStringUtil.NULL_TERMINATED_CHAR_ARRAY, 2));
@@ -54,6 +57,7 @@
/**
* Unit test of the method {@link StringUtil#nullTerminatedLength(CharSequence, int)}.
*/
+ @Test
public void testNullTerminatedLengthCharSequence() {
assertEquals(6, StringUtil.nullTerminatedLength(TestStringUtil.NULL_TERMINATED_STRING, 0));
assertEquals(4, StringUtil.nullTerminatedLength(TestStringUtil.NULL_TERMINATED_STRING, 2));
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestTernaryTreeMap.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestTernaryTreeMap.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestTernaryTreeMap.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,10 +28,10 @@
package org.foray.common;
+import static org.junit.Assert.assertEquals;
+
import org.junit.Test;
-import junit.framework.TestCase;
-
/**
* JUnit test class for the class {@link TernaryTreeMap}.
*/
@@ -103,56 +103,56 @@
*/
private void checkGetters(final TernaryTreeMap map) {
/* Check the CharSequence getters for whole words. */
- TestCase.assertEquals('C', (char) map.get("Carlos"));
- TestCase.assertEquals('r', (char) map.get("Car"));
- TestCase.assertEquals('l', (char) map.get("palos"));
- TestCase.assertEquals('p', (char) map.get("pa"));
- TestCase.assertEquals(-1, map.get("alto"));
- TestCase.assertEquals(-1, map.get("C"));
+ assertEquals('C', (char) map.get("Carlos"));
+ assertEquals('r', (char) map.get("Car"));
+ assertEquals('l', (char) map.get("palos"));
+ assertEquals('p', (char) map.get("pa"));
+ assertEquals(-1, map.get("alto"));
+ assertEquals(-1, map.get("C"));
/* Check the CharSequence getters for words starting in the middle of a string. */
- TestCase.assertEquals('C', (char) map.get("ABCCarlos", 3));
- TestCase.assertEquals('r', (char) map.get("ABCCar", 3));
- TestCase.assertEquals('l', (char) map.get("ABCpalos", 3));
- TestCase.assertEquals('p', (char) map.get("ABCpa", 3));
- TestCase.assertEquals(-1, map.get("ABCalto", 3));
- TestCase.assertEquals(-1, map.get("ABCC", 3));
+ assertEquals('C', (char) map.get("ABCCarlos", 3));
+ assertEquals('r', (char) map.get("ABCCar", 3));
+ assertEquals('l', (char) map.get("ABCpalos", 3));
+ assertEquals('p', (char) map.get("ABCpa", 3));
+ assertEquals(-1, map.get("ABCalto", 3));
+ assertEquals(-1, map.get("ABCC", 3));
/* Check the CharSequence getters for words starting and ending in the middle of a string. */
- TestCase.assertEquals('C', (char) map.get("ABCCarlosXYZ", 3, 9));
- TestCase.assertEquals('r', (char) map.get("ABCCarXYZ", 3, 6));
- TestCase.assertEquals('l', (char) map.get("ABCpalosXYZ", 3, 8));
- TestCase.assertEquals('p', (char) map.get("ABCpaABCXYZ", 3, 5));
- TestCase.assertEquals(-1, map.get("ABCaltoXYZ", 3, 7));
- TestCase.assertEquals(-1, map.get("ABCCXYZ", 3, 4));
+ assertEquals('C', (char) map.get("ABCCarlosXYZ", 3, 9));
+ assertEquals('r', (char) map.get("ABCCarXYZ", 3, 6));
+ assertEquals('l', (char) map.get("ABCpalosXYZ", 3, 8));
+ assertEquals('p', (char) map.get("ABCpaABCXYZ", 3, 5));
+ assertEquals(-1, map.get("ABCaltoXYZ", 3, 7));
+ assertEquals(-1, map.get("ABCCXYZ", 3, 4));
/* Check the char[] getters for whole words. */
- TestCase.assertEquals('C', (char) map.get("Carlos".toCharArray()));
- TestCase.assertEquals('r', (char) map.get("Car".toCharArray()));
- TestCase.assertEquals('l', (char) map.get("palos".toCharArray()));
- TestCase.assertEquals('p', (char) map.get("pa".toCharArray()));
- TestCase.assertEquals(-1, map.get("alto".toCharArray()));
- TestCase.assertEquals(-1, map.get("C".toCharArray()));
+ assertEquals('C', (char) map.get("Carlos".toCharArray()));
+ assertEquals('r', (char) map.get("Car".toCharArray()));
+ assertEquals('l', (char) map.get("palos".toCharArray()));
+ assertEquals('p', (char) map.get("pa".toCharArray()));
+ assertEquals(-1, map.get("alto".toCharArray()));
+ assertEquals(-1, map.get("C".toCharArray()));
/* Check the char[] getters for words starting in the middle of a string. */
- TestCase.assertEquals('C', (char) map.get("ABCCarlos".toCharArray(), 3));
- TestCase.assertEquals('r', (char) map.get("ABCCar".toCharArray(), 3));
- TestCase.assertEquals('l', (char) map.get("ABCpalos".toCharArray(), 3));
- TestCase.assertEquals('p', (char) map.get("ABCpa".toCharArray(), 3));
- TestCase.assertEquals(-1, map.get("ABCalto".toCharArray(), 3));
- TestCase.assertEquals(-1, map.get("ABCC".toCharArray(), 3));
+ assertEquals('C', (char) map.get("ABCCarlos".toCharArray(), 3));
+ assertEquals('r', (char) map.get("ABCCar".toCharArray(), 3));
+ assertEquals('l', (char) map.get("ABCpalos".toCharArray(), 3));
+ assertEquals('p', (char) map.get("ABCpa".toCharArray(), 3));
+ assertEquals(-1, map.get("ABCalto".toCharArray(), 3));
+ assertEquals(-1, map.get("ABCC".toCharArray(), 3));
/* Check the char[] getters for words starting and ending in the middle of a string. */
- TestCase.assertEquals('C', (char) map.get("ABCCarlosXYZ".toCharArray(), 3, 9));
- TestCase.assertEquals('r', (char) map.get("ABCCarXYZ".toCharArray(), 3, 6));
- TestCase.assertEquals('l', (char) map.get("ABCpalosXYZ".toCharArray(), 3, 8));
- TestCase.assertEquals('p', (char) map.get("ABCpaABCXYZ".toCharArray(), 3, 5));
- TestCase.assertEquals(-1, map.get("ABCaltoXYZ".toCharArray(), 3, 7));
- TestCase.assertEquals(-1, map.get("ABCCXYZ".toCharArray(), 3, 4));
+ assertEquals('C', (char) map.get("ABCCarlosXYZ".toCharArray(), 3, 9));
+ assertEquals('r', (char) map.get("ABCCarXYZ".toCharArray(), 3, 6));
+ assertEquals('l', (char) map.get("ABCpalosXYZ".toCharArray(), 3, 8));
+ assertEquals('p', (char) map.get("ABCpaABCXYZ".toCharArray(), 3, 5));
+ assertEquals(-1, map.get("ABCaltoXYZ".toCharArray(), 3, 7));
+ assertEquals(-1, map.get("ABCCXYZ".toCharArray(), 3, 4));
- TestCase.assertEquals(4, map.size());
+ assertEquals(4, map.size());
/* TODO: We don't fully understand the node count here. */
- TestCase.assertEquals(11, map.getNodeCount());
+ assertEquals(11, map.getNodeCount());
}
/**
@@ -166,11 +166,11 @@
map.put("Carlos", 'C');
map.optimize();
- TestCase.assertEquals('C', (char) map.get("Carlos"));
- TestCase.assertEquals('r', (char) map.get("Car"));
- TestCase.assertEquals(-1, map.get("alto"));
- TestCase.assertEquals(-1, map.get("C"));
- TestCase.assertEquals(2, map.size());
+ assertEquals('C', (char) map.get("Carlos"));
+ assertEquals('r', (char) map.get("Car"));
+ assertEquals(-1, map.get("alto"));
+ assertEquals(-1, map.get("C"));
+ assertEquals(2, map.size());
}
/**
@@ -184,9 +184,9 @@
map.put("45", '2');
map.put("4", '3');
- TestCase.assertEquals('1', (char) map.get("40"));
- TestCase.assertEquals('2', (char) map.get("45"));
- TestCase.assertEquals('3', (char) map.get("4"));
+ assertEquals('1', (char) map.get("40"));
+ assertEquals('2', (char) map.get("45"));
+ assertEquals('3', (char) map.get("4"));
}
}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestUnicodeChar.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestUnicodeChar.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestUnicodeChar.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,16 +28,20 @@
package org.foray.common;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link UnicodeChar}.
*/
-public class TestUnicodeChar extends TestCase {
+public class TestUnicodeChar {
/**
* Unit test of the method {@link UnicodeChar#parseCodePoint(String)}.
*/
+@Test
public void testOutput() {
/* First throw some garbage at it. */
String testString = "jhuz";
Modified: trunk/foray/foray-font/src/test/java/org/foray/font/TestFont4a.java
===================================================================
--- trunk/foray/foray-font/src/test/java/org/foray/font/TestFont4a.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-font/src/test/java/org/foray/font/TestFont4a.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,21 +28,25 @@
package org.foray.font;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
import org.axsl.font.FontException;
import org.axsl.ps.Encoding;
-import junit.framework.TestCase;
+import org.junit.Test;
/**
* JUnit test class for the class {@link Font4a}.
*/
-public class TestFont4a extends TestCase {
+public class TestFont4a {
/**
* Ensures that we can read the serialized metrics information for the
* Base-14 fonts, and some basic testing of that data.
* @throws FontException For font system errors.
*/
+ @Test
public void testBase14() throws FontException {
final FontServer4a server = TestFontServer4a.getServer();
assertNotNull(server);
@@ -62,6 +66,7 @@
* Functional test of getting the glyph widths and kerning for a String.
* @throws FontException For font system errors.
*/
+ @Test
public void testWidth() throws FontException {
final FontServer4a server = TestFontServer4a.getServer();
assertNotNull(server);
Modified: trunk/foray/foray-font/src/test/java/org/foray/font/TestFontServer4a.java
===================================================================
--- trunk/foray/foray-font/src/test/java/org/foray/font/TestFontServer4a.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-font/src/test/java/org/foray/font/TestFontServer4a.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,21 +28,23 @@
package org.foray.font;
+import static org.junit.Assert.assertNotNull;
+
import org.foray.common.Environment;
import org.foray.common.url.URLFactory;
import org.axsl.font.FontException;
+import org.junit.Test;
+
import java.io.IOException;
import java.net.URL;
import java.util.Properties;
-import junit.framework.TestCase;
-
/**
* JUnit test class for the class {@link FontServer4a}.
*/
-public class TestFontServer4a extends TestCase {
+public class TestFontServer4a {
/** A FontServer available for testing. */
private static FontServer4a fontServer;
@@ -81,6 +83,7 @@
* Ensures that we can create a FontServer.
* @throws FontException For font system errors.
*/
+ @Test
public void testBase14() throws FontException {
final FontServer4a server = TestFontServer4a.getServer();
assertNotNull(server);
Modified: trunk/foray/foray-font/src/test/java/org/foray/font/format/TestType1PfbFile.java
===================================================================
--- trunk/foray/foray-font/src/test/java/org/foray/font/format/TestType1PfbFile.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-font/src/test/java/org/foray/font/format/TestType1PfbFile.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,6 +28,9 @@
package org.foray.font.format;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
import org.foray.font.FontServer4a;
import org.foray.font.TestFontServer4a;
@@ -37,21 +40,22 @@
import org.axsl.ps.Type1FontInfoDictionary;
import org.axsl.ps.Type1PrivateDictionary;
+import org.junit.Test;
+
import java.io.IOException;
import java.net.URL;
-import junit.framework.TestCase;
-
/**
* JUnit test class for the class {@link TestType1PfbFile}.
*/
-public class TestType1PfbFile extends TestCase {
+public class TestType1PfbFile {
/**
* Tests basic ability to parse a Type 1 PFB file.
* @throws FontException For font system errors.
* @throws IOException For errors reading the test file.
*/
+ @Test
public void testParse() throws FontException, IOException {
final URL fontFile = TestFontServer4a.getTestFont("source-ams/computer-modern/cmps-pc/"
+ "cmpsfont/fonts/cmr10.pfb");
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTest.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTest.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTest.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,18 +28,20 @@
package org.foray.fotree;
+import static org.junit.Assert.fail;
+
import org.foray.fotree.fo.obj.Root;
import org.axsl.fo.FoContext;
import org.axsl.fo.FoInlineContext;
import org.axsl.fo.fo.GraftingPoint;
-import junit.framework.TestCase;
+import org.junit.Test;
/**
* Superclass for all tests of Property classes.
*/
-public abstract class AbstractPropertyTest extends TestCase {
+public abstract class AbstractPropertyTest {
/** Constant providing a standard, but completely bogus context to be
* used during retrieval of property values. */
@@ -116,6 +118,7 @@
* Other classes should override this method.
* @throws PropertyException For errors during parsing.
*/
+ @Test
public void testNullInput() throws PropertyException {
final FObj testFobj = makeTestFObj();
try {
@@ -133,6 +136,7 @@
* Other classes should override this method.
* @throws PropertyException For errors during parsing.
*/
+ @Test
public void testName001() throws PropertyException {
final FObj testFobj = makeTestFObj();
try {
@@ -150,6 +154,7 @@
* Other classes should override this method.
* @throws PropertyException For errors during parsing.
*/
+ @Test
public void testString001() throws PropertyException {
final FObj testFobj = makeTestFObj();
try {
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestAbsoluteDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestAbsoluteDimension.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestAbsoluteDimension.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -27,11 +27,15 @@
*/
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test superclass for the subclasses {@link AbstractAbsoluteDimension}.
*/
@@ -59,6 +63,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final AbstractAbsoluteDimension property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestAbsoluteOffset.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestAbsoluteOffset.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestAbsoluteOffset.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,10 +28,14 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test class for subclasses of {@link AbstractAbsoluteOffset}.
*/
@@ -59,6 +63,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final AbstractAbsoluteOffset property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestBackgroundPosition.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestBackgroundPosition.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestBackgroundPosition.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,10 +28,14 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test class for subclasses of {@link AbstractBackgroundPosition}.
*/
@@ -60,6 +64,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final AbstractBackgroundPosition property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestBorderWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestBorderWidth.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestBorderWidth.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,6 +28,10 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
@@ -35,6 +39,8 @@
import org.foray.fotree.fo.FoValue;
import org.foray.fotree.value.PropertyValue;
+import org.junit.Test;
+
/**
* JUnit test class for subclasses of {@link AbstractBorderWidth}.
*/
@@ -62,6 +68,7 @@
/**
* Unit test for an "auto" value, which is invalid.
*/
+ @Test
public void testAuto() {
final FObj testFobj = makeTestFObj();
try {
@@ -76,6 +83,7 @@
* Unit test for the storage of a "thin" value.
* @throws PropertyException For errors during parsing.
*/
+ @Test
public void testThin() throws PropertyException {
final AbstractBorderWidth property = createProperty(null, "thin");
final PropertyValue value = property.value();
@@ -88,6 +96,7 @@
* Unit test for the storage of a "thick" value.
* @throws PropertyException For errors during parsing.
*/
+ @Test
public void testThick() throws PropertyException {
final AbstractBorderWidth property = createProperty(null, "thick");
final PropertyValue value = property.value();
@@ -100,6 +109,7 @@
* Unit test for the storage of a "medium" value.
* @throws PropertyException For errors during parsing.
*/
+ @Test
public void testMedium() throws PropertyException {
final AbstractBorderWidth property = createProperty(null, "medium");
final PropertyValue value = property.value();
@@ -112,6 +122,7 @@
* Unit test for the storage of an "inherit" value.
* @throws PropertyException For errors during parsing.
*/
+ @Test
public void testInherit() throws PropertyException {
final AbstractBorderWidth property = createProperty(null, "inherit");
final PropertyValue value = property.value();
@@ -123,6 +134,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final AbstractBorderWidth property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestContentDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestContentDimension.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestContentDimension.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -32,6 +32,8 @@
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test superclass for the subclasses {@link AbstractContentDimension}.
*/
@@ -62,6 +64,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
// final FObj testFobj = makeTestFObj();
// final AbstractContentDimension property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestIndent.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestIndent.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestIndent.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,10 +28,14 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test superclass for subclasses of {@link AbstractIndent}.
*/
@@ -59,6 +63,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final AbstractIndent property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestMargin.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestMargin.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestMargin.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,10 +28,14 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test superclass for subclasses of {@link AbstractMargin}.
*/
@@ -59,6 +63,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final AbstractMargin property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestName.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestName.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestName.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -32,6 +32,8 @@
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test superclass for the property classes that return names.
*/
@@ -42,6 +44,7 @@
* Overrides the superclass, because this class can take a valid name.
*/
@Override
+ @Test
public void testName001() throws PropertyException {
final FObj testFobj = makeTestFObj();
createProperty(testFobj, "bhxbt");
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestPadding.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestPadding.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestPadding.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,10 +28,14 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test class for subclasses of {@link AbstractPadding}.
*/
@@ -59,6 +63,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final AbstractPadding property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestPageDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestPageDimension.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestPageDimension.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,10 +28,14 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test superclass for the subclasses of {@link AbstractPageDimension}.
*/
@@ -59,6 +63,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final AbstractPageDimension property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestRelativeDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestRelativeDimension.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestRelativeDimension.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,11 +28,15 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.LengthRange;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test superclass for the subclasses of
* {@link AbstractRelativeDimension}.
@@ -62,6 +66,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final AbstractRelativeDimension property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestRelativeSpace.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestRelativeSpace.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestRelativeSpace.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,11 +28,15 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.LengthRange;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test superclass for subclasses of {@link AbstractRelativeSpace}.
*/
@@ -62,6 +66,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final AbstractRelativeSpace property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestString.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestString.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestString.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -32,6 +32,8 @@
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test superclass for the property classes that return strings.
*/
@@ -43,6 +45,7 @@
* to this property.
*/
@Override
+ @Test
public void testNullInput() throws PropertyException {
final FObj testFobj = makeTestFObj();
createProperty(testFobj, "");
@@ -53,6 +56,7 @@
* Overrides the superclass, because this class can take a valid name.
*/
@Override
+ @Test
public void testName001() throws PropertyException {
final FObj testFobj = makeTestFObj();
createProperty(testFobj, "bhxbt");
@@ -63,6 +67,7 @@
* Overrides the superclass, because this class can take any valid string.
*/
@Override
+ @Test
public void testString001() throws PropertyException {
final FObj testFobj = makeTestFObj();
createProperty(testFobj, "abc xyz");
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CmpLengthTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CmpLengthTests.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CmpLengthTests.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -30,6 +30,8 @@
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* A set of comprehensive length tests that can be implemented by test classes
* that need to test the ability to parse and return length values.
@@ -41,6 +43,7 @@
* value.
* @throws PropertyException For errors during parsing.
*/
+ @Test
void testLength001() throws PropertyException;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestAlignmentAdjust.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestAlignmentAdjust.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestAlignmentAdjust.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,10 +28,14 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link PdAlignmentAdjust}.
*/
@@ -64,6 +68,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final PdAlignmentAdjust property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestBaselineShift.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestBaselineShift.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestBaselineShift.java 2010-08-21 23:51:35 UTC (rev 11044)
@@ -28,10 +28,14 @@
package org.foray.fotree.fo.prop;
+import static org.junit.Assert.assertEquals;
+
import org.foray.fotree.AbstractPropertyTest;
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link PdBaselineShift}.
*/
@@ -63,6 +67,7 @@
/**
* {@inheritDoc}
*/
+ @Test
public void testLength001() throws PropertyException {
final FObj testFobj = makeTestFObj();
final PdBaselineShift property = createProperty(testFobj,
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestChangeBarOffset.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestChangeBarOffset.java 2010-08-21 19:39:20 UTC (rev 11043)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestChangeBarOffset.java 2010-08-21 2...
[truncated message content] |
|
From: <vic...@us...> - 2010-08-21 19:39:27
|
Revision: 11043
http://foray.svn.sourceforge.net/foray/?rev=11043&view=rev
Author: victormote
Date: 2010-08-21 19:39:20 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Add test to ensure that the MathML DTD is available as a local resource.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
Added Paths:
-----------
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/factory/
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/factory/TestMathFactory.java
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2010-08-21 19:02:15 UTC (rev 11042)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2010-08-21 19:39:20 UTC (rev 11043)
@@ -102,7 +102,8 @@
* @return A MathML DTD component as an InputStream.
*/
public static InputStream getMathMLDtdAsInputStream(final String fileName) {
- final InputStream theStream = MathMLUtil.class.getResourceAsStream("/mathml2/" + fileName);
+ /* We expect to find the MathML DTD in the JEuclid jar file at "mathml.2.0/mathml2.dtd". */
+ final InputStream theStream = MathMLUtil.class.getResourceAsStream("/mathml.2.0/" + fileName);
return theStream;
}
Added: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/factory/TestMathFactory.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/factory/TestMathFactory.java (rev 0)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/factory/TestMathFactory.java 2010-08-21 19:39:20 UTC (rev 11043)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2010 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: 10997 $
+ * $LastChangedDate: 2010-05-04 16:11:47 -0600 (Tue, 04 May 2010) $
+ * $LastChangedBy$
+ */
+
+package org.foray.graphic.factory;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * JUnit test class for the class {@link MathFactory}.
+ */
+public class TestMathFactory {
+
+ /**
+ * Test of {@link MathFactory#getMathMLDtdAsInputStream(String)}.
+ * Ensure that the MathML DTD is available as a local resource (that is, in a jar file).
+ * We currently get the DTD from the jeuclid-core jar file, but, if we change dependencies in the future, we want
+ * to know if this no longer works.
+ * @throws IOException For errors reading from the stream.
+ */
+ @Test
+ public void testGetMathMLDtdAsInputStream() throws IOException {
+ final InputStream inputStream = MathFactory.getMathMLDtdAsInputStream("mathml2.dtd");
+ if (inputStream == null) {
+ Assert.fail("The mathml2.dtd was not found.");
+ }
+ final byte[] testBytes = new byte[30];
+ inputStream.read(testBytes, 0, 30);
+ final String actualValue = new String(testBytes);
+ final String expectedValue = "<!-- MathML 2.0 DTD .........";
+ Assert.assertEquals("Content of mathml2.dtd is unexpected.", expectedValue, actualValue);
+ }
+
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-21 19:02:21
|
Revision: 11042
http://foray.svn.sourceforge.net/foray/?rev=11042&view=rev
Author: victormote
Date: 2010-08-21 19:02:15 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Add the runtime dependency on Xerces.
Modified Paths:
--------------
trunk/foray/foray-xml/pom.xml
Modified: trunk/foray/foray-xml/pom.xml
===================================================================
--- trunk/foray/foray-xml/pom.xml 2010-08-21 18:53:41 UTC (rev 11041)
+++ trunk/foray/foray-xml/pom.xml 2010-08-21 19:02:15 UTC (rev 11042)
@@ -56,6 +56,13 @@
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.7.1</version>
+ <type>jar</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
<groupId>org.foray</groupId>
<artifactId>foray-common</artifactId>
<type>jar</type>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-21 18:53:48
|
Revision: 11041
http://foray.svn.sourceforge.net/foray/?rev=11041&view=rev
Author: victormote
Date: 2010-08-21 18:53:41 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Move some DOM-specific code from foray-common to foray-xml.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java
trunk/foray/foray-graphic/pom.xml
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
trunk/foray/foray-xml/pom.xml
Added Paths:
-----------
trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java
trunk/foray/foray-xml/src/test/
trunk/foray/foray-xml/src/test/java/
trunk/foray/foray-xml/src/test/java/org/
trunk/foray/foray-xml/src/test/java/org/foray/
trunk/foray/foray-xml/src/test/java/org/foray/xml/
trunk/foray/foray-xml/src/test/java/org/foray/xml/TestXMLUtil.java
Removed Paths:
-------------
trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java 2010-08-21 18:35:01 UTC (rev 11040)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java 2010-08-21 18:53:41 UTC (rev 11041)
@@ -31,18 +31,8 @@
import org.apache.xml.resolver.CatalogManager;
import org.apache.xml.resolver.tools.CatalogResolver;
-import org.w3c.dom.DOMConfiguration;
-import org.w3c.dom.Document;
-import org.w3c.dom.bootstrap.DOMImplementationRegistry;
-import org.w3c.dom.ls.DOMImplementationLS;
-import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSParser;
-import org.w3c.dom.ls.LSResourceResolver;
import org.xml.sax.InputSource;
-import java.io.IOException;
-import java.io.InputStream;
-
import javax.xml.stream.XMLResolver;
import javax.xml.stream.XMLStreamException;
@@ -58,9 +48,6 @@
*/
public static final String XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/";
- /** The registry of DOM Implementations available. */
- private static DOMImplementationRegistry domImplementationRegistry;
-
/**
* This class should never be instantiated.
*/
@@ -137,86 +124,6 @@
}
/**
- * Returns the DOM Implementation registry.
- * @return The DOM Implementation registry.
- * @throws IOException For errors obtaining an instance of the registry.
- */
- public static DOMImplementationRegistry getDOMRegistry() throws IOException {
- if (XMLUtil.domImplementationRegistry == null) {
- try {
- XMLUtil.domImplementationRegistry = DOMImplementationRegistry.newInstance();
- } catch (final ClassCastException e) {
- throw new IOException(e.getMessage());
- } catch (final ClassNotFoundException e) {
- throw new IOException(e.getMessage());
- } catch (final InstantiationException e) {
- throw new IOException(e.getMessage());
- } catch (final IllegalAccessException e) {
- throw new IOException(e.getMessage());
- }
- }
- return XMLUtil.domImplementationRegistry;
- }
-
- /**
- * Returns the DOM Implementation.
- * @return The DOM Implementation.
- * @throws IOException For errors obtaining an instance of the DOM Implementation registry.
- */
- public static DOMImplementationLS getDOMImplementation() throws IOException {
- final DOMImplementationRegistry registry = XMLUtil.getDOMRegistry();
-
- final DOMImplementationLS impl = (DOMImplementationLS) registry.getDOMImplementation("LS");
- return impl;
- }
-
- /**
- * Converts an input stream to a generic DOM Document.
- * @param inputStream The stream to be parsed to a DOM document.
- * @param resourceResolver The resource resolver to use, which can be null.
- * This is useful for cases where we want (for example) to find a DTD locally instead of on the internet.
- * @return The DOM document.
- * @throws IOException For errors parsing the document.
- */
- public static Document streamToDom(final InputStream inputStream, final LSResourceResolver resourceResolver)
- throws IOException {
- final DOMImplementationLS impl = XMLUtil.getDOMImplementation();
- final LSParser builder = impl.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null);
- final DOMConfiguration domConfiguration = builder.getDomConfig();
- if (resourceResolver != null
- && domConfiguration.canSetParameter("resource-resolver", resourceResolver)) {
- domConfiguration.setParameter("resource-resolver", resourceResolver);
- }
-
- final LSInput lsInput = impl.createLSInput();
- lsInput.setByteStream(inputStream);
-
- final Document document = builder.parse(lsInput);
- return document;
- }
-
- /**
- * Converts an input stream into an LSInput.
- * @param publicId The public ID to attache to the input.
- * @param systemId The system ID to attach to the input.
- * @param inputStream The input stream to attach to the input.
- * @return The new input.
- */
- public static LSInput createLSInput(final InputStream inputStream, final String publicId, final String systemId) {
- DOMImplementationLS implementation;
- try {
- implementation = XMLUtil.getDOMImplementation();
- } catch (final IOException e) {
- return null;
- }
- final LSInput input = implementation.createLSInput();
- input.setByteStream(inputStream);
- input.setPublicId(publicId);
- input.setSystemId(systemId);
- return input;
- }
-
- /**
* Creates an EntityResolver for one or more XML catalogs.
* @param catalogs The array of URIs indicating where the XML catalogs are located.
* @return The created EntityResolver.
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-21 18:35:01 UTC (rev 11040)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-21 18:53:41 UTC (rev 11041)
@@ -1,151 +0,0 @@
-/*
- * Copyright 2008 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.common;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ls.LSException;
-import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSResourceResolver;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * JUnit test class for the class {@link XMLUtil}.
- */
-public class TestXMLUtil {
-
- /* Example document and DTD liberated from O'Reilly's "XML in a Nutshell", 3rd Edition, p. 30. */
-
- /** The DTD public ID. */
- private static final String STATED_PUBLIC_ID = "Totally Bogus DTD";
-
- /** The DTD system ID. */
- private static final String STATED_SYSTEM_ID = "file:/u/xyz/abc/totally-bogus.dtd";
-
- /** The test document. */
- private static final String XML_DOCUMENT =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
- "<!DOCTYPE Book\n" +
- " PUBLIC \"" + TestXMLUtil.STATED_PUBLIC_ID + "\"\n" +
- " \"" + TestXMLUtil.STATED_SYSTEM_ID + "\"\n" +
- ">\n" +
- "<person>\n" +
- " <name>\n" +
- " <first_name>Alan</first_name>\n" +
- " <last_name>Turing</last_name>\n" +
- " </name>\n" +
- " <profession>computer scientist</profession>\n" +
- " <profession>mathematician</profession>\n" +
- " <profession>cryptographer</profession>\n" +
- "</person>\n";
-
- /** The test DTD. */
- private static final String DTD_DOCUMENT =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
- " <!ELEMENT person (name, profession*)>\n" +
- " <!ELEMENT name (first_name, last_name)>\n" +
- " <!ELEMENT first_name (#PCDATA)>\n" +
- " <!ELEMENT last_name (#PCDATA)>\n" +
- " <!ELEMENT profession (#PCDATA)>\n";
-
- /**
- * Test the method {@link XMLUtil#streamToDom(java.io.InputStream, org.w3c.dom.ls.LSResourceResolver)} by parsing
- * a file and testing the results.
- * @throws IOException For errors obtaining an instance of the DOM Implementation registry.
- */
- @Test
- public void parseWithoutDtdShouldFail() throws IOException {
- final InputStream xmlDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.XML_DOCUMENT.getBytes());
- try {
- XMLUtil.streamToDom(xmlDocumentInputStream, null);
- fail("Should have failed");
- } catch (final LSException e) {
- /* Do nothing. This is the expected case. */
- }
- }
-
- /**
- * Test the method {@link XMLUtil#streamToDom(java.io.InputStream, org.w3c.dom.ls.LSResourceResolver)} by parsing
- * a file and testing the results.
- * @throws IOException For errors getting the local sandbox.
- */
- @Test
- public void parseWithDtdShouldWork() throws IOException {
- final InputStream xmlDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.XML_DOCUMENT.getBytes());
- final InputStream dtdDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.DTD_DOCUMENT.getBytes());
- final LSResourceResolver resourceResolver = new LSResourceResolver() {
- public LSInput resolveResource(final String type, final String namespaceURI, final String publicId,
- final String systemId, final String baseURI) {
- if (TestXMLUtil.STATED_PUBLIC_ID.equals(publicId)) {
- return XMLUtil.createLSInput(dtdDocumentInputStream, TestXMLUtil.STATED_PUBLIC_ID,
- TestXMLUtil.STATED_SYSTEM_ID);
- }
- return null;
- }
- };
- final Document document = XMLUtil.streamToDom(xmlDocumentInputStream, resourceResolver);
- assertNotNull(document);
-
- /* The document itself has two children, the document type, and the
- * root element. */
- NodeList nodeList = document.getChildNodes();
- assertEquals(2, nodeList.getLength());
- /* The first node is the document type node. */
- assertEquals(Node.DOCUMENT_TYPE_NODE, nodeList.item(0).getNodeType());
-
- /* The second node is the root element. */
- Node node = nodeList.item(1);
- assertEquals(Node.ELEMENT_NODE, node.getNodeType());
- assertEquals("person", node.getLocalName());
-
- nodeList = node.getChildNodes();
- assertEquals(9, nodeList.getLength());
- /* The first child is ignorable whitespace. */
- assertEquals(Node.TEXT_NODE, nodeList.item(0).getNodeType());
- /* The second child is the name element. */
- assertEquals(Node.ELEMENT_NODE, nodeList.item(1).getNodeType());
- assertEquals("name", nodeList.item(1).getLocalName());
- /* The third child is ignorable whitespace. */
- assertEquals(Node.TEXT_NODE, nodeList.item(2).getNodeType());
- node = nodeList.item(1);
-
- /* It is certainly possible to test this DOM document more extensively, but this is enough to show that it was
- * parsed. */
- }
-
-}
Modified: trunk/foray/foray-graphic/pom.xml
===================================================================
--- trunk/foray/foray-graphic/pom.xml 2010-08-21 18:35:01 UTC (rev 11040)
+++ trunk/foray/foray-graphic/pom.xml 2010-08-21 18:53:41 UTC (rev 11041)
@@ -149,10 +149,15 @@
<dependency>
<groupId>org.foray</groupId>
<artifactId>foray-common</artifactId>
- <version>0.4-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-xml</artifactId>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2010-08-21 18:35:01 UTC (rev 11040)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2010-08-21 18:53:41 UTC (rev 11041)
@@ -29,9 +29,9 @@
package org.foray.graphic.factory;
import org.foray.common.MathMLUtil;
-import org.foray.common.XMLUtil;
import org.foray.graphic.GraphicServer4a;
import org.foray.graphic.SVGGraphic;
+import org.foray.xml.DomUtil;
import org.axsl.graphic.GraphicException;
@@ -81,7 +81,7 @@
/* Convert the URL to a generic DOM document instance. */
final LSResourceResolver resourceResolver = MathFactory.getMathMLDtdResourceResolver();
- final Document dom = XMLUtil.streamToDom(url.openStream(), resourceResolver);
+ final Document dom = DomUtil.streamToDom(url.openStream(), resourceResolver);
/* Convert the generic DOM to an SVGDocument (DOM/SVG Document), using
* JEuclid. */
@@ -115,7 +115,7 @@
final InputStream theStream = MathFactory.getMathMLDtdAsInputStream(fileName);
DOMImplementationLS implementation;
try {
- implementation = XMLUtil.getDOMImplementation();
+ implementation = DomUtil.getDOMImplementation();
} catch (final IOException e) {
return null;
}
Modified: trunk/foray/foray-xml/pom.xml
===================================================================
--- trunk/foray/foray-xml/pom.xml 2010-08-21 18:35:01 UTC (rev 11040)
+++ trunk/foray/foray-xml/pom.xml 2010-08-21 18:53:41 UTC (rev 11041)
@@ -19,6 +19,13 @@
<dependencies>
<dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <type>jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<type>jar</type>
Added: trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java (rev 0)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/DomUtil.java 2010-08-21 18:53:41 UTC (rev 11041)
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2004 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: 11037 $
+ * $LastChangedDate: 2010-08-20 21:17:15 -0600 (Fri, 20 Aug 2010) $
+ * $LastChangedBy$
+ */
+
+package org.foray.xml;
+
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.Document;
+import org.w3c.dom.bootstrap.DOMImplementationRegistry;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSParser;
+import org.w3c.dom.ls.LSResourceResolver;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Utility class containing methods useful in parsing or building XML.
+ */
+public final class DomUtil {
+
+ /**
+ * The namespace declaration to be assigned to the namespace definition
+ * in XML documents.
+ * @see "http://www.w3.org/2000/xmlns/"
+ */
+ public static final String XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/";
+
+ /** The registry of DOM Implementations available. */
+ private static DOMImplementationRegistry domImplementationRegistry;
+
+ /**
+ * This class should never be instantiated.
+ */
+ private DomUtil() { }
+
+ /**
+ * Returns the DOM Implementation registry.
+ * @return The DOM Implementation registry.
+ * @throws IOException For errors obtaining an instance of the registry.
+ */
+ public static DOMImplementationRegistry getDOMRegistry() throws IOException {
+ if (DomUtil.domImplementationRegistry == null) {
+ try {
+ DomUtil.domImplementationRegistry = DOMImplementationRegistry.newInstance();
+ } catch (final ClassCastException e) {
+ throw new IOException(e.getMessage());
+ } catch (final ClassNotFoundException e) {
+ throw new IOException(e.getMessage());
+ } catch (final InstantiationException e) {
+ throw new IOException(e.getMessage());
+ } catch (final IllegalAccessException e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+ return DomUtil.domImplementationRegistry;
+ }
+
+ /**
+ * Returns the DOM Implementation.
+ * @return The DOM Implementation.
+ * @throws IOException For errors obtaining an instance of the DOM Implementation registry.
+ */
+ public static DOMImplementationLS getDOMImplementation() throws IOException {
+ final DOMImplementationRegistry registry = DomUtil.getDOMRegistry();
+
+ final DOMImplementationLS impl = (DOMImplementationLS) registry.getDOMImplementation("LS");
+ return impl;
+ }
+
+ /**
+ * Converts an input stream to a generic DOM Document.
+ * @param inputStream The stream to be parsed to a DOM document.
+ * @param resourceResolver The resource resolver to use, which can be null.
+ * This is useful for cases where we want (for example) to find a DTD locally instead of on the internet.
+ * @return The DOM document.
+ * @throws IOException For errors parsing the document.
+ */
+ public static Document streamToDom(final InputStream inputStream, final LSResourceResolver resourceResolver)
+ throws IOException {
+ final DOMImplementationLS impl = DomUtil.getDOMImplementation();
+ final LSParser builder = impl.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null);
+ final DOMConfiguration domConfiguration = builder.getDomConfig();
+ if (resourceResolver != null
+ && domConfiguration.canSetParameter("resource-resolver", resourceResolver)) {
+ domConfiguration.setParameter("resource-resolver", resourceResolver);
+ }
+
+ final LSInput lsInput = impl.createLSInput();
+ lsInput.setByteStream(inputStream);
+
+ final Document document = builder.parse(lsInput);
+ return document;
+ }
+
+ /**
+ * Converts an input stream into an LSInput.
+ * @param publicId The public ID to attache to the input.
+ * @param systemId The system ID to attach to the input.
+ * @param inputStream The input stream to attach to the input.
+ * @return The new input.
+ */
+ public static LSInput createLSInput(final InputStream inputStream, final String publicId, final String systemId) {
+ DOMImplementationLS implementation;
+ try {
+ implementation = DomUtil.getDOMImplementation();
+ } catch (final IOException e) {
+ return null;
+ }
+ final LSInput input = implementation.createLSInput();
+ input.setByteStream(inputStream);
+ input.setPublicId(publicId);
+ input.setSystemId(systemId);
+ return input;
+ }
+
+}
Copied: trunk/foray/foray-xml/src/test/java/org/foray/xml/TestXMLUtil.java (from rev 11037, trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java)
===================================================================
--- trunk/foray/foray-xml/src/test/java/org/foray/xml/TestXMLUtil.java (rev 0)
+++ trunk/foray/foray-xml/src/test/java/org/foray/xml/TestXMLUtil.java 2010-08-21 18:53:41 UTC (rev 11041)
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2008 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.xml;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import org.foray.common.XMLUtil;
+
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.ls.LSException;
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSResourceResolver;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * JUnit test class for the class {@link XMLUtil}.
+ */
+public class TestXMLUtil {
+
+ /* Example document and DTD liberated from O'Reilly's "XML in a Nutshell", 3rd Edition, p. 30. */
+
+ /** The DTD public ID. */
+ private static final String STATED_PUBLIC_ID = "Totally Bogus DTD";
+
+ /** The DTD system ID. */
+ private static final String STATED_SYSTEM_ID = "file:/u/xyz/abc/totally-bogus.dtd";
+
+ /** The test document. */
+ private static final String XML_DOCUMENT =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<!DOCTYPE Book\n" +
+ " PUBLIC \"" + TestXMLUtil.STATED_PUBLIC_ID + "\"\n" +
+ " \"" + TestXMLUtil.STATED_SYSTEM_ID + "\"\n" +
+ ">\n" +
+ "<person>\n" +
+ " <name>\n" +
+ " <first_name>Alan</first_name>\n" +
+ " <last_name>Turing</last_name>\n" +
+ " </name>\n" +
+ " <profession>computer scientist</profession>\n" +
+ " <profession>mathematician</profession>\n" +
+ " <profession>cryptographer</profession>\n" +
+ "</person>\n";
+
+ /** The test DTD. */
+ private static final String DTD_DOCUMENT =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ " <!ELEMENT person (name, profession*)>\n" +
+ " <!ELEMENT name (first_name, last_name)>\n" +
+ " <!ELEMENT first_name (#PCDATA)>\n" +
+ " <!ELEMENT last_name (#PCDATA)>\n" +
+ " <!ELEMENT profession (#PCDATA)>\n";
+
+ /**
+ * Test the method {@link DomUtil#streamToDom(java.io.InputStream, org.w3c.dom.ls.LSResourceResolver)} by parsing
+ * a file and testing the results.
+ * @throws IOException For errors obtaining an instance of the DOM Implementation registry.
+ */
+ @Test
+ public void parseWithoutDtdShouldFail() throws IOException {
+ final InputStream xmlDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.XML_DOCUMENT.getBytes());
+ try {
+ DomUtil.streamToDom(xmlDocumentInputStream, null);
+ fail("Should have failed");
+ } catch (final LSException e) {
+ /* Do nothing. This is the expected case. */
+ }
+ }
+
+ /**
+ * Test the method {@link DomUtil#streamToDom(java.io.InputStream, org.w3c.dom.ls.LSResourceResolver)} by parsing
+ * a file and testing the results.
+ * @throws IOException For errors getting the local sandbox.
+ */
+ @Test
+ public void parseWithDtdShouldWork() throws IOException {
+ final InputStream xmlDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.XML_DOCUMENT.getBytes());
+ final InputStream dtdDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.DTD_DOCUMENT.getBytes());
+ final LSResourceResolver resourceResolver = new LSResourceResolver() {
+ public LSInput resolveResource(final String type, final String namespaceURI, final String publicId,
+ final String systemId, final String baseURI) {
+ if (TestXMLUtil.STATED_PUBLIC_ID.equals(publicId)) {
+ return DomUtil.createLSInput(dtdDocumentInputStream, TestXMLUtil.STATED_PUBLIC_ID,
+ TestXMLUtil.STATED_SYSTEM_ID);
+ }
+ return null;
+ }
+ };
+ final Document document = DomUtil.streamToDom(xmlDocumentInputStream, resourceResolver);
+ assertNotNull(document);
+
+ /* The document itself has two children, the document type, and the
+ * root element. */
+ NodeList nodeList = document.getChildNodes();
+ assertEquals(2, nodeList.getLength());
+ /* The first node is the document type node. */
+ assertEquals(Node.DOCUMENT_TYPE_NODE, nodeList.item(0).getNodeType());
+
+ /* The second node is the root element. */
+ Node node = nodeList.item(1);
+ assertEquals(Node.ELEMENT_NODE, node.getNodeType());
+ assertEquals("person", node.getLocalName());
+
+ nodeList = node.getChildNodes();
+ assertEquals(9, nodeList.getLength());
+ /* The first child is ignorable whitespace. */
+ assertEquals(Node.TEXT_NODE, nodeList.item(0).getNodeType());
+ /* The second child is the name element. */
+ assertEquals(Node.ELEMENT_NODE, nodeList.item(1).getNodeType());
+ assertEquals("name", nodeList.item(1).getLocalName());
+ /* The third child is ignorable whitespace. */
+ assertEquals(Node.TEXT_NODE, nodeList.item(2).getNodeType());
+ node = nodeList.item(1);
+
+ /* It is certainly possible to test this DOM document more extensively, but this is enough to show that it was
+ * parsed. */
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-21 18:35:08
|
Revision: 11040
http://foray.svn.sourceforge.net/foray/?rev=11040&view=rev
Author: victormote
Date: 2010-08-21 18:35:01 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Move some MathML-specific code to the graphic module.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/MathMLUtil.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/MathMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/MathMLUtil.java 2010-08-21 17:54:01 UTC (rev 11039)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/MathMLUtil.java 2010-08-21 18:35:01 UTC (rev 11040)
@@ -28,13 +28,6 @@
package org.foray.common;
-import org.w3c.dom.ls.DOMImplementationLS;
-import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSResourceResolver;
-
-import java.io.IOException;
-import java.io.InputStream;
-
/**
* Utilities related to the Math Markup Language (MathML).
*/
@@ -60,54 +53,4 @@
*/
private MathMLUtil() { }
- /**
- * Returns a MathML DTD component as an InputStream.
- * @param fileName The name of the file to be retrieved.
- * @return A MathML DTD component as an InputStream.
- */
- public static InputStream getMathMLDtdAsInputStream(final String fileName) {
- final InputStream theStream = MathMLUtil.class.getResourceAsStream("/mathml2/" + fileName);
- return theStream;
- }
-
- /**
- * Returns the MathML DTD as an LSInput instance.
- * @param fileName The name of the file to be retrieved.
- * @return The MathML DTD as an LSInput instance.
- */
- public static LSInput getMathMLDtdAsLsInputStream(final String fileName) {
- final InputStream theStream = MathMLUtil.getMathMLDtdAsInputStream(fileName);
- DOMImplementationLS implementation;
- try {
- implementation = XMLUtil.getDOMImplementation();
- } catch (final IOException e) {
- return null;
- }
- final LSInput input = implementation.createLSInput();
- input.setByteStream(theStream);
- input.setPublicId(MathMLUtil.MATHML_PUBLIC_ID);
- input.setSystemId(MathMLUtil.MATHML_SYSTEM_ID);
- return input;
- }
-
- /**
- * Returns an LSResourceResolver that knows how to find the local copy of the MathML DTD.
- * @return An LSResourceResolver that knows how to find the local copy of the MathML DTD.
- */
- public static LSResourceResolver getMathMLDtdResourceResolver() {
- final LSResourceResolver resolver = new LSResourceResolver() {
- public LSInput resolveResource(final String type, final String namespaceURI, final String publicId,
- final String systemId, final String baseURI) {
- if (MathMLUtil.MATHML_PUBLIC_ID.equals(publicId)) {
- return MathMLUtil.getMathMLDtdAsLsInputStream("mathml2.dtd");
- }
- if (MathMLUtil.MATHML_SYSTEM_ID.equals(baseURI)) {
- return MathMLUtil.getMathMLDtdAsLsInputStream(systemId);
- }
- return null;
- }
- };
- return resolver;
- }
-
}
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2010-08-21 17:54:01 UTC (rev 11039)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2010-08-21 18:35:01 UTC (rev 11040)
@@ -36,11 +36,14 @@
import org.axsl.graphic.GraphicException;
import org.w3c.dom.Document;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver;
import org.w3c.dom.svg.SVGDocument;
import java.io.BufferedInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
/**
@@ -77,7 +80,7 @@
}
/* Convert the URL to a generic DOM document instance. */
- final LSResourceResolver resourceResolver = MathMLUtil.getMathMLDtdResourceResolver();
+ final LSResourceResolver resourceResolver = MathFactory.getMathMLDtdResourceResolver();
final Document dom = XMLUtil.streamToDom(url.openStream(), resourceResolver);
/* Convert the generic DOM to an SVGDocument (DOM/SVG Document), using
@@ -93,4 +96,54 @@
return new SVGGraphic(this.getServer(), svgDocument);
}
+ /**
+ * Returns a MathML DTD component as an InputStream.
+ * @param fileName The name of the file to be retrieved.
+ * @return A MathML DTD component as an InputStream.
+ */
+ public static InputStream getMathMLDtdAsInputStream(final String fileName) {
+ final InputStream theStream = MathMLUtil.class.getResourceAsStream("/mathml2/" + fileName);
+ return theStream;
+ }
+
+ /**
+ * Returns the MathML DTD as an LSInput instance.
+ * @param fileName The name of the file to be retrieved.
+ * @return The MathML DTD as an LSInput instance.
+ */
+ public static LSInput getMathMLDtdAsLsInputStream(final String fileName) {
+ final InputStream theStream = MathFactory.getMathMLDtdAsInputStream(fileName);
+ DOMImplementationLS implementation;
+ try {
+ implementation = XMLUtil.getDOMImplementation();
+ } catch (final IOException e) {
+ return null;
+ }
+ final LSInput input = implementation.createLSInput();
+ input.setByteStream(theStream);
+ input.setPublicId(MathMLUtil.MATHML_PUBLIC_ID);
+ input.setSystemId(MathMLUtil.MATHML_SYSTEM_ID);
+ return input;
+ }
+
+ /**
+ * Returns an LSResourceResolver that knows how to find the local copy of the MathML DTD.
+ * @return An LSResourceResolver that knows how to find the local copy of the MathML DTD.
+ */
+ public static LSResourceResolver getMathMLDtdResourceResolver() {
+ final LSResourceResolver resolver = new LSResourceResolver() {
+ public LSInput resolveResource(final String type, final String namespaceURI, final String publicId,
+ final String systemId, final String baseURI) {
+ if (MathMLUtil.MATHML_PUBLIC_ID.equals(publicId)) {
+ return MathFactory.getMathMLDtdAsLsInputStream("mathml2.dtd");
+ }
+ if (MathMLUtil.MATHML_SYSTEM_ID.equals(baseURI)) {
+ return MathFactory.getMathMLDtdAsLsInputStream(systemId);
+ }
+ return null;
+ }
+ };
+ return resolver;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-21 17:54:07
|
Revision: 11039
http://foray.svn.sourceforge.net/foray/?rev=11039&view=rev
Author: victormote
Date: 2010-08-21 17:54:01 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
1. Remove some unnecessary transitive dependencies by upgrading to commons-logging 1.1.1.
2. Add back the now explicit dependency on the servlet-api to foray-app.
Modified Paths:
--------------
trunk/foray/foray-all/pom.xml
trunk/foray/foray-app/pom.xml
Modified: trunk/foray/foray-all/pom.xml
===================================================================
--- trunk/foray/foray-all/pom.xml 2010-08-21 04:06:11 UTC (rev 11038)
+++ trunk/foray/foray-all/pom.xml 2010-08-21 17:54:01 UTC (rev 11039)
@@ -34,11 +34,20 @@
<scope>test</scope>
</dependency>
+ <!-- J2EE stuff -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+
<!-- Apache Commons. -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.1</version>
+ <version>1.1.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Modified: trunk/foray/foray-app/pom.xml
===================================================================
--- trunk/foray/foray-app/pom.xml 2010-08-21 04:06:11 UTC (rev 11038)
+++ trunk/foray/foray-app/pom.xml 2010-08-21 17:54:01 UTC (rev 11039)
@@ -26,6 +26,13 @@
</dependency>
<dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<type>jar</type>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-21 04:06:17
|
Revision: 11038
http://foray.svn.sourceforge.net/foray/?rev=11038&view=rev
Author: victormote
Date: 2010-08-21 04:06:11 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Remove no-longer-needed dependency on xerces.
Modified Paths:
--------------
trunk/foray/foray-common/pom.xml
Modified: trunk/foray/foray-common/pom.xml
===================================================================
--- trunk/foray/foray-common/pom.xml 2010-08-21 03:17:15 UTC (rev 11037)
+++ trunk/foray/foray-common/pom.xml 2010-08-21 04:06:11 UTC (rev 11038)
@@ -43,12 +43,6 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<type>jar</type>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-21 03:17:21
|
Revision: 11037
http://foray.svn.sourceforge.net/foray/?rev=11037&view=rev
Author: victormote
Date: 2010-08-21 03:17:15 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Convert some dependencies on Xerces to dependencies on xml-resolver instead.
Modified Paths:
--------------
trunk/foray/foray-common/pom.xml
trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java
Modified: trunk/foray/foray-common/pom.xml
===================================================================
--- trunk/foray/foray-common/pom.xml 2010-08-21 03:06:03 UTC (rev 11036)
+++ trunk/foray/foray-common/pom.xml 2010-08-21 03:17:15 UTC (rev 11037)
@@ -60,6 +60,12 @@
<type>jar</type>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>xml-resolver</groupId>
+ <artifactId>xml-resolver</artifactId>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
<build>
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java 2010-08-21 03:06:03 UTC (rev 11036)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java 2010-08-21 03:17:15 UTC (rev 11037)
@@ -28,7 +28,8 @@
package org.foray.common;
-import org.apache.xerces.util.XMLCatalogResolver;
+import org.apache.xml.resolver.CatalogManager;
+import org.apache.xml.resolver.tools.CatalogResolver;
import org.w3c.dom.DOMConfiguration;
import org.w3c.dom.Document;
@@ -37,9 +38,7 @@
import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSParser;
import org.w3c.dom.ls.LSResourceResolver;
-import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
import java.io.IOException;
import java.io.InputStream;
@@ -222,13 +221,25 @@
* @param catalogs The array of URIs indicating where the XML catalogs are located.
* @return The created EntityResolver.
*/
- public static EntityResolver getEntityResolver(final String[] catalogs) {
- if (catalogs == null) {
+ public static CatalogResolver getEntityResolver(final String[] catalogs) {
+ if (catalogs == null
+ || catalogs.length < 1) {
return null;
}
- final XMLCatalogResolver resolver = new XMLCatalogResolver();
- resolver.setPreferPublic(true);
- resolver.setCatalogList(catalogs);
+ final CatalogManager manager = new CatalogManager();
+ manager.setPreferPublic(true);
+ /* Unless we ignore missing properties, the CatalogManager will insist on a CatalogManager.properties file, the
+ * default way of configuring it. */
+ manager.setIgnoreMissingProperties(true);
+ final StringBuilder fileListString = new StringBuilder();
+ for (int i = 0; i < catalogs.length; i++) {
+ fileListString.append(catalogs[i]);
+ if (i < (catalogs.length - 1)) {
+ fileListString.append(";");
+ }
+ }
+ manager.setCatalogFiles(fileListString.toString());
+ final CatalogResolver resolver = new CatalogResolver(manager);
return resolver;
}
@@ -238,19 +249,12 @@
* @return The created EntityResolver.
*/
public static XMLResolver getXMLResolver(final String[] catalogs) {
- final XMLCatalogResolver catalogResolver = new XMLCatalogResolver();
- catalogResolver.setCatalogList(catalogs);
+ final CatalogResolver catalogResolver = XMLUtil.getEntityResolver(catalogs);
final XMLResolver resolver = new XMLResolver() {
public Object resolveEntity(final String publicID, final String systemID, final String baseURI,
final String namespace) throws XMLStreamException {
- try {
- final InputSource inputSource = catalogResolver.resolveEntity(publicID, systemID);
- return inputSource.getByteStream();
- } catch (final SAXException e) {
- throw new XMLStreamException(e);
- } catch (final IOException e) {
- throw new XMLStreamException(e);
- }
+ final InputSource inputSource = catalogResolver.resolveEntity(publicID, systemID);
+ return inputSource.getByteStream();
}
};
return resolver;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-21 03:06:09
|
Revision: 11036
http://foray.svn.sourceforge.net/foray/?rev=11036&view=rev
Author: victormote
Date: 2010-08-21 03:06:03 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Improve error messages.
Modified Paths:
--------------
trunk/foray/foray-xml/src/main/java/org/foray/xml/FOrayPretty.java
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/FOrayPretty.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/FOrayPretty.java 2010-08-21 01:20:12 UTC (rev 11035)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/FOrayPretty.java 2010-08-21 03:06:03 UTC (rev 11036)
@@ -1289,7 +1289,7 @@
fis = new FileInputStream(input);
inputStream = new BufferedInputStream(fis);
} catch (final FileNotFoundException e) {
- System.err.println("File not found: " + input);
+ System.err.println("File cannot be opened for input: " + input);
System.exit(FOrayPretty.STATUS_FILE_NOT_FOUND);
}
final InputSource inputSource = new InputSource(inputStream);
@@ -1298,7 +1298,7 @@
final FileOutputStream fos = new FileOutputStream(output);
outputStream = new BufferedOutputStream(fos);
} catch (final FileNotFoundException e1) {
- System.err.println("File not found: " + output);
+ System.err.println("File cannot be opened for output: " + output);
System.exit(FOrayPretty.STATUS_FILE_NOT_FOUND);
}
final FOrayPretty processor = new FOrayPretty(inputSource, outputStream,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-21 01:20:20
|
Revision: 11035
http://foray.svn.sourceforge.net/foray/?rev=11035&view=rev
Author: victormote
Date: 2010-08-21 01:20:12 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Remove some unnecessary dependencies on JEuclid.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java 2010-08-17 14:51:14 UTC (rev 11034)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java 2010-08-21 01:20:12 UTC (rev 11035)
@@ -30,10 +30,9 @@
import net.sourceforge.jeuclid.DOMBuilder;
import net.sourceforge.jeuclid.MathBase;
-import net.sourceforge.jeuclid.elements.AbstractJEuclidElement;
-import net.sourceforge.jeuclid.elements.generic.MathImpl;
import org.foray.common.Logging;
+import org.foray.common.MathMLUtil;
import org.foray.common.SvgUtil;
import org.foray.common.sax.SaxParser;
import org.foray.common.url.URLUtil;
@@ -436,13 +435,12 @@
throws GraphicException {
/* Do some basic validation of the DOM document. */
final Element rootElement = dom.getDocumentElement();
- if (! AbstractJEuclidElement.URI.equals(
- rootElement.getNamespaceURI())) {
+ if (! MathMLUtil.MATHML_NAMESPACE.equals(rootElement.getNamespaceURI())) {
throw new GraphicException("Document is not in the MathML "
+ "namespace");
}
final String rootElementName = rootElement.getLocalName();
- if (! MathImpl.ELEMENT.equals(rootElementName)) {
+ if (! MathMLUtil.MATHML_ROOT_ELEMENT_NAME.equals(rootElementName)) {
throw new GraphicException("Expected root element <math> for "
+ "MathML document, but was: " + rootElementName);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-17 14:51:20
|
Revision: 11034
http://foray.svn.sourceforge.net/foray/?rev=11034&view=rev
Author: victormote
Date: 2010-08-17 14:51:14 +0000 (Tue, 17 Aug 2010)
Log Message:
-----------
Upgrade oss-parent to version 4.
Modified Paths:
--------------
trunk/foray/foray-all/pom.xml
Modified: trunk/foray/foray-all/pom.xml
===================================================================
--- trunk/foray/foray-all/pom.xml 2010-08-16 14:57:52 UTC (rev 11033)
+++ trunk/foray/foray-all/pom.xml 2010-08-17 14:51:14 UTC (rev 11034)
@@ -19,7 +19,7 @@
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
- <version>3</version>
+ <version>4</version>
</parent>
<dependencyManagement>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-16 14:57:59
|
Revision: 11033
http://foray.svn.sourceforge.net/foray/?rev=11033&view=rev
Author: victormote
Date: 2010-08-16 14:57:52 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
1. Change test so that it does not need to hit the internet.
2. Add line-endings to document and dtd.
3. Fix element count due to whitespace changes.
Modified Paths:
--------------
trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-16 04:30:15 UTC (rev 11032)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-16 14:57:52 UTC (rev 11033)
@@ -55,32 +55,33 @@
private static final String STATED_PUBLIC_ID = "Totally Bogus DTD";
/** The DTD system ID. */
- private static final String STATED_SYSTEM_ID = "http://www.foray.org/dtds/0.1/en/TotallyBogus.dtd";
+ private static final String STATED_SYSTEM_ID = "file:/u/xyz/abc/totally-bogus.dtd";
/** The test document. */
private static final String XML_DOCUMENT =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
- "<!DOCTYPE Book" +
- " PUBLIC \"" + TestXMLUtil.STATED_PUBLIC_ID + "\"" +
- " \"" + TestXMLUtil.STATED_SYSTEM_ID + "\">" +
- "<person>" +
- " <name>" +
- " <first_name>Alan</first_name>" +
- " <last_name>Turing</last_name>" +
- " </name>" +
- " <profession>computer scientist</profession>" +
- " <profession>mathematician</profession>" +
- " <profession>cryptographer</profession>" +
- "</person>";
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<!DOCTYPE Book\n" +
+ " PUBLIC \"" + TestXMLUtil.STATED_PUBLIC_ID + "\"\n" +
+ " \"" + TestXMLUtil.STATED_SYSTEM_ID + "\"\n" +
+ ">\n" +
+ "<person>\n" +
+ " <name>\n" +
+ " <first_name>Alan</first_name>\n" +
+ " <last_name>Turing</last_name>\n" +
+ " </name>\n" +
+ " <profession>computer scientist</profession>\n" +
+ " <profession>mathematician</profession>\n" +
+ " <profession>cryptographer</profession>\n" +
+ "</person>\n";
/** The test DTD. */
private static final String DTD_DOCUMENT =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
- " <!ELEMENT person (name, profession*)>" +
- " <!ELEMENT name (first_name, last_name)>" +
- " <!ELEMENT first_name (#PCDATA)>" +
- " <!ELEMENT last_name (#PCDATA)>" +
- " <!ELEMENT profession (#PCDATA)>";
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ " <!ELEMENT person (name, profession*)>\n" +
+ " <!ELEMENT name (first_name, last_name)>\n" +
+ " <!ELEMENT first_name (#PCDATA)>\n" +
+ " <!ELEMENT last_name (#PCDATA)>\n" +
+ " <!ELEMENT profession (#PCDATA)>\n";
/**
* Test the method {@link XMLUtil#streamToDom(java.io.InputStream, org.w3c.dom.ls.LSResourceResolver)} by parsing
@@ -104,7 +105,7 @@
* @throws IOException For errors getting the local sandbox.
*/
@Test
- public void testUrlToDom() throws IOException {
+ public void parseWithDtdShouldWork() throws IOException {
final InputStream xmlDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.XML_DOCUMENT.getBytes());
final InputStream dtdDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.DTD_DOCUMENT.getBytes());
final LSResourceResolver resourceResolver = new LSResourceResolver() {
@@ -133,7 +134,7 @@
assertEquals("person", node.getLocalName());
nodeList = node.getChildNodes();
- assertEquals(8, nodeList.getLength());
+ assertEquals(9, nodeList.getLength());
/* The first child is ignorable whitespace. */
assertEquals(Node.TEXT_NODE, nodeList.item(0).getNodeType());
/* The second child is the name element. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-16 04:30:22
|
Revision: 11032
http://foray.svn.sourceforge.net/foray/?rev=11032&view=rev
Author: victormote
Date: 2010-08-16 04:30:15 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
1. Rename method for clarity.
2. Add test for the failure case.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java
trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java 2010-08-16 04:00:23 UTC (rev 11031)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java 2010-08-16 04:30:15 UTC (rev 11032)
@@ -31,11 +31,9 @@
import org.apache.xerces.util.XMLCatalogResolver;
import org.w3c.dom.DOMConfiguration;
-import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.bootstrap.DOMImplementationRegistry;
import org.w3c.dom.ls.DOMImplementationLS;
-import org.w3c.dom.ls.LSException;
import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSParser;
import org.w3c.dom.ls.LSResourceResolver;
@@ -181,7 +179,7 @@
* @return The DOM document.
* @throws IOException For errors parsing the document.
*/
- public static Document urlToDom(final InputStream inputStream, final LSResourceResolver resourceResolver)
+ public static Document streamToDom(final InputStream inputStream, final LSResourceResolver resourceResolver)
throws IOException {
final DOMImplementationLS impl = XMLUtil.getDOMImplementation();
final LSParser builder = impl.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null);
@@ -194,14 +192,7 @@
final LSInput lsInput = impl.createLSInput();
lsInput.setByteStream(inputStream);
- Document document = null;
- try {
- document = builder.parse(lsInput);
- } catch (final DOMException e) {
- throw new IOException(e.getMessage());
- } catch (final LSException e) {
- throw new IOException(e.getMessage());
- }
+ final Document document = builder.parse(lsInput);
return document;
}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-16 04:00:23 UTC (rev 11031)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-16 04:30:15 UTC (rev 11032)
@@ -28,9 +28,15 @@
package org.foray.common;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+import org.w3c.dom.ls.LSException;
import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver;
@@ -38,12 +44,10 @@
import java.io.IOException;
import java.io.InputStream;
-import junit.framework.TestCase;
-
/**
* JUnit test class for the class {@link XMLUtil}.
*/
-public class TestXMLUtil extends TestCase {
+public class TestXMLUtil {
/* Example document and DTD liberated from O'Reilly's "XML in a Nutshell", 3rd Edition, p. 30. */
@@ -79,10 +83,27 @@
" <!ELEMENT profession (#PCDATA)>";
/**
- * Test the method {@link XMLUtil#urlToDom(java.io.InputStream, org.w3c.dom.ls.LSResourceResolver)} by parsing
+ * Test the method {@link XMLUtil#streamToDom(java.io.InputStream, org.w3c.dom.ls.LSResourceResolver)} by parsing
* a file and testing the results.
+ * @throws IOException For errors obtaining an instance of the DOM Implementation registry.
+ */
+ @Test
+ public void parseWithoutDtdShouldFail() throws IOException {
+ final InputStream xmlDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.XML_DOCUMENT.getBytes());
+ try {
+ XMLUtil.streamToDom(xmlDocumentInputStream, null);
+ fail("Should have failed");
+ } catch (final LSException e) {
+ /* Do nothing. This is the expected case. */
+ }
+ }
+
+ /**
+ * Test the method {@link XMLUtil#streamToDom(java.io.InputStream, org.w3c.dom.ls.LSResourceResolver)} by parsing
+ * a file and testing the results.
* @throws IOException For errors getting the local sandbox.
*/
+ @Test
public void testUrlToDom() throws IOException {
final InputStream xmlDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.XML_DOCUMENT.getBytes());
final InputStream dtdDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.DTD_DOCUMENT.getBytes());
@@ -96,7 +117,7 @@
return null;
}
};
- final Document document = XMLUtil.urlToDom(xmlDocumentInputStream, resourceResolver);
+ final Document document = XMLUtil.streamToDom(xmlDocumentInputStream, resourceResolver);
assertNotNull(document);
/* The document itself has two children, the document type, and the
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2010-08-16 04:00:23 UTC (rev 11031)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2010-08-16 04:30:15 UTC (rev 11032)
@@ -78,7 +78,7 @@
/* Convert the URL to a generic DOM document instance. */
final LSResourceResolver resourceResolver = MathMLUtil.getMathMLDtdResourceResolver();
- final Document dom = XMLUtil.urlToDom(url.openStream(), resourceResolver);
+ final Document dom = XMLUtil.streamToDom(url.openStream(), resourceResolver);
/* Convert the generic DOM to an SVGDocument (DOM/SVG Document), using
* JEuclid. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-16 04:00:36
|
Revision: 11031
http://foray.svn.sourceforge.net/foray/?rev=11031&view=rev
Author: victormote
Date: 2010-08-16 04:00:23 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
Remove no-longer-needed classes for building the test suites for each module.
Removed Paths:
-------------
trunk/foray/foray-app/src/test/java/org/foray/app/TestFOrayApp.java
trunk/foray/foray-areatree/src/test/java/org/foray/area/TestFOrayAreaTree.java
trunk/foray/foray-common/src/test/java/org/foray/common/TestFOrayCommon.java
trunk/foray/foray-font/src/test/java/org/foray/font/TestFOrayFont.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/TestFOrayFOTree.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestFOrayGraphic.java
trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestFOrayHyphen.java
trunk/foray/foray-ps/src/test/java/org/foray/ps/TestFOrayPS.java
trunk/foray/foray-render/src/test/java/org/foray/render/TestFOrayRender.java
Deleted: trunk/foray/foray-app/src/test/java/org/foray/app/TestFOrayApp.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/TestFOrayApp.java 2010-08-16 03:53:05 UTC (rev 11030)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/TestFOrayApp.java 2010-08-16 04:00:23 UTC (rev 11031)
@@ -1,76 +0,0 @@
-/*
- * Copyright 2007 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.app;
-
-import org.foray.app.area.TestBlock;
-import org.foray.app.area.TestBorder;
-import org.foray.app.area.TestGraphicArea;
-import org.foray.app.area.TestInline;
-import org.foray.app.area.TestMetadata;
-import org.foray.app.area.TestVertical;
-import org.foray.app.fo.TestFont;
-import org.foray.app.fo.TestGraphic;
-import org.foray.app.fo.TestInvalidXml;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Handles testing for the FOrayApp module.
- */
-public class TestFOrayApp extends TestCase {
-
- /**
- * Builds a test suite for all classes in this module.
- * @return The built test suite.
- */
- public static Test suite() {
- final TestSuite testSuite = new TestSuite("The FOray Application");
-
- /* FO Tree tests. */
- testSuite.addTestSuite(TestInvalidXml.class);
- testSuite.addTestSuite(TestFont.class);
- testSuite.addTestSuite(TestGraphic.class);
-
- /* Area Tree tests. */
- testSuite.addTestSuite(TestBorder.class);
- testSuite.addTestSuite(TestBlock.class);
- testSuite.addTestSuite(TestInline.class);
- testSuite.addTestSuite(TestMetadata.class);
- testSuite.addTestSuite(TestGraphicArea.class);
- testSuite.addTestSuite(TestVertical.class);
-
- /* Tests of classes in this project. */
- testSuite.addTestSuite(TestFOray.class);
-
- return testSuite;
- }
-
-}
Deleted: trunk/foray/foray-areatree/src/test/java/org/foray/area/TestFOrayAreaTree.java
===================================================================
--- trunk/foray/foray-areatree/src/test/java/org/foray/area/TestFOrayAreaTree.java 2010-08-16 03:53:05 UTC (rev 11030)
+++ trunk/foray/foray-areatree/src/test/java/org/foray/area/TestFOrayAreaTree.java 2010-08-16 04:00:23 UTC (rev 11031)
@@ -1,52 +0,0 @@
-/*
- * Copyright 2007 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.area;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Handles testing for the FOrayAreaTree module.
- */
-public class TestFOrayAreaTree extends TestCase {
-
- /**
- * Builds a test suite for all classes in this module.
- * @return The built test suite.
- */
- public static Test suite() {
- final TestSuite testSuite = new TestSuite("FOray Area Tree");
-
- testSuite.addTestSuite(TestPageCollection.class);
-
- return testSuite;
- }
-
-}
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/TestFOrayCommon.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestFOrayCommon.java 2010-08-16 03:53:05 UTC (rev 11030)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestFOrayCommon.java 2010-08-16 04:00:23 UTC (rev 11031)
@@ -1,51 +0,0 @@
-/*
- * 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.common;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-import junit.framework.TestCase;
-
-/**
- * Handles testing for the FOrayCommon module.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- TestBit.class,
- TestByteVectorPacked.class,
- TestCharVector.class,
- TestStringUtil.class,
- TestTernaryTreeMap.class,
- TestUnicodeChar.class,
- TestXMLUtil.class
-})
-public class TestFOrayCommon extends TestCase {
-
-}
Deleted: trunk/foray/foray-font/src/test/java/org/foray/font/TestFOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/test/java/org/foray/font/TestFOrayFont.java 2010-08-16 03:53:05 UTC (rev 11030)
+++ trunk/foray/foray-font/src/test/java/org/foray/font/TestFOrayFont.java 2010-08-16 04:00:23 UTC (rev 11031)
@@ -1,57 +0,0 @@
-/*
- * 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.font;
-
-import org.foray.font.format.TestType1PfbFile;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Handles testing for the FOrayFont module.
- */
-public class TestFOrayFont extends TestCase {
-
- /**
- * Builds a test suite for all classes in this module.
- * @return The built test suite.
- */
- public static Test suite() {
- final TestSuite testSuite = new TestSuite("FOray Font");
-
- testSuite.addTestSuite(TestFontServer4a.class);
- testSuite.addTestSuite(TestFont4a.class);
-
- testSuite.addTestSuite(TestType1PfbFile.class);
-
- return testSuite;
- }
-
-}
Deleted: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/TestFOrayFOTree.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/TestFOrayFOTree.java 2010-08-16 03:53:05 UTC (rev 11030)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/TestFOrayFOTree.java 2010-08-16 04:00:23 UTC (rev 11031)
@@ -1,637 +0,0 @@
-/*
- * 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.prop.TestAbsolutePosition;
-import org.foray.fotree.fo.prop.TestActiveState;
-import org.foray.fotree.fo.prop.TestAlignmentAdjust;
-import org.foray.fotree.fo.prop.TestAlignmentBaseline;
-import org.foray.fotree.fo.prop.TestAllowedHeightScale;
-import org.foray.fotree.fo.prop.TestAllowedWidthScale;
-import org.foray.fotree.fo.prop.TestAutoRestore;
-import org.foray.fotree.fo.prop.TestAzimuth;
-import org.foray.fotree.fo.prop.TestBackground;
-import org.foray.fotree.fo.prop.TestBackgroundAttachment;
-import org.foray.fotree.fo.prop.TestBackgroundColor;
-import org.foray.fotree.fo.prop.TestBackgroundImage;
-import org.foray.fotree.fo.prop.TestBackgroundPosition;
-import org.foray.fotree.fo.prop.TestBackgroundPositionHorizontal;
-import org.foray.fotree.fo.prop.TestBackgroundPositionVertical;
-import org.foray.fotree.fo.prop.TestBackgroundRepeat;
-import org.foray.fotree.fo.prop.TestBaselineShift;
-import org.foray.fotree.fo.prop.TestBlankOrNotBlank;
-import org.foray.fotree.fo.prop.TestBlockProgressionDimension;
-import org.foray.fotree.fo.prop.TestBorder;
-import org.foray.fotree.fo.prop.TestBorderAfterColor;
-import org.foray.fotree.fo.prop.TestBorderAfterPrecedence;
-import org.foray.fotree.fo.prop.TestBorderAfterStyle;
-import org.foray.fotree.fo.prop.TestBorderAfterWidth;
-import org.foray.fotree.fo.prop.TestBorderBeforeColor;
-import org.foray.fotree.fo.prop.TestBorderBeforePrecedence;
-import org.foray.fotree.fo.prop.TestBorderBeforeStyle;
-import org.foray.fotree.fo.prop.TestBorderBeforeWidth;
-import org.foray.fotree.fo.prop.TestBorderBottom;
-import org.foray.fotree.fo.prop.TestBorderBottomColor;
-import org.foray.fotree.fo.prop.TestBorderBottomStyle;
-import org.foray.fotree.fo.prop.TestBorderBottomWidth;
-import org.foray.fotree.fo.prop.TestBorderCollapse;
-import org.foray.fotree.fo.prop.TestBorderColor;
-import org.foray.fotree.fo.prop.TestBorderEndColor;
-import org.foray.fotree.fo.prop.TestBorderEndPrecedence;
-import org.foray.fotree.fo.prop.TestBorderEndStyle;
-import org.foray.fotree.fo.prop.TestBorderEndWidth;
-import org.foray.fotree.fo.prop.TestBorderLeft;
-import org.foray.fotree.fo.prop.TestBorderLeftColor;
-import org.foray.fotree.fo.prop.TestBorderLeftStyle;
-import org.foray.fotree.fo.prop.TestBorderLeftWidth;
-import org.foray.fotree.fo.prop.TestBorderRight;
-import org.foray.fotree.fo.prop.TestBorderRightColor;
-import org.foray.fotree.fo.prop.TestBorderRightStyle;
-import org.foray.fotree.fo.prop.TestBorderRightWidth;
-import org.foray.fotree.fo.prop.TestBorderSeparation;
-import org.foray.fotree.fo.prop.TestBorderSpacing;
-import org.foray.fotree.fo.prop.TestBorderStartColor;
-import org.foray.fotree.fo.prop.TestBorderStartPrecedence;
-import org.foray.fotree.fo.prop.TestBorderStartStyle;
-import org.foray.fotree.fo.prop.TestBorderStartWidth;
-import org.foray.fotree.fo.prop.TestBorderStyle;
-import org.foray.fotree.fo.prop.TestBorderTop;
-import org.foray.fotree.fo.prop.TestBorderTopColor;
-import org.foray.fotree.fo.prop.TestBorderTopStyle;
-import org.foray.fotree.fo.prop.TestBorderTopWidth;
-import org.foray.fotree.fo.prop.TestBorderWidth;
-import org.foray.fotree.fo.prop.TestBottom;
-import org.foray.fotree.fo.prop.TestBreakAfter;
-import org.foray.fotree.fo.prop.TestBreakBefore;
-import org.foray.fotree.fo.prop.TestCaptionSide;
-import org.foray.fotree.fo.prop.TestCaseName;
-import org.foray.fotree.fo.prop.TestCaseTitle;
-import org.foray.fotree.fo.prop.TestChangeBarClass;
-import org.foray.fotree.fo.prop.TestChangeBarColor;
-import org.foray.fotree.fo.prop.TestChangeBarOffset;
-import org.foray.fotree.fo.prop.TestChangeBarPlacement;
-import org.foray.fotree.fo.prop.TestChangeBarStyle;
-import org.foray.fotree.fo.prop.TestChangeBarWidth;
-import org.foray.fotree.fo.prop.TestCharacter;
-import org.foray.fotree.fo.prop.TestClear;
-import org.foray.fotree.fo.prop.TestClip;
-import org.foray.fotree.fo.prop.TestColor;
-import org.foray.fotree.fo.prop.TestColorProfileName;
-import org.foray.fotree.fo.prop.TestColumnCount;
-import org.foray.fotree.fo.prop.TestColumnGap;
-import org.foray.fotree.fo.prop.TestColumnNumber;
-import org.foray.fotree.fo.prop.TestColumnWidth;
-import org.foray.fotree.fo.prop.TestContentHeight;
-import org.foray.fotree.fo.prop.TestContentType;
-import org.foray.fotree.fo.prop.TestContentWidth;
-import org.foray.fotree.fo.prop.TestCountry;
-import org.foray.fotree.fo.prop.TestCue;
-import org.foray.fotree.fo.prop.TestCueAfter;
-import org.foray.fotree.fo.prop.TestCueBefore;
-import org.foray.fotree.fo.prop.TestDestinationPlacementOffset;
-import org.foray.fotree.fo.prop.TestDirection;
-import org.foray.fotree.fo.prop.TestDisplayAlign;
-import org.foray.fotree.fo.prop.TestDominantBaseline;
-import org.foray.fotree.fo.prop.TestElevation;
-import org.foray.fotree.fo.prop.TestEmptyCells;
-import org.foray.fotree.fo.prop.TestEndIndent;
-import org.foray.fotree.fo.prop.TestEndsRow;
-import org.foray.fotree.fo.prop.TestExtent;
-import org.foray.fotree.fo.prop.TestExternalDestination;
-import org.foray.fotree.fo.prop.TestFloat;
-import org.foray.fotree.fo.prop.TestFlowMapName;
-import org.foray.fotree.fo.prop.TestFlowMapReference;
-import org.foray.fotree.fo.prop.TestFlowName;
-import org.foray.fotree.fo.prop.TestFlowNameReference;
-import org.foray.fotree.fo.prop.TestFont;
-import org.foray.fotree.fo.prop.TestFontFamily;
-import org.foray.fotree.fo.prop.TestFontSelectionStrategy;
-import org.foray.fotree.fo.prop.TestFontSize;
-import org.foray.fotree.fo.prop.TestFontSizeAdjust;
-import org.foray.fotree.fo.prop.TestFontStretch;
-import org.foray.fotree.fo.prop.TestFontStyle;
-import org.foray.fotree.fo.prop.TestFontVariant;
-import org.foray.fotree.fo.prop.TestFontWeight;
-import org.foray.fotree.fo.prop.TestForcePageCount;
-import org.foray.fotree.fo.prop.TestFormat;
-import org.foray.fotree.fo.prop.TestGlyphOrientationHorizontal;
-import org.foray.fotree.fo.prop.TestGlyphOrientationVertical;
-import org.foray.fotree.fo.prop.TestGroupingSeparator;
-import org.foray.fotree.fo.prop.TestGroupingSize;
-import org.foray.fotree.fo.prop.TestHeight;
-import org.foray.fotree.fo.prop.TestHyphenate;
-import org.foray.fotree.fo.prop.TestHyphenationCharacter;
-import org.foray.fotree.fo.prop.TestHyphenationKeep;
-import org.foray.fotree.fo.prop.TestHyphenationLadderCount;
-import org.foray.fotree.fo.prop.TestHyphenationPushCharacterCount;
-import org.foray.fotree.fo.prop.TestHyphenationRemainCharacterCount;
-import org.foray.fotree.fo.prop.TestId;
-import org.foray.fotree.fo.prop.TestIndexClass;
-import org.foray.fotree.fo.prop.TestIndexKey;
-import org.foray.fotree.fo.prop.TestIndicateDestination;
-import org.foray.fotree.fo.prop.TestInitialPageNumber;
-import org.foray.fotree.fo.prop.TestInlineProgressionDimension;
-import org.foray.fotree.fo.prop.TestInternalDestination;
-import org.foray.fotree.fo.prop.TestIntrinsicScaleValue;
-import org.foray.fotree.fo.prop.TestIntrusionDisplace;
-import org.foray.fotree.fo.prop.TestKeepTogether;
-import org.foray.fotree.fo.prop.TestKeepWithNext;
-import org.foray.fotree.fo.prop.TestKeepWithPrevious;
-import org.foray.fotree.fo.prop.TestLanguage;
-import org.foray.fotree.fo.prop.TestLastLineEndIndent;
-import org.foray.fotree.fo.prop.TestLeaderAlignment;
-import org.foray.fotree.fo.prop.TestLeaderLength;
-import org.foray.fotree.fo.prop.TestLeaderPattern;
-import org.foray.fotree.fo.prop.TestLeaderPatternWidth;
-import org.foray.fotree.fo.prop.TestLeft;
-import org.foray.fotree.fo.prop.TestLetterSpacing;
-import org.foray.fotree.fo.prop.TestLetterValue;
-import org.foray.fotree.fo.prop.TestLineHeight;
-import org.foray.fotree.fo.prop.TestLineHeightShiftAdjustment;
-import org.foray.fotree.fo.prop.TestLineStackingStrategy;
-import org.foray.fotree.fo.prop.TestLinefeedTreatment;
-import org.foray.fotree.fo.prop.TestMargin;
-import org.foray.fotree.fo.prop.TestMarginBottom;
-import org.foray.fotree.fo.prop.TestMarginLeft;
-import org.foray.fotree.fo.prop.TestMarginRight;
-import org.foray.fotree.fo.prop.TestMarginTop;
-import org.foray.fotree.fo.prop.TestMarkerClassName;
-import org.foray.fotree.fo.prop.TestMasterName;
-import org.foray.fotree.fo.prop.TestMasterReference;
-import org.foray.fotree.fo.prop.TestMaxHeight;
-import org.foray.fotree.fo.prop.TestMaxWidth;
-import org.foray.fotree.fo.prop.TestMaximumRepeats;
-import org.foray.fotree.fo.prop.TestMediaUsage;
-import org.foray.fotree.fo.prop.TestMergePagesAcrossIndexKeyReferences;
-import org.foray.fotree.fo.prop.TestMergeRangesAcrossIndexKeyReferences;
-import org.foray.fotree.fo.prop.TestMergeSequentialPageNumbers;
-import org.foray.fotree.fo.prop.TestMinHeight;
-import org.foray.fotree.fo.prop.TestMinWidth;
-import org.foray.fotree.fo.prop.TestNumberColumnsRepeated;
-import org.foray.fotree.fo.prop.TestNumberColumnsSpanned;
-import org.foray.fotree.fo.prop.TestNumberRowsSpanned;
-import org.foray.fotree.fo.prop.TestOddOrEven;
-import org.foray.fotree.fo.prop.TestOrphans;
-import org.foray.fotree.fo.prop.TestOverflow;
-import org.foray.fotree.fo.prop.TestPadding;
-import org.foray.fotree.fo.prop.TestPaddingAfter;
-import org.foray.fotree.fo.prop.TestPaddingBefore;
-import org.foray.fotree.fo.prop.TestPaddingBottom;
-import org.foray.fotree.fo.prop.TestPaddingEnd;
-import org.foray.fotree.fo.prop.TestPaddingLeft;
-import org.foray.fotree.fo.prop.TestPaddingRight;
-import org.foray.fotree.fo.prop.TestPaddingStart;
-import org.foray.fotree.fo.prop.TestPaddingTop;
-import org.foray.fotree.fo.prop.TestPageBreakAfter;
-import org.foray.fotree.fo.prop.TestPageBreakBefore;
-import org.foray.fotree.fo.prop.TestPageBreakInside;
-import org.foray.fotree.fo.prop.TestPageCitationStrategy;
-import org.foray.fotree.fo.prop.TestPageHeight;
-import org.foray.fotree.fo.prop.TestPageNumberTreatment;
-import org.foray.fotree.fo.prop.TestPagePosition;
-import org.foray.fotree.fo.prop.TestPageWidth;
-import org.foray.fotree.fo.prop.TestPause;
-import org.foray.fotree.fo.prop.TestPauseAfter;
-import org.foray.fotree.fo.prop.TestPauseBefore;
-import org.foray.fotree.fo.prop.TestPitch;
-import org.foray.fotree.fo.prop.TestPitchRange;
-import org.foray.fotree.fo.prop.TestPlayDuring;
-import org.foray.fotree.fo.prop.TestPosition;
-import org.foray.fotree.fo.prop.TestPrecedence;
-import org.foray.fotree.fo.prop.TestProvisionalDistanceBetweenStarts;
-import org.foray.fotree.fo.prop.TestProvisionalLabelSeparation;
-import org.foray.fotree.fo.prop.TestRefId;
-import org.foray.fotree.fo.prop.TestRefIndexKey;
-import org.foray.fotree.fo.prop.TestReferenceOrientation;
-import org.foray.fotree.fo.prop.TestRegionName;
-import org.foray.fotree.fo.prop.TestRegionNameReference;
-import org.foray.fotree.fo.prop.TestRelativeAlign;
-import org.foray.fotree.fo.prop.TestRelativePosition;
-import org.foray.fotree.fo.prop.TestRenderingIntent;
-import org.foray.fotree.fo.prop.TestRetrieveBoundary;
-import org.foray.fotree.fo.prop.TestRetrieveBoundaryWithinTable;
-import org.foray.fotree.fo.prop.TestRetrieveClassName;
-import org.foray.fotree.fo.prop.TestRetrievePosition;
-import org.foray.fotree.fo.prop.TestRetrievePositionWithinTable;
-import org.foray.fotree.fo.prop.TestRichness;
-import org.foray.fotree.fo.prop.TestRight;
-import org.foray.fotree.fo.prop.TestRole;
-import org.foray.fotree.fo.prop.TestRuleStyle;
-import org.foray.fotree.fo.prop.TestRuleThickness;
-import org.foray.fotree.fo.prop.TestScaleOption;
-import org.foray.fotree.fo.prop.TestScaling;
-import org.foray.fotree.fo.prop.TestScalingMethod;
-import org.foray.fotree.fo.prop.TestScoreSpaces;
-import org.foray.fotree.fo.prop.TestScript;
-import org.foray.fotree.fo.prop.TestShowDestination;
-import org.foray.fotree.fo.prop.TestSize;
-import org.foray.fotree.fo.prop.TestSourceDocument;
-import org.foray.fotree.fo.prop.TestSpaceAfter;
-import org.foray.fotree.fo.prop.TestSpaceBefore;
-import org.foray.fotree.fo.prop.TestSpaceEnd;
-import org.foray.fotree.fo.prop.TestSpaceStart;
-import org.foray.fotree.fo.prop.TestSpan;
-import org.foray.fotree.fo.prop.TestSpeak;
-import org.foray.fotree.fo.prop.TestSpeakHeader;
-import org.foray.fotree.fo.prop.TestSpeakNumeral;
-import org.foray.fotree.fo.prop.TestSpeakPunctuation;
-import org.foray.fotree.fo.prop.TestSpeechRate;
-import org.foray.fotree.fo.prop.TestSrc;
-import org.foray.fotree.fo.prop.TestStartIndent;
-import org.foray.fotree.fo.prop.TestStartingState;
-import org.foray.fotree.fo.prop.TestStartsRow;
-import org.foray.fotree.fo.prop.TestStress;
-import org.foray.fotree.fo.prop.TestSuppressAtLineBreak;
-import org.foray.fotree.fo.prop.TestSwitchTo;
-import org.foray.fotree.fo.prop.TestTableLayout;
-import org.foray.fotree.fo.prop.TestTableOmitFooterAtBreak;
-import org.foray.fotree.fo.prop.TestTableOmitHeaderAtBreak;
-import org.foray.fotree.fo.prop.TestTargetPresentationContext;
-import org.foray.fotree.fo.prop.TestTargetProcessingContext;
-import org.foray.fotree.fo.prop.TestTargetStylesheet;
-import org.foray.fotree.fo.prop.TestTextAlign;
-import org.foray.fotree.fo.prop.TestTextAlignLast;
-import org.foray.fotree.fo.prop.TestTextAltitude;
-import org.foray.fotree.fo.prop.TestTextDecoration;
-import org.foray.fotree.fo.prop.TestTextDepth;
-import org.foray.fotree.fo.prop.TestTextIndent;
-import org.foray.fotree.fo.prop.TestTextShadow;
-import org.foray.fotree.fo.prop.TestTextTransform;
-import org.foray.fotree.fo.prop.TestTop;
-import org.foray.fotree.fo.prop.TestTreatAsWordSpace;
-import org.foray.fotree.fo.prop.TestUnicodeBidi;
-import org.foray.fotree.fo.prop.TestVerticalAlign;
-import org.foray.fotree.fo.prop.TestVisibility;
-import org.foray.fotree.fo.prop.TestVoiceFamily;
-import org.foray.fotree.fo.prop.TestVolume;
-import org.foray.fotree.fo.prop.TestWhiteSpace;
-import org.foray.fotree.fo.prop.TestWhiteSpaceCollapse;
-import org.foray.fotree.fo.prop.TestWhiteSpaceTreatment;
-import org.foray.fotree.fo.prop.TestWidows;
-import org.foray.fotree.fo.prop.TestWidth;
-import org.foray.fotree.fo.prop.TestWordSpacing;
-import org.foray.fotree.fo.prop.TestWrapOption;
-import org.foray.fotree.fo.prop.TestWritingMode;
-import org.foray.fotree.fo.prop.TestZIndex;
-import org.foray.fotree.value.TestDtLength;
-import org.foray.fotree.value.TestFnAbs;
-import org.foray.fotree.value.TestFnBodyStart;
-import org.foray.fotree.value.TestFnCeiling;
-import org.foray.fotree.value.TestFnFloor;
-import org.foray.fotree.value.TestFnFromPageMasterRegion;
-import org.foray.fotree.value.TestFnFromParent;
-import org.foray.fotree.value.TestFnFromTableColumn;
-import org.foray.fotree.value.TestFnInheritedProp;
-import org.foray.fotree.value.TestFnLabelEnd;
-import org.foray.fotree.value.TestFnMax;
-import org.foray.fotree.value.TestFnMergePropertyValues;
-import org.foray.fotree.value.TestFnMin;
-import org.foray.fotree.value.TestFnNearestSpecProp;
-import org.foray.fotree.value.TestFnProportionalColWidth;
-import org.foray.fotree.value.TestFnRgb;
-import org.foray.fotree.value.TestFnRgbIcc;
-import org.foray.fotree.value.TestFnRound;
-import org.foray.fotree.value.TestFnSystemColor;
-import org.foray.fotree.value.TestFnSystemFont;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Handles testing for the FOrayFOTree module.
- */
-public class TestFOrayFOTree extends TestCase {
-
- /**
- * Builds a test suite for all classes in this module.
- * @return The built test suite.
- */
- public static Test suite() {
- final TestSuite testSuite = new TestSuite("FOray Fo Tree");
-
- /* Add tests of property value classes. */
- testSuite.addTestSuite(TestDtLength.class);
- testSuite.addTestSuite(TestFnAbs.class);
- testSuite.addTestSuite(TestFnBodyStart.class);
- testSuite.addTestSuite(TestFnCeiling.class);
- testSuite.addTestSuite(TestFnFloor.class);
- testSuite.addTestSuite(TestFnFromPageMasterRegion.class);
- testSuite.addTestSuite(TestFnFromParent.class);
- testSuite.addTestSuite(TestFnFromTableColumn.class);
- testSuite.addTestSuite(TestFnInheritedProp.class);
- testSuite.addTestSuite(TestFnLabelEnd.class);
- testSuite.addTestSuite(TestFnMax.class);
- testSuite.addTestSuite(TestFnMergePropertyValues.class);
- testSuite.addTestSuite(TestFnMin.class);
- testSuite.addTestSuite(TestFnNearestSpecProp.class);
- testSuite.addTestSuite(TestFnProportionalColWidth.class);
- testSuite.addTestSuite(TestFnRgb.class);
- testSuite.addTestSuite(TestFnRgbIcc.class);
- testSuite.addTestSuite(TestFnRound.class);
- testSuite.addTestSuite(TestFnSystemColor.class);
- testSuite.addTestSuite(TestFnSystemFont.class);
-
- /* Add tests of FO properties. */
- testSuite.addTestSuite(TestAbsolutePosition.class);
- testSuite.addTestSuite(TestActiveState.class);
- testSuite.addTestSuite(TestAlignmentAdjust.class);
- testSuite.addTestSuite(TestAlignmentBaseline.class);
- testSuite.addTestSuite(TestAllowedHeightScale.class);
- testSuite.addTestSuite(TestAllowedWidthScale.class);
- testSuite.addTestSuite(TestAutoRestore.class);
- testSuite.addTestSuite(TestAzimuth.class);
- testSuite.addTestSuite(TestBackground.class);
- testSuite.addTestSuite(TestBackgroundAttachment.class);
- testSuite.addTestSuite(TestBackgroundColor.class);
- testSuite.addTestSuite(TestBackgroundImage.class);
- testSuite.addTestSuite(TestBackgroundPosition.class);
- testSuite.addTestSuite(TestBackgroundPositionHorizontal.class);
- testSuite.addTestSuite(TestBackgroundPositionVertical.class);
- testSuite.addTestSuite(TestBackgroundRepeat.class);
- testSuite.addTestSuite(TestBaselineShift.class);
- testSuite.addTestSuite(TestBlankOrNotBlank.class);
- testSuite.addTestSuite(TestBlockProgressionDimension.class);
- testSuite.addTestSuite(TestBorder.class);
- testSuite.addTestSuite(TestBorderAfterColor.class);
- testSuite.addTestSuite(TestBorderAfterPrecedence.class);
- testSuite.addTestSuite(TestBorderAfterStyle.class);
- testSuite.addTestSuite(TestBorderAfterWidth.class);
- testSuite.addTestSuite(TestBorderBeforeColor.class);
- testSuite.addTestSuite(TestBorderBeforePrecedence.class);
- testSuite.addTestSuite(TestBorderBeforeStyle.class);
- testSuite.addTestSuite(TestBorderBeforeWidth.class);
- testSuite.addTestSuite(TestBorderBottom.class);
- testSuite.addTestSuite(TestBorderBottomColor.class);
- testSuite.addTestSuite(TestBorderBottomStyle.class);
- testSuite.addTestSuite(TestBorderBottomWidth.class);
- testSuite.addTestSuite(TestBorderCollapse.class);
- testSuite.addTestSuite(TestBorderColor.class);
- testSuite.addTestSuite(TestBorderEndColor.class);
- testSuite.addTestSuite(TestBorderEndPrecedence.class);
- testSuite.addTestSuite(TestBorderEndStyle.class);
- testSuite.addTestSuite(TestBorderEndWidth.class);
- testSuite.addTestSuite(TestBorderLeft.class);
- testSuite.addTestSuite(TestBorderLeftColor.class);
- testSuite.addTestSuite(TestBorderLeftStyle.class);
- testSuite.addTestSuite(TestBorderLeftWidth.class);
- testSuite.addTestSuite(TestBorderRight.class);
- testSuite.addTestSuite(TestBorderRightColor.class);
- testSuite.addTestSuite(TestBorderRightStyle.class);
- testSuite.addTestSuite(TestBorderRightWidth.class);
- testSuite.addTestSuite(TestBorderSeparation.class);
- testSuite.addTestSuite(TestBorderSpacing.class);
- testSuite.addTestSuite(TestBorderStartColor.class);
- testSuite.addTestSuite(TestBorderStartPrecedence.class);
- testSuite.addTestSuite(TestBorderStartStyle.class);
- testSuite.addTestSuite(TestBorderStartWidth.class);
- testSuite.addTestSuite(TestBorderStyle.class);
- testSuite.addTestSuite(TestBorderTop.class);
- testSuite.addTestSuite(TestBorderTopColor.class);
- testSuite.addTestSuite(TestBorderTopStyle.class);
- testSuite.addTestSuite(TestBorderTopWidth.class);
- testSuite.addTestSuite(TestBorderWidth.class);
- testSuite.addTestSuite(TestBottom.class);
- testSuite.addTestSuite(TestBreakAfter.class);
- testSuite.addTestSuite(TestBreakBefore.class);
- testSuite.addTestSuite(TestCaptionSide.class);
- testSuite.addTestSuite(TestCaseName.class);
- testSuite.addTestSuite(TestCaseTitle.class);
- testSuite.addTestSuite(TestChangeBarClass.class);
- testSuite.addTestSuite(TestChangeBarColor.class);
- testSuite.addTestSuite(TestChangeBarOffset.class);
- testSuite.addTestSuite(TestChangeBarPlacement.class);
- testSuite.addTestSuite(TestChangeBarStyle.class);
- testSuite.addTestSuite(TestChangeBarWidth.class);
- testSuite.addTestSuite(TestCharacter.class);
- testSuite.addTestSuite(TestClear.class);
- testSuite.addTestSuite(TestClip.class);
- testSuite.addTestSuite(TestColor.class);
- testSuite.addTestSuite(TestColorProfileName.class);
- testSuite.addTestSuite(TestColumnCount.class);
- testSuite.addTestSuite(TestColumnGap.class);
- testSuite.addTestSuite(TestColumnNumber.class);
- testSuite.addTestSuite(TestColumnWidth.class);
- testSuite.addTestSuite(TestContentHeight.class);
- testSuite.addTestSuite(TestContentType.class);
- testSuite.addTestSuite(TestContentWidth.class);
- testSuite.addTestSuite(TestCountry.class);
- testSuite.addTestSuite(TestCue.class);
- testSuite.addTestSuite(TestCueAfter.class);
- testSuite.addTestSuite(TestCueBefore.class);
- testSuite.addTestSuite(TestDestinationPlacementOffset.class);
- testSuite.addTestSuite(TestDirection.class);
- testSuite.addTestSuite(TestDisplayAlign.class);
- testSuite.addTestSuite(TestDominantBaseline.class);
- testSuite.addTestSuite(TestElevation.class);
- testSuite.addTestSuite(TestEmptyCells.class);
- testSuite.addTestSuite(TestEndIndent.class);
- testSuite.addTestSuite(TestEndsRow.class);
- testSuite.addTestSuite(TestExtent.class);
- testSuite.addTestSuite(TestExternalDestination.class);
- testSuite.addTestSuite(TestFloat.class);
- testSuite.addTestSuite(TestFlowMapName.class);
- testSuite.addTestSuite(TestFlowMapReference.class);
- testSuite.addTestSuite(TestFlowName.class);
- testSuite.addTestSuite(TestFlowNameReference.class);
- testSuite.addTestSuite(TestFont.class);
- testSuite.addTestSuite(TestFontFamily.class);
- testSuite.addTestSuite(TestFontSelectionStrategy.class);
- testSuite.addTestSuite(TestFontSize.class);
- testSuite.addTestSuite(TestFontSizeAdjust.class);
- testSuite.addTestSuite(TestFontStretch.class);
- testSuite.addTestSuite(TestFontStyle.class);
- testSuite.addTestSuite(TestFontVariant.class);
- testSuite.addTestSuite(TestFontWeight.class);
- testSuite.addTestSuite(TestForcePageCount.class);
- testSuite.addTestSuite(TestFormat.class);
- testSuite.addTestSuite(TestGlyphOrientationHorizontal.class);
- testSuite.addTestSuite(TestGlyphOrientationVertical.class);
- testSuite.addTestSuite(TestGroupingSeparator.class);
- testSuite.addTestSuite(TestGroupingSize.class);
- testSuite.addTestSuite(TestHeight.class);
- testSuite.addTestSuite(TestHyphenate.class);
- testSuite.addTestSuite(TestHyphenationCharacter.class);
- testSuite.addTestSuite(TestHyphenationKeep.class);
- testSuite.addTestSuite(TestHyphenationLadderCount.class);
- testSuite.addTestSuite(TestHyphenationPushCharacterCount.class);
- testSuite.addTestSuite(TestHyphenationRemainCharacterCount.class);
- testSuite.addTestSuite(TestId.class);
- testSuite.addTestSuite(TestIndexClass.class);
- testSuite.addTestSuite(TestIndexKey.class);
- testSuite.addTestSuite(TestIndicateDestination.class);
- testSuite.addTestSuite(TestInitialPageNumber.class);
- testSuite.addTestSuite(TestInlineProgressionDimension.class);
- testSuite.addTestSuite(TestInternalDestination.class);
- testSuite.addTestSuite(TestIntrinsicScaleValue.class);
- testSuite.addTestSuite(TestIntrusionDisplace.class);
- testSuite.addTestSuite(TestKeepTogether.class);
- testSuite.addTestSuite(TestKeepWithNext.class);
- testSuite.addTestSuite(TestKeepWithPrevious.class);
- testSuite.addTestSuite(TestLanguage.class);
- testSuite.addTestSuite(TestLastLineEndIndent.class);
- testSuite.addTestSuite(TestLeaderAlignment.class);
- testSuite.addTestSuite(TestLeaderLength.class);
- testSuite.addTestSuite(TestLeaderPattern.class);
- testSuite.addTestSuite(TestLeaderPatternWidth.class);
- testSuite.addTestSuite(TestLeft.class);
- testSuite.addTestSuite(TestLetterSpacing.class);
- testSuite.addTestSuite(TestLetterValue.class);
- testSuite.addTestSuite(TestLinefeedTreatment.class);
- testSuite.addTestSuite(TestLineHeight.class);
- testSuite.addTestSuite(TestLineHeightShiftAdjustment.class);
- testSuite.addTestSuite(TestLineStackingStrategy.class);
- testSuite.addTestSuite(TestMargin.class);
- testSuite.addTestSuite(TestMarginBottom.class);
- testSuite.addTestSuite(TestMarginLeft.class);
- testSuite.addTestSuite(TestMarginRight.class);
- testSuite.addTestSuite(TestMarginTop.class);
- testSuite.addTestSuite(TestMarkerClassName.class);
- testSuite.addTestSuite(TestMasterName.class);
- testSuite.addTestSuite(TestMasterReference.class);
- testSuite.addTestSuite(TestMaxHeight.class);
- testSuite.addTestSuite(TestMaximumRepeats.class);
- testSuite.addTestSuite(TestMaxWidth.class);
- testSuite.addTestSuite(TestMediaUsage.class);
- testSuite.addTestSuite(TestMergePagesAcrossIndexKeyReferences.class);
- testSuite.addTestSuite(TestMergeRangesAcrossIndexKeyReferences.class);
- testSuite.addTestSuite(TestMergeSequentialPageNumbers.class);
- testSuite.addTestSuite(TestMinHeight.class);
- testSuite.addTestSuite(TestMinWidth.class);
- testSuite.addTestSuite(TestNumberColumnsRepeated.class);
- testSuite.addTestSuite(TestNumberColumnsSpanned.class);
- testSuite.addTestSuite(TestNumberRowsSpanned.class);
- testSuite.addTestSuite(TestOddOrEven.class);
- testSuite.addTestSuite(TestOrphans.class);
- testSuite.addTestSuite(TestOverflow.class);
- testSuite.addTestSuite(TestPadding.class);
- testSuite.addTestSuite(TestPaddingAfter.class);
- testSuite.addTestSuite(TestPaddingBefore.class);
- testSuite.addTestSuite(TestPaddingBottom.class);
- testSuite.addTestSuite(TestPaddingEnd.class);
- testSuite.addTestSuite(TestPaddingLeft.class);
- testSuite.addTestSuite(TestPaddingRight.class);
- testSuite.addTestSuite(TestPaddingStart.class);
- testSuite.addTestSuite(TestPaddingTop.class);
- testSuite.addTestSuite(TestPageBreakAfter.class);
- testSuite.addTestSuite(TestPageBreakBefore.class);
- testSuite.addTestSuite(TestPageBreakInside.class);
- testSuite.addTestSuite(TestPageCitationStrategy.class);
- testSuite.addTestSuite(TestPageHeight.class);
- testSuite.addTestSuite(TestPageNumberTreatment.class);
- testSuite.addTestSuite(TestPagePosition.class);
- testSuite.addTestSuite(TestPageWidth.class);
- testSuite.addTestSuite(TestPause.class);
- testSuite.addTestSuite(TestPauseAfter.class);
- testSuite.addTestSuite(TestPauseBefore.class);
- testSuite.addTestSuite(TestPitch.class);
- testSuite.addTestSuite(TestPitchRange.class);
- testSuite.addTestSuite(TestPlayDuring.class);
- testSuite.addTestSuite(TestPosition.class);
- testSuite.addTestSuite(TestPrecedence.class);
- testSuite.addTestSuite(TestProvisionalDistanceBetweenStarts.class);
- testSuite.addTestSuite(TestProvisionalLabelSeparation.class);
- testSuite.addTestSuite(TestReferenceOrientation.class);
- testSuite.addTestSuite(TestRefId.class);
- testSuite.addTestSuite(TestRefIndexKey.class);
- testSuite.addTestSuite(TestRegionName.class);
- testSuite.addTestSuite(TestRegionNameReference.class);
- testSuite.addTestSuite(TestRelativeAlign.class);
- testSuite.addTestSuite(TestRelativePosition.class);
- testSuite.addTestSuite(TestRenderingIntent.class);
- testSuite.addTestSuite(TestRetrieveBoundary.class);
- testSuite.addTestSuite(TestRetrieveBoundaryWithinTable.class);
- testSuite.addTestSuite(TestRetrieveClassName.class);
- testSuite.addTestSuite(TestRetrievePosition.class);
- testSuite.addTestSuite(TestRetrievePositionWithinTable.class);
- testSuite.addTestSuite(TestRichness.class);
- testSuite.addTestSuite(TestRight.class);
- testSuite.addTestSuite(TestRole.class);
- testSuite.addTestSuite(TestRuleStyle.class);
- testSuite.addTestSuite(TestRuleThickness.class);
- testSuite.addTestSuite(TestScaleOption.class);
- testSuite.addTestSuite(TestScaling.class);
- testSuite.addTestSuite(TestScalingMethod.class);
- testSuite.addTestSuite(TestScoreSpaces.class);
- testSuite.addTestSuite(TestScript.class);
- testSuite.addTestSuite(TestShowDestination.class);
- testSuite.addTestSuite(TestSize.class);
- testSuite.addTestSuite(TestSourceDocument.class);
- testSuite.addTestSuite(TestSpaceAfter.class);
- testSuite.addTestSuite(TestSpaceBefore.class);
- testSuite.addTestSuite(TestSpaceEnd.class);
- testSuite.addTestSuite(TestSpaceStart.class);
- testSuite.addTestSuite(TestSpan.class);
- testSuite.addTestSuite(TestSpeak.class);
- testSuite.addTestSuite(TestSpeakHeader.class);
- testSuite.addTestSuite(TestSpeakNumeral.class);
- testSuite.addTestSuite(TestSpeakPunctuation.class);
- testSuite.addTestSuite(TestSpeechRate.class);
- testSuite.addTestSuite(TestSrc.class);
- testSuite.addTestSuite(TestStartIndent.class);
- testSuite.addTestSuite(TestStartingState.class);
- testSuite.addTestSuite(TestStartsRow.class);
- testSuite.addTestSuite(TestStress.class);
- testSuite.addTestSuite(TestSuppressAtLineBreak.class);
- testSuite.addTestSuite(TestSwitchTo.class);
- testSuite.addTestSuite(TestTableLayout.class);
- testSuite.addTestSuite(TestTableOmitFooterAtBreak.class);
- testSuite.addTestSuite(TestTableOmitHeaderAtBreak.class);
- testSuite.addTestSuite(TestTargetPresentationContext.class);
- testSuite.addTestSuite(TestTargetProcessingContext.class);
- testSuite.addTestSuite(TestTargetStylesheet.class);
- testSuite.addTestSuite(TestTextAlign.class);
- testSuite.addTestSuite(TestTextAlignLast.class);
- testSuite.addTestSuite(TestTextAltitude.class);
- testSuite.addTestSuite(TestTextDecoration.class);
- testSuite.addTestSuite(TestTextDepth.class);
- testSuite.addTestSuite(TestTextIndent.class);
- testSuite.addTestSuite(TestTextShadow.class);
- testSuite.addTestSuite(TestTextTransform.class);
- testSuite.addTestSuite(TestTop.class);
- testSuite.addTestSuite(TestTreatAsWordSpace.class);
- testSuite.addTestSuite(TestUnicodeBidi.class);
- testSuite.addTestSuite(TestVerticalAlign.class);
- testSuite.addTestSuite(TestVisibility.class);
- testSuite.addTestSuite(TestVoiceFamily.class);
- testSuite.addTestSuite(TestVolume.class);
- testSuite.addTestSuite(TestWhiteSpace.class);
- testSuite.addTestSuite(TestWhiteSpaceCollapse.class);
- testSuite.addTestSuite(TestWhiteSpaceTreatment.class);
- testSuite.addTestSuite(TestWidows.class);
- testSuite.addTestSuite(TestWidth.class);
- testSuite.addTestSuite(TestWordSpacing.class);
- testSuite.addTestSuite(TestWrapOption.class);
- testSuite.addTestSuite(TestWritingMode.class);
- testSuite.addTestSuite(TestZIndex.class);
-
- return testSuite;
- }
-
-}
Deleted: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestFOrayGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestFOrayGraphic.java 2010-08-16 03:53:05 UTC (rev 11030)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestFOrayGraphic.java 2010-08-16 04:00:23 UTC (rev 11031)
@@ -1,58 +0,0 @@
-/*
- * 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.graphic;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Handles testing for the FOrayFOTree module.
- */
-public class TestFOrayGraphic extends TestCase {
-
- /**
- * Builds a test suite for all classes in this module.
- * @return The built test suite.
- */
- public static Test suite() {
- final TestSuite testSuite = new TestSuite("FOray Graphic");
-
- testSuite.addTestSuite(TestGraphicServer4a.class);
- testSuite.addTestSuite(TestBmpGraphic.class);
- testSuite.addTestSuite(TestGifGraphic.class);
- testSuite.addTestSuite(TestJpegGraphic.class);
- testSuite.addTestSuite(TestPngGraphic.class);
- testSuite.addTestSuite(TestTiffGraphic.class);
- testSuite.addTestSuite(TestSvgGraphic.class);
-
- return testSuite;
- }
-
-}
Deleted: trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestFOrayHyphen.java
===================================================================
--- trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestFOrayHyphen.java 2010-08-16 03:53:05 UTC (rev 11030)
+++ trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/TestFOrayHyphen.java 2010-08-16 04:00:23 UTC (rev 11031)
@@ -1,59 +0,0 @@
-/*
- * 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.hyphen;
-
-import org.foray.hyphen.util.TestNaturalLanguage;
-import org.foray.hyphen.util.TestWordList;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Handles testing for the FOrayHyphen module.
- */
-public class TestFOrayHyphen extends TestCase {
-
- /**
- * Builds a test suite for all classes in this module.
- * @return The built test suite.
- */
- public static Test suite() {
- final TestSuite testSuite = new TestSuite("FOray Hyphen");
-
- testSuite.addTestSuite(TestHyphenationServer4a.class);
- testSuite.addTestSuite(TestHyphenationTree.class);
-
- testSuite.addTestSuite(TestNaturalLanguage.class);
- testSuite.addTestSuite(TestWordList.class);
-
- return testSuite;
- }
-
-}
Deleted: trunk/foray/foray-ps/src/test/java/org/foray/ps/TestFOrayPS.java
===================================================================
--- trunk/foray/foray-ps/src/test/java/org/foray/ps/TestFOrayPS.java 2010-08-16 03:53:05 UTC (rev 11030)
+++ trunk/foray/foray-ps/src/test/java/org/foray/ps/TestFOrayPS.java 2010-08-16 04:00:23 UTC (rev 11031)
@@ -1,63 +0,0 @@
-/*
- * 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.ps;
-
-import org.foray.ps.encode.TestEncodingParser;
-import org.foray.ps.encode.TestGlyphListParser;
-import org.foray.ps.filter.TestAscii85EncodeFilter;
-import org.foray.ps.filter.TestRunLengthEncodeFilter;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Handles testing for the FOrayPS module.
- */
-public class TestFOrayPS extends TestCase {
-
- /**
- * Builds a test suite for all classes in this module.
- * @return The built test suite.
- */
- public static Test suite() {
- final TestSuite testSuite = new TestSuite("FOray PostScript");
-
- testSuite.addTestSuite(TestPsSystemDict.class);
-
- testSuite.addTestSuite(TestEncodingParser.class);
- testSuite.addTestSuite(TestGlyphListParser.class);
-
- testSuite.addTestSuite(TestAscii85EncodeFilter.class);
- testSuite.addTestSuite(TestRunLengthEncodeFilter.class);
-
- return testSuite;
- }
-
-}
Deleted: trunk/foray/foray-render/src/test/java/org/foray/render/TestFOrayRender.java
===================================================================
--- trunk/foray/foray-render/src/test/java/org/foray/render/TestFOrayRender.java 2010-08-16 03:53:05 UTC (rev 11030)
+++ trunk/foray/foray-render/src/test/java/org/foray/render/TestFOrayRender.java 2010-08-16 04:00:23 UTC (rev 11031)
@@ -1,52 +0,0 @@
-/*
- * 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.render;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Handles testing for the FOrayFOTree module.
- */
-public class TestFOrayRender extends TestCase {
-
- /**
- * Builds a test suite for all classes in this module.
- * @return The built test suite.
- */
- public static Test suite() {
- final TestSuite testSuite = new TestSuite("FOray Render");
-
- testSuite.addTestSuite(TestRenderer.class);
-
- return testSuite;
- }
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-16 03:53:11
|
Revision: 11030
http://foray.svn.sourceforge.net/foray/?rev=11030&view=rev
Author: victormote
Date: 2010-08-16 03:53:05 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
Update JUnit to 4.8.1.
Modified Paths:
--------------
trunk/foray/foray-all/pom.xml
Modified: trunk/foray/foray-all/pom.xml
===================================================================
--- trunk/foray/foray-all/pom.xml 2010-08-16 02:05:19 UTC (rev 11029)
+++ trunk/foray/foray-all/pom.xml 2010-08-16 03:53:05 UTC (rev 11030)
@@ -29,7 +29,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.4</version>
+ <version>4.8.1</version>
<type>jar</type>
<scope>test</scope>
</dependency>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-16 02:05:25
|
Revision: 11029
http://foray.svn.sourceforge.net/foray/?rev=11029&view=rev
Author: victormote
Date: 2010-08-16 02:05:19 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
Make the constants visible to the entire class.
Modified Paths:
--------------
trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-16 01:56:06 UTC (rev 11028)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-16 02:05:19 UTC (rev 11029)
@@ -45,44 +45,53 @@
*/
public class TestXMLUtil extends TestCase {
+ /* Example document and DTD liberated from O'Reilly's "XML in a Nutshell", 3rd Edition, p. 30. */
+
+ /** The DTD public ID. */
+ private static final String STATED_PUBLIC_ID = "Totally Bogus DTD";
+
+ /** The DTD system ID. */
+ private static final String STATED_SYSTEM_ID = "http://www.foray.org/dtds/0.1/en/TotallyBogus.dtd";
+
+ /** The test document. */
+ private static final String XML_DOCUMENT =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+ "<!DOCTYPE Book" +
+ " PUBLIC \"" + TestXMLUtil.STATED_PUBLIC_ID + "\"" +
+ " \"" + TestXMLUtil.STATED_SYSTEM_ID + "\">" +
+ "<person>" +
+ " <name>" +
+ " <first_name>Alan</first_name>" +
+ " <last_name>Turing</last_name>" +
+ " </name>" +
+ " <profession>computer scientist</profession>" +
+ " <profession>mathematician</profession>" +
+ " <profession>cryptographer</profession>" +
+ "</person>";
+
+ /** The test DTD. */
+ private static final String DTD_DOCUMENT =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+ " <!ELEMENT person (name, profession*)>" +
+ " <!ELEMENT name (first_name, last_name)>" +
+ " <!ELEMENT first_name (#PCDATA)>" +
+ " <!ELEMENT last_name (#PCDATA)>" +
+ " <!ELEMENT profession (#PCDATA)>";
+
/**
* Test the method {@link XMLUtil#urlToDom(java.io.InputStream, org.w3c.dom.ls.LSResourceResolver)} by parsing
* a file and testing the results.
* @throws IOException For errors getting the local sandbox.
*/
public void testUrlToDom() throws IOException {
- /* Example here liberated from O'Reilly's "XML in a Nutshell", 3rd Edition, p. 30. */
- final String statedPublicId = "Totally Bogus DTD";
- final String statedSystemId = "http://www.foray.org/dtds/0.1/en/TotallyBogus.dtd";
- final String xmlDocumentString =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
- "<!DOCTYPE Book" +
- " PUBLIC \"" + statedPublicId + "\"" +
- " \"" + statedSystemId + "\">" +
- "<person>" +
- " <name>" +
- " <first_name>Alan</first_name>" +
- " <last_name>Turing</last_name>" +
- " </name>" +
- " <profession>computer scientist</profession>" +
- " <profession>mathematician</profession>" +
- " <profession>cryptographer</profession>" +
- "</person>";
- final String dtdDocumentString =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
- " <!ELEMENT person (name, profession*)>" +
- " <!ELEMENT name (first_name, last_name)>" +
- " <!ELEMENT first_name (#PCDATA)>" +
- " <!ELEMENT last_name (#PCDATA)>" +
- " <!ELEMENT profession (#PCDATA)>";
-
- final InputStream xmlDocumentInputStream = new ByteArrayInputStream(xmlDocumentString.getBytes());
- final InputStream dtdDocumentInputStream = new ByteArrayInputStream(dtdDocumentString.getBytes());
+ final InputStream xmlDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.XML_DOCUMENT.getBytes());
+ final InputStream dtdDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.DTD_DOCUMENT.getBytes());
final LSResourceResolver resourceResolver = new LSResourceResolver() {
public LSInput resolveResource(final String type, final String namespaceURI, final String publicId,
final String systemId, final String baseURI) {
- if (statedPublicId.equals(publicId)) {
- return XMLUtil.createLSInput(dtdDocumentInputStream, statedPublicId, statedSystemId);
+ if (TestXMLUtil.STATED_PUBLIC_ID.equals(publicId)) {
+ return XMLUtil.createLSInput(dtdDocumentInputStream, TestXMLUtil.STATED_PUBLIC_ID,
+ TestXMLUtil.STATED_SYSTEM_ID);
}
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-16 01:56:13
|
Revision: 11028
http://foray.svn.sourceforge.net/foray/?rev=11028&view=rev
Author: victormote
Date: 2010-08-16 01:56:06 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
Change test to not rely on external resources.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java
trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java 2010-08-15 23:59:44 UTC (rev 11027)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java 2010-08-16 01:56:06 UTC (rev 11028)
@@ -31,6 +31,7 @@
import org.apache.xerces.util.XMLCatalogResolver;
import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.bootstrap.DOMImplementationRegistry;
import org.w3c.dom.ls.DOMImplementationLS;
@@ -192,17 +193,12 @@
final LSInput lsInput = impl.createLSInput();
lsInput.setByteStream(inputStream);
-// try {
-// uriString = url.toURI().toString();
-// } catch (final URISyntaxException e) {
-// throw new IOException(e.getMessage());
-// }
Document document = null;
try {
document = builder.parse(lsInput);
-// } catch (final DOMException e) {
-// throw new IOException(e.getMessage());
+ } catch (final DOMException e) {
+ throw new IOException(e.getMessage());
} catch (final LSException e) {
throw new IOException(e.getMessage());
}
@@ -210,6 +206,27 @@
}
/**
+ * Converts an input stream into an LSInput.
+ * @param publicId The public ID to attache to the input.
+ * @param systemId The system ID to attach to the input.
+ * @param inputStream The input stream to attach to the input.
+ * @return The new input.
+ */
+ public static LSInput createLSInput(final InputStream inputStream, final String publicId, final String systemId) {
+ DOMImplementationLS implementation;
+ try {
+ implementation = XMLUtil.getDOMImplementation();
+ } catch (final IOException e) {
+ return null;
+ }
+ final LSInput input = implementation.createLSInput();
+ input.setByteStream(inputStream);
+ input.setPublicId(publicId);
+ input.setSystemId(systemId);
+ return input;
+ }
+
+ /**
* Creates an EntityResolver for one or more XML catalogs.
* @param catalogs The array of URIs indicating where the XML catalogs are located.
* @return The created EntityResolver.
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-15 23:59:44 UTC (rev 11027)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-16 01:56:06 UTC (rev 11028)
@@ -31,16 +31,17 @@
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver;
-import java.io.File;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
-import java.net.URL;
+import java.io.InputStream;
import junit.framework.TestCase;
/**
- * JUnit test class for the class {@link Bit}.
+ * JUnit test class for the class {@link XMLUtil}.
*/
public class TestXMLUtil extends TestCase {
@@ -50,12 +51,43 @@
* @throws IOException For errors getting the local sandbox.
*/
public void testUrlToDom() throws IOException {
- final File examplesDir = Environment.getExamplesDirectory();
- final File graphicsDir = new File(examplesDir, "graphics");
- final File testFile = new File(graphicsDir, "mathml-example-1.xml");
- final URL url = testFile.toURI().toURL();
- final LSResourceResolver resourceResolver = MathMLUtil.getMathMLDtdResourceResolver();
- final Document document = XMLUtil.urlToDom(url.openStream(), resourceResolver);
+ /* Example here liberated from O'Reilly's "XML in a Nutshell", 3rd Edition, p. 30. */
+ final String statedPublicId = "Totally Bogus DTD";
+ final String statedSystemId = "http://www.foray.org/dtds/0.1/en/TotallyBogus.dtd";
+ final String xmlDocumentString =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+ "<!DOCTYPE Book" +
+ " PUBLIC \"" + statedPublicId + "\"" +
+ " \"" + statedSystemId + "\">" +
+ "<person>" +
+ " <name>" +
+ " <first_name>Alan</first_name>" +
+ " <last_name>Turing</last_name>" +
+ " </name>" +
+ " <profession>computer scientist</profession>" +
+ " <profession>mathematician</profession>" +
+ " <profession>cryptographer</profession>" +
+ "</person>";
+ final String dtdDocumentString =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+ " <!ELEMENT person (name, profession*)>" +
+ " <!ELEMENT name (first_name, last_name)>" +
+ " <!ELEMENT first_name (#PCDATA)>" +
+ " <!ELEMENT last_name (#PCDATA)>" +
+ " <!ELEMENT profession (#PCDATA)>";
+
+ final InputStream xmlDocumentInputStream = new ByteArrayInputStream(xmlDocumentString.getBytes());
+ final InputStream dtdDocumentInputStream = new ByteArrayInputStream(dtdDocumentString.getBytes());
+ final LSResourceResolver resourceResolver = new LSResourceResolver() {
+ public LSInput resolveResource(final String type, final String namespaceURI, final String publicId,
+ final String systemId, final String baseURI) {
+ if (statedPublicId.equals(publicId)) {
+ return XMLUtil.createLSInput(dtdDocumentInputStream, statedPublicId, statedSystemId);
+ }
+ return null;
+ }
+ };
+ final Document document = XMLUtil.urlToDom(xmlDocumentInputStream, resourceResolver);
assertNotNull(document);
/* The document itself has two children, the document type, and the
@@ -68,22 +100,21 @@
/* The second node is the root element. */
Node node = nodeList.item(1);
assertEquals(Node.ELEMENT_NODE, node.getNodeType());
- assertEquals("math", node.getLocalName());
+ assertEquals("person", node.getLocalName());
- /* The root node has one child, an "mrow" element. */
nodeList = node.getChildNodes();
- assertEquals(3, nodeList.getLength());
+ assertEquals(8, nodeList.getLength());
/* The first child is ignorable whitespace. */
assertEquals(Node.TEXT_NODE, nodeList.item(0).getNodeType());
- /* The second child is the actual element. */
+ /* The second child is the name element. */
assertEquals(Node.ELEMENT_NODE, nodeList.item(1).getNodeType());
+ assertEquals("name", nodeList.item(1).getLocalName());
/* The third child is ignorable whitespace. */
assertEquals(Node.TEXT_NODE, nodeList.item(2).getNodeType());
node = nodeList.item(1);
- assertEquals("mrow", node.getLocalName());
- /* It is certainly possible to test this DOM document more extensively,
- * but this is enough to show that it was parsed. */
+ /* It is certainly possible to test this DOM document more extensively, but this is enough to show that it was
+ * parsed. */
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-15 23:59:50
|
Revision: 11027
http://foray.svn.sourceforge.net/foray/?rev=11027&view=rev
Author: victormote
Date: 2010-08-15 23:59:44 +0000 (Sun, 15 Aug 2010)
Log Message:
-----------
Upgrade XML Graphics dependency from release 1.2 to 1.3.1.
Modified Paths:
--------------
trunk/foray/foray-all/doc/web/00-release/notes-unreleased.html
trunk/foray/foray-all/pom.xml
Modified: trunk/foray/foray-all/doc/web/00-release/notes-unreleased.html
===================================================================
--- trunk/foray/foray-all/doc/web/00-release/notes-unreleased.html 2010-08-15 22:30:16 UTC (rev 11026)
+++ trunk/foray/foray-all/doc/web/00-release/notes-unreleased.html 2010-08-15 23:59:44 UTC (rev 11027)
@@ -20,7 +20,7 @@
<p>Unreleased changes can be obtained from the root of the source code
repository.</p>
-<h3>Unreleased changes of interest to Users</h3>
+<h3>Changes of Interest to Users</h3>
<ul>
<li>PDF output now contains page number range labels, which allows viewer
applications to show the printed page number within the viewer application
@@ -47,7 +47,7 @@
Option "at" was changed to "area".</li>
</ul>
-<h3>Unreleased changes of interest to Developers</h3>
+<h3>Changes of Interest to Developers</h3>
<ul>
<li>Please review the list of
<a href="http://www.axsl.org/00-release/notes-unreleased.html"
@@ -64,8 +64,10 @@
formats. See GraphicServer4a.registerGraphicOutputFactory(GraphicOutputFactory
factory) for details.</li>
<li>Renamed many classes that implement aXSL interfaces so that they end with "4a" instead of
-starting with "FOray".</li>
+starting with "FOray".
+This has the same general meaning that "Impl" has in some other products.</li>
<li>Upgraded Apache Commons IO dependency from release 1.2 to release 1.4.</li>
+ <li>Upgraded Apache XML Graphics dependency from release 1.2 to release 1.3.1.</li>
</ul>
<!--#include virtual="/00-rsrc/include/leftmenu-end.html" -->
Modified: trunk/foray/foray-all/pom.xml
===================================================================
--- trunk/foray/foray-all/pom.xml 2010-08-15 22:30:16 UTC (rev 11026)
+++ trunk/foray/foray-all/pom.xml 2010-08-15 23:59:44 UTC (rev 11027)
@@ -94,7 +94,7 @@
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId>
- <version>1.2</version>
+ <version>1.3.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-15 22:30:22
|
Revision: 11026
http://foray.svn.sourceforge.net/foray/?rev=11026&view=rev
Author: victormote
Date: 2010-08-15 22:30:16 +0000 (Sun, 15 Aug 2010)
Log Message:
-----------
Make the method more flexible by allowing any InputStream.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java
trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java 2010-08-15 22:11:36 UTC (rev 11025)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/XMLUtil.java 2010-08-15 22:30:16 UTC (rev 11026)
@@ -31,11 +31,11 @@
import org.apache.xerces.util.XMLCatalogResolver;
import org.w3c.dom.DOMConfiguration;
-import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.bootstrap.DOMImplementationRegistry;
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.LSException;
+import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSParser;
import org.w3c.dom.ls.LSResourceResolver;
import org.xml.sax.EntityResolver;
@@ -43,8 +43,7 @@
import org.xml.sax.SAXException;
import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
+import java.io.InputStream;
import javax.xml.stream.XMLResolver;
import javax.xml.stream.XMLStreamException;
@@ -174,14 +173,15 @@
}
/**
- * Converts a URL to a generic DOM Document.
- * @param url The URL to be parsed to a DOM document.
+ * Converts an input stream to a generic DOM Document.
+ * @param inputStream The stream to be parsed to a DOM document.
* @param resourceResolver The resource resolver to use, which can be null.
* This is useful for cases where we want (for example) to find a DTD locally instead of on the internet.
* @return The DOM document.
* @throws IOException For errors parsing the document.
*/
- public static Document urlToDom(final URL url, final LSResourceResolver resourceResolver) throws IOException {
+ public static Document urlToDom(final InputStream inputStream, final LSResourceResolver resourceResolver)
+ throws IOException {
final DOMImplementationLS impl = XMLUtil.getDOMImplementation();
final LSParser builder = impl.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null);
final DOMConfiguration domConfiguration = builder.getDomConfig();
@@ -190,18 +190,19 @@
domConfiguration.setParameter("resource-resolver", resourceResolver);
}
- String uriString = null;
- try {
- uriString = url.toURI().toString();
- } catch (final URISyntaxException e) {
- throw new IOException(e.getMessage());
- }
+ final LSInput lsInput = impl.createLSInput();
+ lsInput.setByteStream(inputStream);
+// try {
+// uriString = url.toURI().toString();
+// } catch (final URISyntaxException e) {
+// throw new IOException(e.getMessage());
+// }
Document document = null;
try {
- document = builder.parseURI(uriString);
- } catch (final DOMException e) {
- throw new IOException(e.getMessage());
+ document = builder.parse(lsInput);
+// } catch (final DOMException e) {
+// throw new IOException(e.getMessage());
} catch (final LSException e) {
throw new IOException(e.getMessage());
}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-15 22:11:36 UTC (rev 11025)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/TestXMLUtil.java 2010-08-15 22:30:16 UTC (rev 11026)
@@ -45,7 +45,7 @@
public class TestXMLUtil extends TestCase {
/**
- * Test the method {@link XMLUtil#urlToDom(java.net.URL, org.w3c.dom.ls.LSResourceResolver)} by parsing
+ * Test the method {@link XMLUtil#urlToDom(java.io.InputStream, org.w3c.dom.ls.LSResourceResolver)} by parsing
* a file and testing the results.
* @throws IOException For errors getting the local sandbox.
*/
@@ -55,7 +55,7 @@
final File testFile = new File(graphicsDir, "mathml-example-1.xml");
final URL url = testFile.toURI().toURL();
final LSResourceResolver resourceResolver = MathMLUtil.getMathMLDtdResourceResolver();
- final Document document = XMLUtil.urlToDom(url, resourceResolver);
+ final Document document = XMLUtil.urlToDom(url.openStream(), resourceResolver);
assertNotNull(document);
/* The document itself has two children, the document type, and the
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2010-08-15 22:11:36 UTC (rev 11025)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/factory/MathFactory.java 2010-08-15 22:30:16 UTC (rev 11026)
@@ -78,7 +78,7 @@
/* Convert the URL to a generic DOM document instance. */
final LSResourceResolver resourceResolver = MathMLUtil.getMathMLDtdResourceResolver();
- final Document dom = XMLUtil.urlToDom(url, resourceResolver);
+ final Document dom = XMLUtil.urlToDom(url.openStream(), resourceResolver);
/* Convert the generic DOM to an SVGDocument (DOM/SVG Document), using
* JEuclid. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-15 22:11:43
|
Revision: 11025
http://foray.svn.sourceforge.net/foray/?rev=11025&view=rev
Author: victormote
Date: 2010-08-15 22:11:36 +0000 (Sun, 15 Aug 2010)
Log Message:
-----------
1. Rename example file for clarity.
2. Add launch configuration for graphics.
Added Paths:
-----------
trunk/foray/foray-all/resource/fo-examples/basic/graphics.fo
trunk/foray/foray-all/scripts/eclipse/launch-configurations/fonts-basic.launch
trunk/foray/foray-all/scripts/eclipse/launch-configurations/graphics-basic.launch
Removed Paths:
-------------
trunk/foray/foray-all/resource/fo-examples/basic/images.fo
trunk/foray/foray-all/scripts/eclipse/launch-configurations/font-basic.launch
Copied: trunk/foray/foray-all/resource/fo-examples/basic/graphics.fo (from rev 11022, trunk/foray/foray-all/resource/fo-examples/basic/images.fo)
===================================================================
--- trunk/foray/foray-all/resource/fo-examples/basic/graphics.fo (rev 0)
+++ trunk/foray/foray-all/resource/fo-examples/basic/graphics.fo 2010-08-15 22:11:36 UTC (rev 11025)
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<fo:root
+ font-family="Times Roman"
+ font-size="12pt"
+ text-align="center"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+<fo:layout-master-set>
+<fo:simple-page-master
+ master-name="right"
+ margin-top="75pt"
+ margin-bottom="25pt"
+ margin-left="100pt"
+ margin-right="50pt">
+ <fo:region-body margin-bottom="50pt"/>
+ <fo:region-after extent="25pt"/>
+</fo:simple-page-master>
+
+<fo:simple-page-master
+ master-name="left"
+ margin-top="75pt"
+ margin-bottom="25pt"
+ margin-left="50pt"
+ margin-right="100pt">
+ <fo:region-body margin-bottom="50pt"/>
+ <fo:region-after extent="25pt"/>
+</fo:simple-page-master>
+
+<fo:page-sequence-master master-name="psmOddEven">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference
+ master-reference="right"
+ page-position="first" />
+ <fo:conditional-page-master-reference
+ master-reference="left"
+ odd-or-even="even" />
+ <fo:conditional-page-master-reference
+ master-reference="right"
+ odd-or-even="odd" />
+ </fo:repeatable-page-master-alternatives>
+</fo:page-sequence-master>
+
+</fo:layout-master-set>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">A GIF image</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../graphics/xml_feather.gif')"/>
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">A transparent GIF image</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../graphics/xml_feather_transparent.gif')"/>
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">A JPEG image</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../graphics/jpeg-test1.jpg')"/>
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">A BMP image</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../graphics/linux.bmp')"/>
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">A PNG image</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../graphics/png-test1.png')"/>
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">A TIFF image</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../graphics/xml_fax.tif')"/>
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">An SVG graphic</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../svg/boxes.svg')"/>
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">An SVG graphic with Text</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../svg/text-001.svg')"/>
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">An SVG graphic with Text from an
+Embedded Font</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../svg/font-embed.svg')"/>
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">An EPS graphic (Bar Code)</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../graphics/barcode1.eps')"
+ content-height="2in"/>
+ </fo:block>
+
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">An EPS graphic (Coffee Shop Symbol)</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../graphics/29_coffeeshop_inv.ps')"
+ content-height="2in"/>
+ </fo:block>
+
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">An Embedded PDF</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../graphics/01_telephone_inv.pdf')"
+ content-height="2in"/>
+ </fo:block>
+
+</fo:flow>
+</fo:page-sequence>
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before.minimum="1em"
+ space-before.optimum="1.5em"
+ space-before.maximum="2em">A MathML Example</fo:block>
+ <fo:block>
+ <fo:external-graphic src="url('../graphics/mathml-example-1.xml')"/>
+ </fo:block>
+
+</fo:flow>
+</fo:page-sequence>
+
+</fo:root>
Deleted: trunk/foray/foray-all/resource/fo-examples/basic/images.fo
===================================================================
--- trunk/foray/foray-all/resource/fo-examples/basic/images.fo 2010-08-15 17:10:40 UTC (rev 11024)
+++ trunk/foray/foray-all/resource/fo-examples/basic/images.fo 2010-08-15 22:11:36 UTC (rev 11025)
@@ -1,240 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<fo:root
- font-family="Times Roman"
- font-size="12pt"
- text-align="center"
- xmlns:fo="http://www.w3.org/1999/XSL/Format">
-
-<fo:layout-master-set>
-<fo:simple-page-master
- master-name="right"
- margin-top="75pt"
- margin-bottom="25pt"
- margin-left="100pt"
- margin-right="50pt">
- <fo:region-body margin-bottom="50pt"/>
- <fo:region-after extent="25pt"/>
-</fo:simple-page-master>
-
-<fo:simple-page-master
- master-name="left"
- margin-top="75pt"
- margin-bottom="25pt"
- margin-left="50pt"
- margin-right="100pt">
- <fo:region-body margin-bottom="50pt"/>
- <fo:region-after extent="25pt"/>
-</fo:simple-page-master>
-
-<fo:page-sequence-master master-name="psmOddEven">
- <fo:repeatable-page-master-alternatives>
- <fo:conditional-page-master-reference
- master-reference="right"
- page-position="first" />
- <fo:conditional-page-master-reference
- master-reference="left"
- odd-or-even="even" />
- <fo:conditional-page-master-reference
- master-reference="right"
- odd-or-even="odd" />
- </fo:repeatable-page-master-alternatives>
-</fo:page-sequence-master>
-
-</fo:layout-master-set>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">A GIF image</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../graphics/xml_feather.gif')"/>
- </fo:block>
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">A transparent GIF image</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../graphics/xml_feather_transparent.gif')"/>
- </fo:block>
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">A JPEG image</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../graphics/jpeg-test1.jpg')"/>
- </fo:block>
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">A BMP image</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../graphics/linux.bmp')"/>
- </fo:block>
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">A PNG image</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../graphics/png-test1.png')"/>
- </fo:block>
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">A TIFF image</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../graphics/xml_fax.tif')"/>
- </fo:block>
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">An SVG graphic</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../svg/boxes.svg')"/>
- </fo:block>
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">An SVG graphic with Text</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../svg/text-001.svg')"/>
- </fo:block>
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">An SVG graphic with Text from an
-Embedded Font</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../svg/font-embed.svg')"/>
- </fo:block>
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
-
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">An EPS graphic (Bar Code)</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../graphics/barcode1.eps')"
- content-height="2in"/>
- </fo:block>
-
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
-
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">An EPS graphic (Coffee Shop Symbol)</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../graphics/29_coffeeshop_inv.ps')"
- content-height="2in"/>
- </fo:block>
-
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
-
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">An Embedded PDF</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../graphics/01_telephone_inv.pdf')"
- content-height="2in"/>
- </fo:block>
-
-</fo:flow>
-</fo:page-sequence>
-
-<fo:page-sequence master-reference="psmOddEven">
-<fo:flow flow-name="xsl-region-body">
-
- <fo:block
- font-size="16pt"
- font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">A MathML Example</fo:block>
- <fo:block>
- <fo:external-graphic src="url('../graphics/mathml-example-1.xml')"/>
- </fo:block>
-
-</fo:flow>
-</fo:page-sequence>
-
-</fo:root>
Deleted: trunk/foray/foray-all/scripts/eclipse/launch-configurations/font-basic.launch
===================================================================
--- trunk/foray/foray-all/scripts/eclipse/launch-configurations/font-basic.launch 2010-08-15 17:10:40 UTC (rev 11024)
+++ trunk/foray/foray-all/scripts/eclipse/launch-configurations/font-basic.launch 2010-08-15 22:11:36 UTC (rev 11025)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/foray-app/src/main/java/org/foray/app/FOray.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.foray.app.FOray"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-configuration-file ${foray-config} -fo ${fo-example-path}/basic/fonts.fo -pdf ${foray-test-output}/fonts.pdf"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="foray-app"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
-</launchConfiguration>
Copied: trunk/foray/foray-all/scripts/eclipse/launch-configurations/fonts-basic.launch (from rev 11023, trunk/foray/foray-all/scripts/eclipse/launch-configurations/font-basic.launch)
===================================================================
--- trunk/foray/foray-all/scripts/eclipse/launch-configurations/fonts-basic.launch (rev 0)
+++ trunk/foray/foray-all/scripts/eclipse/launch-configurations/fonts-basic.launch 2010-08-15 22:11:36 UTC (rev 11025)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/foray-app/src/main/java/org/foray/app/FOray.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.foray.app.FOray"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-configuration-file ${foray-config} -fo ${fo-example-path}/basic/fonts.fo -pdf ${foray-test-output}/fonts-basic.pdf"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="foray-app"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
+</launchConfiguration>
Added: trunk/foray/foray-all/scripts/eclipse/launch-configurations/graphics-basic.launch
===================================================================
--- trunk/foray/foray-all/scripts/eclipse/launch-configurations/graphics-basic.launch (rev 0)
+++ trunk/foray/foray-all/scripts/eclipse/launch-configurations/graphics-basic.launch 2010-08-15 22:11:36 UTC (rev 11025)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/foray-app/src/main/java/org/foray/app/FOray.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.foray.app.FOray"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-configuration-file ${foray-config} -fo ${fo-example-path}/basic/graphics.fo -pdf ${foray-test-output}/graphics-basic.pdf"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="foray-app"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
+</launchConfiguration>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-15 17:10:47
|
Revision: 11024
http://foray.svn.sourceforge.net/foray/?rev=11024&view=rev
Author: victormote
Date: 2010-08-15 17:10:40 +0000 (Sun, 15 Aug 2010)
Log Message:
-----------
Get the maven build to include the foray dtds in the foray-common jar file.
Modified Paths:
--------------
trunk/foray/foray-common/pom.xml
trunk/foray/foray-common/scripts/build.xml
Modified: trunk/foray/foray-common/pom.xml
===================================================================
--- trunk/foray/foray-common/pom.xml 2010-08-14 18:54:14 UTC (rev 11023)
+++ trunk/foray/foray-common/pom.xml 2010-08-15 17:10:40 UTC (rev 11024)
@@ -62,4 +62,27 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <!-- Copy all of the common resources maintained in other places into the build directory. -->
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="./scripts/build.xml" inheritall="false" target="resources"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Modified: trunk/foray/foray-common/scripts/build.xml
===================================================================
--- trunk/foray/foray-common/scripts/build.xml 2010-08-14 18:54:14 UTC (rev 11023)
+++ trunk/foray/foray-common/scripts/build.xml 2010-08-15 17:10:40 UTC (rev 11024)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="common"/>
<property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
- <property name="doc.dir" value="${foray.sandbox}/doc"/>
+ <property name="doc.dir" value="${foray.sandbox}/foray-all/doc"/>
<property name="src.dir" value="${module.dir}/src/main/java"/>
<property name="test-src.dir" value="${module.dir}/src/test/java"/>
<property name="build.dir" value="${module.dir}/target"/>
@@ -21,8 +21,6 @@
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<property name="test-jar.file"
location="${build.dir}/test-${name.lowercase}-${module}-${version}.jar"/>
- <property name="resources.build"
- location="${build.dir}/resources"/>
<artifact:pom id="project.pom" file="../pom.xml"/>
<artifact:dependencies pathId="libs-build-classpath" pomRefId="project.pom"/>
@@ -162,19 +160,18 @@
</target>
<!-- =================================================================== -->
- <!-- Creates a jar file for the Common resources. -->
+ <!-- Copies the common resources maintained in other places to the build
+ directory. -->
<!-- =================================================================== -->
- <target name="resources" depends="clean"
- description="Creates the resources jar file">
- <property name="resource.jar.file"
- location="${build.dir}/${name.lowercase}-${module}-${version}-rsrc.jar"/>
+ <target name="resources" depends="prepare"
+ description="Copy the common resources">
+
+ <property name="resources.build"
+ location="${classes.dir}/org/foray/common/dtds"/>
<mkdir dir="${resources.build}"/>
- <copy todir="${resources.build}/org/foray/common/dtds">
+ <copy todir="${resources.build}">
<fileset dir="${doc.dir}/web/dtds/0.1/en"/>
</copy>
- <echo message="Creating the jar file ${resource.jar.file}"/>
- <jar jarfile="${resource.jar.file}"
- basedir="${resources.build}"/>
</target>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-14 18:54:20
|
Revision: 11023
http://foray.svn.sourceforge.net/foray/?rev=11023&view=rev
Author: victormote
Date: 2010-08-14 18:54:14 +0000 (Sat, 14 Aug 2010)
Log Message:
-----------
Add a launch configuration for reuse.
Added Paths:
-----------
trunk/foray/foray-all/scripts/eclipse/
trunk/foray/foray-all/scripts/eclipse/launch-configurations/
trunk/foray/foray-all/scripts/eclipse/launch-configurations/font-basic.launch
Added: trunk/foray/foray-all/scripts/eclipse/launch-configurations/font-basic.launch
===================================================================
--- trunk/foray/foray-all/scripts/eclipse/launch-configurations/font-basic.launch (rev 0)
+++ trunk/foray/foray-all/scripts/eclipse/launch-configurations/font-basic.launch 2010-08-14 18:54:14 UTC (rev 11023)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/foray-app/src/main/java/org/foray/app/FOray.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.foray.app.FOray"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-configuration-file ${foray-config} -fo ${fo-example-path}/basic/fonts.fo -pdf ${foray-test-output}/fonts.pdf"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="foray-app"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
+</launchConfiguration>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-08-14 18:18:11
|
Revision: 11022
http://foray.svn.sourceforge.net/foray/?rev=11022&view=rev
Author: victormote
Date: 2010-08-14 18:18:05 +0000 (Sat, 14 Aug 2010)
Log Message:
-----------
Remove a dependency on test code in another module.
Modified Paths:
--------------
trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2010-08-14 17:59:40 UTC (rev 11021)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2010-08-14 18:18:05 UTC (rev 11022)
@@ -41,7 +41,6 @@
import org.foray.font.FontServer4a;
import org.foray.font.FreeStandingFont;
import org.foray.font.RegisteredFont;
-import org.foray.font.TestFontServer4a;
import org.axsl.font.FontException;
@@ -55,12 +54,23 @@
public abstract class AbstractAreaTreeTest extends TestCase {
/**
+ * Get a font server suitable for testing.
+ * @return A font server.
+ * @throws FontException For errors during server creation.
+ */
+ protected FontServer4a getFontServer() throws FontException {
+ final FontServer4a fontServer = new FontServer4a();
+ fontServer.setup(null, null);
+ return fontServer;
+ }
+
+ /**
* Returns the Base14-Helvetica font.
* @return The Base14-Helvetica font.
* @throws FontException For font system errors getting the font.
*/
protected FreeStandingFont getHelveticaFont() throws FontException {
- final FontServer4a fontServer = TestFontServer4a.getServer();
+ final FontServer4a fontServer = getFontServer();
assertNotNull(fontServer);
final RegisteredFont rf = fontServer.getRegisteredFont("Base14-Helvetica");
assertNotNull(rf);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|