You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2008/07/25 14:46:22 UTC
svn commit: r679781 [33/34] - in
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign: ./
examples/embedding/java/embedding/ examples/embedding/java/embedding/events/
examples/embedding/java/embedding/intermediate/
examples/embedding/java/embedding/model/ ...
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java Fri Jul 25 05:44:20 2008
@@ -61,7 +61,7 @@
static {
DebugHelper.registerStandardElementListObservers();
}
-
+
public static String[] readDisabledTestcases(File f) throws IOException {
List lines = new java.util.ArrayList();
Source stylesheet = new StreamSource(
@@ -78,7 +78,7 @@
}
return (String[])lines.toArray(new String[lines.size()]);
}
-
+
private static class FilenameHandler extends DefaultHandler {
private StringBuffer buffer = new StringBuffer(128);
private boolean readingFilename = false;
@@ -88,7 +88,7 @@
this.filenames = filenames;
}
- public void startElement(String namespaceURI, String localName, String qName,
+ public void startElement(String namespaceURI, String localName, String qName,
Attributes atts) throws SAXException {
if (qName != null && qName.equals("file")) {
buffer.setLength(0);
@@ -99,7 +99,7 @@
}
}
- public void endElement(String namespaceURI, String localName, String qName)
+ public void endElement(String namespaceURI, String localName, String qName)
throws SAXException {
if (qName != null && qName.equals("file")) {
readingFilename = false;
@@ -116,7 +116,7 @@
}
}
}
-
+
public static IOFileFilter decorateWithDisabledList(IOFileFilter filter) throws IOException {
String disabled = System.getProperty("fop.layoutengine.disabled");
if (disabled != null && disabled.length() > 0) {
@@ -126,7 +126,7 @@
}
return filter;
}
-
+
/**
* @return a Collection of File instances containing all the test cases set up for processing.
* @throws IOException if there's a problem gathering the list of test files
@@ -150,18 +150,18 @@
if (testset == null) {
testset = "standard";
}
- Collection files = FileUtils.listFiles(new File(mainDir, testset + "-testcases"),
+ Collection files = FileUtils.listFiles(new File(mainDir, testset + "-testcases"),
filter, TrueFileFilter.INSTANCE);
String privateTests = System.getProperty("fop.layoutengine.private");
if ("true".equalsIgnoreCase(privateTests)) {
Collection privateFiles = FileUtils.listFiles(
- new File(mainDir, "private-testcases"),
+ new File(mainDir, "private-testcases"),
filter, TrueFileFilter.INSTANCE);
files.addAll(privateFiles);
}
return files;
}
-
+
/**
* @return the test suite with all the tests (one for each XML file)
* @throws IOException in case of an I/O problem
@@ -180,11 +180,11 @@
File f = (File)i.next();
addTestCase(suite, tester, f);
}
-
+
return suite;
}
-
- private static void addTestCase(TestSuite suite,
+
+ private static void addTestCase(TestSuite suite,
final LayoutEngineTester tester, final File f) {
suite.addTest(new LayoutEngineTestCase(f.getName()) {
public void runTest() throws Exception {
@@ -199,24 +199,24 @@
}
});
}
-
+
private static class LayoutEngineTestCase extends TestCase {
-
+
private LayoutEngineTester tester;
private File testFile;
-
+
public LayoutEngineTestCase(String name) {
super(name);
}
-
+
public void prepare(LayoutEngineTester tester, File testFile) {
//super(testFile.getName());
this.tester = tester;
this.testFile = testFile;
}
-
+
public void testMain() throws Exception {
tester.runTest(testFile);
}
- }
+ }
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/LayoutResult.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/LayoutResult.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/LayoutResult.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/LayoutResult.java Fri Jul 25 05:44:20 2008
@@ -30,7 +30,7 @@
private Document areaTree;
private ElementListCollector elCollector;
private FormattingResults results;
-
+
/**
* Creates a new LayoutResult instance.
* @param areaTree the area tree DOM
@@ -43,12 +43,12 @@
this.elCollector = elCollector;
this.results = results;
}
-
+
/** @return the generated area tree as DOM tree */
public Document getAreaTree() {
return this.areaTree;
}
-
+
/** @return the element list collector */
public ElementListCollector getElementListCollector() {
return this.elCollector;
@@ -60,5 +60,5 @@
public FormattingResults getResults() {
return results;
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/ResultCheck.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/ResultCheck.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/ResultCheck.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/ResultCheck.java Fri Jul 25 05:44:20 2008
@@ -29,7 +29,7 @@
private String expected;
private String property;
-
+
/**
* Creates a new instance
* @param expected expected value
@@ -39,7 +39,7 @@
this.expected = expected;
this.property = property;
}
-
+
/**
* Creates a new instance from a DOM node.
* @param node DOM node that defines this check
@@ -48,7 +48,7 @@
this.expected = node.getAttributes().getNamedItem("expected").getNodeValue();
this.property = node.getAttributes().getNamedItem("property").getNodeValue();
}
-
+
/* (non-Javadoc)
* @see LayoutEngineCheck#check(LayoutResult)
*/
@@ -62,7 +62,7 @@
}
if (!expected.equals(actual)) {
throw new RuntimeException(
- "Expected property to evaluate to '" + expected + "', but got '"
+ "Expected property to evaluate to '" + expected + "', but got '"
+ actual + "' (" + this + ")");
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/TrueCheck.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/TrueCheck.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/TrueCheck.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/layoutengine/TrueCheck.java Fri Jul 25 05:44:20 2008
@@ -36,7 +36,7 @@
private String xpath;
private String failureMessage;
private PrefixResolver prefixResolver;
-
+
/**
* Creates a new instance
* @param xpath XPath statement that needs to be evaluated
@@ -44,7 +44,7 @@
public TrueCheck(String xpath) {
this.xpath = xpath;
}
-
+
/**
* Creates a new instance from a DOM node.
* @param node DOM node that defines this check
@@ -57,7 +57,7 @@
}
this.prefixResolver = new PrefixResolverDefault(node);
}
-
+
/** @see org.apache.fop.layoutengine.LayoutEngineCheck */
public void check(LayoutResult result) {
XObject res;
@@ -71,7 +71,7 @@
throw new RuntimeException(failureMessage);
} else {
throw new RuntimeException(
- "Expected XPath expression to evaluate to 'true', but got '"
+ "Expected XPath expression to evaluate to 'true', but got '"
+ res + "' (" + this + ")");
}
}
@@ -82,5 +82,5 @@
public String toString() {
return "XPath: " + xpath;
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/memory/MemoryEater.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/memory/MemoryEater.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/memory/MemoryEater.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/memory/MemoryEater.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -50,29 +50,29 @@
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();
private FopFactory fopFactory = FopFactory.newInstance();
private Templates replicatorTemplates;
-
+
public MemoryEater() throws TransformerConfigurationException, MalformedURLException {
File xsltFile = new File("test/xsl/fo-replicator.xsl");
Source xslt = new StreamSource(xsltFile);
replicatorTemplates = tFactory.newTemplates(xslt);
}
-
+
private void eatMemory(File foFile, int replicatorRepeats) throws Exception {
Source src = new StreamSource(foFile);
-
+
Transformer transformer = replicatorTemplates.newTransformer();
transformer.setParameter("repeats", new Integer(replicatorRepeats));
-
+
OutputStream out = new NullOutputStream(); //write to /dev/nul
FOUserAgent userAgent = fopFactory.newFOUserAgent();
userAgent.setBaseURL(foFile.getParentFile().toURL().toExternalForm());
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, out);
Result res = new SAXResult(fop.getDefaultHandler());
-
+
transformer.transform(src, res);
-
+
System.out.println("Generated " + fop.getResults().getPageCount() + " pages.");
-
+
}
private static void prompt() throws IOException {
@@ -80,7 +80,7 @@
System.out.print("Press return to continue...");
in.readLine();
}
-
+
/**
* Main method.
* @param args the command-line arguments
@@ -97,24 +97,24 @@
runRepeats = Integer.parseInt(args[1]);
}
File testFile = new File("examples/fo/basic/readme.fo");
-
- System.out.println("MemoryEater! About to replicate the test file "
+
+ System.out.println("MemoryEater! About to replicate the test file "
+ replicatorRepeats + " times and run it " + runRepeats + " times...");
if (doPrompt) {
prompt();
}
-
- System.out.println("Processing...");
+
+ System.out.println("Processing...");
long start = System.currentTimeMillis();
-
+
MemoryEater app = new MemoryEater();
for (int i = 0; i < runRepeats; i++) {
app.eatMemory(testFile, replicatorRepeats);
}
-
+
long duration = System.currentTimeMillis() - start;
System.out.println("Success! Job took " + duration + " ms");
-
+
if (doPrompt) {
prompt();
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/pdf/PDFObjectTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/pdf/PDFObjectTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/pdf/PDFObjectTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/pdf/PDFObjectTestCase.java Fri Jul 25 05:44:20 2008
@@ -32,7 +32,7 @@
public class PDFObjectTestCase extends TestCase {
/**
- * Tests date/time formatting in PDFObject.
+ * Tests date/time formatting in PDFObject.
* @throws Exception if an error occurs
*/
public void testDateFormatting() throws Exception {
@@ -40,7 +40,7 @@
cal.set(2008, Calendar.FEBRUARY, 07, 15, 11, 07);
cal.set(Calendar.MILLISECOND, 0);
Date dt = cal.getTime();
-
+
MyPDFObject obj = new MyPDFObject();
String s = obj.formatDateTime(dt, TimeZone.getTimeZone("GMT"));
assertEquals("D:20080207151107Z", s);
@@ -51,9 +51,9 @@
s = obj.formatDateTime(dt, TimeZone.getTimeZone("GMT-08:00"));
assertEquals("D:20080207071107-08'00'", s);
}
-
+
private class MyPDFObject extends PDFObject {
-
+
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java Fri Jul 25 05:44:20 2008
@@ -113,7 +113,7 @@
return e;
}
- /**
+ /**
* get FOP config File
* @return user config file to be used for testing
*/
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java Fri Jul 25 05:44:20 2008
@@ -46,11 +46,11 @@
dc.setTitle("MyTitle");
dc.setDescription(null, "MySubject");
dc.addCreator("That's me");
-
+
AdobePDFAdapter pdf = AdobePDFSchema.getAdapter(meta);
pdf.setKeywords("XSL-FO XML");
pdf.setProducer("SuperFOP");
-
+
XMPBasicAdapter xmp = XMPBasicSchema.getAdapter(meta);
xmp.setCreatorTool("WonderFOP");
Calendar cal1 = Calendar.getInstance(TimeZone.getTimeZone("Europe/Zurich"));
@@ -61,11 +61,11 @@
cal2.set(2007, Calendar.JUNE, 6, 8, 15, 59);
cal2.set(Calendar.MILLISECOND, 0);
xmp.setModifyDate(cal2.getTime());
-
+
PDFInfo info = new PDFInfo();
assertNull(info.getTitle());
PDFMetadata.updateInfoFromMetadata(meta, info);
-
+
assertEquals("MyTitle", info.getTitle());
assertEquals("MySubject", info.getSubject());
assertEquals("That's me", info.getAuthor());
@@ -75,7 +75,7 @@
assertEquals(cal1.getTime(), info.getCreationDate());
assertEquals(cal2.getTime(), info.getModDate());
}
-
+
public void testXMPUpdate() throws Exception {
PDFDocument doc = new PDFDocument("SuperFOP");
PDFInfo info = doc.getInfo();
@@ -93,9 +93,9 @@
cal2.set(2007, Calendar.JUNE, 6, 8, 15, 59);
cal2.set(Calendar.MILLISECOND, 0);
info.setModDate(cal2.getTime());
-
+
Metadata meta = PDFMetadata.createXMPFromPDFDocument(doc);
-
+
DublinCoreAdapter dc = DublinCoreSchema.getAdapter(meta);
assertEquals("MyTitle", dc.getTitle());
assertEquals("MySubject", dc.getDescription());
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -27,10 +27,10 @@
/** Simple sanity test of the PDFCmap class */
public class PDFCMapTestCase extends TestCase {
-
+
public void testPDFCMapFillInPDF() throws Exception {
final String EOL = "\n";
- final String expected =
+ final String expected =
"%!PS-Adobe-3.0 Resource-CMap" + EOL
+"%%DocumentNeededResources: ProcSet (CIDInit)" + EOL
+"%%IncludeResource: ProcSet (CIDInit)" + EOL
@@ -60,7 +60,7 @@
+"%%EndResource" + EOL
+"%%EOF" + EOL
;
-
+
final StringWriter w = new StringWriter();
final CMapBuilder builder = new CMapBuilder(w, "test");
builder.writeCMap();
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java Fri Jul 25 05:44:20 2008
@@ -59,15 +59,15 @@
*/
public void testPDFEncodingWithStandardFont() throws Exception {
- /* If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
+ /* If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
* ...Tm [(PDFE_TEST_MARK_2:) ( ) (This) ( ) (is) ...(acute:) ( ) (XX_\351_XX) ] TJ
* ...Tm [(PDFE_TEST_MARK_3:) ( ) (This) ( ) (is) ...(letter:) ( ) (XX_\342\352\356\364\373_XX) ] TJ
* The following array is used to look for these patterns
- */
- final String[] testPatterns = {
+ */
+ final String[] testPatterns = {
TEST_MARKER + "1", "Standard",
- TEST_MARKER + "2", "XX_\\351_XX",
- TEST_MARKER + "3", "XX_\\342\\352\\356\\364\\373_XX"
+ TEST_MARKER + "2", "XX_\\351_XX",
+ TEST_MARKER + "3", "XX_\\342\\352\\356\\364\\373_XX"
};
runTest("test-standard-font.fo", testPatterns);
@@ -78,21 +78,21 @@
* encoding when custom font is used.
* TODO This should be tested using PDFBox. If PDFBox can extract the text correctly,
* everything is fine. The tests here are too unstable.
- *
+ *
* @throws Exception
* checkstyle wants a comment here, even a silly one
*/
public void DISABLEDtestPDFEncodingWithCustomFont() throws Exception {
- /* If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
+ /* If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
* ...Tm [(PDFE_TEST_MARK_2:) ( ) (This) ( ) (is) ...(acute:) ( ) (XX_\351_XX) ] TJ
* ...Tm [(PDFE_TEST_MARK_3:) ( ) (This) ( ) (is) ...(letter:) ( ) (XX_\342\352\356\364\373_XX) ] TJ
* The following array is used to look for these patterns
- */
- final String[] testPatterns = {
+ */
+ final String[] testPatterns = {
TEST_MARKER + "1", "(Gladiator)",
- TEST_MARKER + "2", "XX_\\351_XX",
- TEST_MARKER + "3", "XX_\\342\\352\\356\\364\\373_XX"
+ TEST_MARKER + "2", "XX_\\351_XX",
+ TEST_MARKER + "3", "XX_\\342\\352\\356\\364\\373_XX"
};
runTest("test-custom-font.fo", testPatterns);
@@ -109,7 +109,7 @@
/**
* Check character encodings in the generated PDF data, by reading text
* lines identified by markers and checking their content
- *
+ *
* @throws IOException
*/
private void checkEncoding(byte[] pdf, String[] testPattern)
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java Fri Jul 25 05:44:20 2008
@@ -46,7 +46,7 @@
a.getRendererOptions().put("disable-srgb-colorspace", Boolean.TRUE);
return a;
}
-
+
/**
* Verify that the PDFRenderer complains if PDF/A or PDF/X is used when sRGB is disabled.
* @throws Exception if the test fails
@@ -60,5 +60,5 @@
//exception expected!
}
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/Bug39607TestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/Bug39607TestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/Bug39607TestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/Bug39607TestCase.java Fri Jul 25 05:44:20 2008
@@ -51,7 +51,7 @@
paragraph.newText("Testing fop - rtf module - class RtfTableRow");
paragraph.close();
- RtfTable table = section.newTable(null);
+ RtfTable table = section.newTable(null);
RtfTableRow row = table.newTableRow();
row.newTableCell(2000).newParagraph().newText("blah");
row.newTableCell(5000).newParagraph().newText("doubleBlah");
@@ -61,5 +61,5 @@
doc.close();
f.flush();
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render.rtf;
import junit.framework.Test;
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/DummyTableColumnsInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/DummyTableColumnsInfo.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/DummyTableColumnsInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/DummyTableColumnsInfo.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ListInTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ListInTable.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ListInTable.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ListInTable.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleDocument.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleDocument.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleDocument.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleDocument.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleLists.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleLists.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleLists.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleLists.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TextAttributes.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TextAttributes.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TextAttributes.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TextAttributes.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/Whitespace.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/Whitespace.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/Whitespace.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/render/rtf/rtflib/testdocs/Whitespace.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -31,7 +31,7 @@
/*
* These symbols are used to indicate the break action returned
* by the paragraph breaking. Their meaning is as per Unicode
- * <a href="http://unicode.org/reports/tr14/#PairBasedImplementation">technical
+ * <a href="http://unicode.org/reports/tr14/#PairBasedImplementation">technical
* report #14</a>.
*/
private static final String BREAK_ACTION = "_%#@^!";
@@ -51,7 +51,7 @@
*/
public static Test suite() {
TestSuite suite = new TestSuite(LineBreakStatusTest.class);
-
+
return suite;
}
@@ -69,106 +69,106 @@
*/
public void testNextChar() {
System.out.println("testNextChar");
-
+
// AL -- Ordinary Alphabetic and Symbol Characters (XP)
assertTrue(testBreak(
- "Nobreak",
+ "Nobreak",
"^^^^^^^"
));
-
+
// BA -- Break Opportunity After (A)
assertTrue(testBreak(
- "Thin Space" + "\u2009" + "break",
+ "Thin Space" + "\u2009" + "break",
"^^^^^%^^^^" + "^" + "_^^^^"
));
assertTrue(testBreak(
- "Shy" + "\u00AD" + "break",
+ "Shy" + "\u00AD" + "break",
"^^^" + "^" + "_^^^^"
));
// BB -- Break opportunites before characters (B)
assertTrue(testBreak(
- "Acute Accent" + "\u00B4" + "break",
+ "Acute Accent" + "\u00B4" + "break",
"^^^^^^%^^^^^" + "_" + "^^^^^"
));
// B2 -- Break Opportunity Before and After (B/A/XP)
assertTrue(testBreak(
- "Em Dash" + "\u2014" + "break",
+ "Em Dash" + "\u2014" + "break",
"^^^%^^^" + "_" + "_^^^^"
));
assertTrue(testBreak(
- "Em Dash Dash" + "\u2014" + "\u2014" + "break",
+ "Em Dash Dash" + "\u2014" + "\u2014" + "break",
"^^^%^^^^%^^^" + "_" + "^" + "_^^^^"
));
// BK Mandatory Break (A) -- normative
assertTrue(testBreak(
- "Form Feed" + "\u000C" + "break",
+ "Form Feed" + "\u000C" + "break",
"^^^^^%^^^" + "^" + "!^^^^"
));
assertTrue(testBreak(
- "Line Separator" + "\u2028" + "break",
+ "Line Separator" + "\u2028" + "break",
"^^^^^%^^^^^^^^" + "^" + "!^^^^"
));
assertTrue(testBreak(
- "Paragraph Separator" + "\u2029" + "break",
+ "Paragraph Separator" + "\u2029" + "break",
"^^^^^^^^^^%^^^^^^^^" + "^" + "!^^^^"
));
// CB Contingent Break Opportunity (B/A) -- normative
// TODO Don't know quite what to do here
-
+
// CL -- Closing Punctuation (XB)
assertTrue(testBreak(
- "Right Parenthesis ) break",
+ "Right Parenthesis ) break",
"^^^^^^%^^^^^^^^^^^^^%^^^^"
));
-
+
// CM -- Attached Characters and Combining Marks (XB) -- normative
assertTrue(testBreak(
- "Grave Accent" + "\u0300" + " break",
+ "Grave Accent" + "\u0300" + " break",
"^^^^^^%^^^^^" + "^" + "^%^^^^"
));
-
+
// CR -- Carriage Return (A) -- normative
assertTrue(testBreak(
- "CR" + "\r" + "break",
+ "CR" + "\r" + "break",
"^^" + "^" + "!^^^^"
));
-
+
assertTrue(testBreak(
- "CRLF" + "\r\n" + "break",
+ "CRLF" + "\r\n" + "break",
"^^^^" + "^^" + "!^^^^"
));
-
+
// EX -- Exclamation / interrogation (XB)
assertTrue(testBreak(
- "EX CL ! ) break",
+ "EX CL ! ) break",
"^^^%^^^^^^%^^^^"
));
-
+
assertTrue(testBreak(
- "EX Wave Dash ! " + "\u301C" + " break",
+ "EX Wave Dash ! " + "\u301C" + " break",
"^^^%^^^^%^^^^^^" + "%" + "^_^^^^"
));
-
+
// GL -- Non-breaking ("Glue") (XB/XA) -- normative
assertTrue(testBreak(
- "No" + "\u00a0" + "break",
+ "No" + "\u00a0" + "break",
"^^" + "^" + "^^^^^"
));
-
+
assertTrue(testBreak(
- "Non" + "\u2011" + " Hyphen",
+ "Non" + "\u2011" + " Hyphen",
"^^^" + "^" + "^%^^^^^"
));
-
+
// H2 -- Hangul LVT Syllable (B/A)
// TODO
@@ -177,40 +177,40 @@
// HY -- Hyphen Minus
assertTrue(testBreak(
- "Normal-Hyphen",
+ "Normal-Hyphen",
"^^^^^^^_^^^^^"
));
assertTrue(testBreak(
- "Normal - Hyphen",
+ "Normal - Hyphen",
"^^^^^^^%^_^^^^^"
));
assertTrue(testBreak(
- "123-456",
+ "123-456",
"^^^^^^^"
));
assertTrue(testBreak(
- "123 - 456",
+ "123 - 456",
"^^^^%^%^^"
));
// ID -- Ideographic (B/A)
assertTrue(testBreak(
- "\u4E00" + "\u3000" + "\u4E02",
+ "\u4E00" + "\u3000" + "\u4E02",
"^" + "_" + "_"
));
// IN -- Inseperable characters (XP)
assertTrue(testBreak(
- "IN " + "\u2024" + "\u2025" + "\u2026",
+ "IN " + "\u2024" + "\u2025" + "\u2026",
"^^^" + "%" + "^" + "^"
));
// IS -- Numeric Separator (Infix) (XB)
assertTrue(testBreak(
- "123,456.00 12:59",
+ "123,456.00 12:59",
"^^^^^^^^^^^%^^^^"
));
@@ -225,13 +225,13 @@
// LF -- Line Feed (A) -- normative
assertTrue(testBreak(
- "Simple" + "\n" + "\n" + "break",
+ "Simple" + "\n" + "\n" + "break",
"^^^^^^" + "^" + "!" + "!^^^^"
));
// NL -- Next Line (A) -- normative
assertTrue(testBreak(
- "NL" + "\u0085" + "break",
+ "NL" + "\u0085" + "break",
"^^" + "^" + "!^^^^"
));
@@ -243,80 +243,80 @@
// OP -- Opening Punctuation (XA)
assertTrue(testBreak(
- "[ Bracket ( Parenthesis",
+ "[ Bracket ( Parenthesis",
"^^^^^^^^^^%^^^^^^^^^^^^"
));
-
+
// PO -- Postfix (Numeric) (XB)
assertTrue(testBreak(
- "(12.00)%",
+ "(12.00)%",
"^^^^^^^^"
));
// PR -- Prefix (Numeric) (XA)
assertTrue(testBreak(
- "$1000.00",
+ "$1000.00",
"^^^^^^^^"
));
// QU -- Ambiguous Quotation (XB/XA)
assertTrue(testBreak(
- "'In Quotes'",
+ "'In Quotes'",
"^^^^%^^^^^^"
));
assertTrue(testBreak(
- "' (In Quotes) '",
+ "' (In Quotes) '",
"^^^^^^%^^^^^^^%"
));
// SA -- Complex-context Dependent Characters (South East Asian) (P)
// TODO
-
+
// SP -- Space (A) -- normative
assertTrue(testBreak(
- "Simple break",
+ "Simple break",
"^^^^^^^%^^^^"
));
assertTrue(testBreak(
- "Simple break2",
+ "Simple break2",
"^^^^^^^^^^%^^^^^"
));
// SY -- Symbols Allowing Break After (A)
assertTrue(testBreak(
- "http://xmlgraphics.apache.org/fop",
+ "http://xmlgraphics.apache.org/fop",
"^^^^^^^_^^^^^^^^^^^^^^^^^^^^^^_^^"
));
assertTrue(testBreak(
- "1/2 31/10/2005",
+ "1/2 31/10/2005",
"^^^^%^^^^^^^^^"
));
// WJ -- Word Joiner (XA/XB) -- (normative)
assertTrue(testBreak(
- "http://" + "\u2060" + "xmlgraphics.apache.org/" + "\uFEFF" + "fop",
+ "http://" + "\u2060" + "xmlgraphics.apache.org/" + "\uFEFF" + "fop",
"^^^^^^^" + "^" + "^^^^^^^^^^^^^^^^^^^^^^^" + "^" + "^^^"
));
assertTrue(testBreak(
- "Simple " + "\u2060" + "break",
+ "Simple " + "\u2060" + "break",
"^^^^^^^" + "^" + "^^^^^"
));
assertTrue(testBreak(
- "Simple" + "\u200B" + "\u2060" + "break",
+ "Simple" + "\u200B" + "\u2060" + "break",
"^^^^^^" + "^" + "_" + "^^^^^"
));
// XX -- Unknown (XP)
// TODO
-
+
// ZW -- Zero Width Space (A) -- (normative)
assertTrue(testBreak(
- "Simple" + "\u200B" + "break",
+ "Simple" + "\u200B" + "break",
"^^^^^^" + "^" + "_^^^^"
));
@@ -340,8 +340,8 @@
if (BREAK_ACTION.charAt(breakAction) != breakActions.charAt(i)) {
System.err.println(paragraph);
System.err.println(breakActions);
- System.err.println("pos = " + i
- + " expected '" + breakActions.charAt(i)
+ System.err.println("pos = " + i
+ + " expected '" + breakActions.charAt(i)
+ "' got '" + BREAK_ACTION.charAt(breakAction) + "'");
result = false;
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java Fri Jul 25 05:44:20 2008
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
@@ -23,7 +23,7 @@
/**
* TODO add javadoc
- *
+ *
*
*/
public class LineBreakUtilsTest extends TestCase {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOPTestbed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOPTestbed.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOPTestbed.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOPTestbed.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -46,7 +46,7 @@
* Testbed for multi-threading tests. The class can run a configurable set of task a number of
* times in a configurable number of threads to easily reproduce multi-threading issues.
*/
-public class FOPTestbed extends AbstractLogEnabled
+public class FOPTestbed extends AbstractLogEnabled
implements Configurable, Initializable {
private int repeat;
@@ -57,7 +57,7 @@
private FOProcessor foprocessor;
private int counter = 0;
-
+
/** {@inheritDoc} */
public void configure(Configuration configuration) throws ConfigurationException {
this.threads = configuration.getChild("threads").getValueAsInteger(10);
@@ -83,7 +83,7 @@
getLogger().info("Starting stress test...");
long start = System.currentTimeMillis();
this.counter = 0;
-
+
//Initialize threads
List threadList = new java.util.LinkedList();
for (int ti = 0; ti < this.threads; ti++) {
@@ -92,13 +92,13 @@
Thread thread = new Thread(runner);
threadList.add(thread);
}
-
+
//Start threads
Iterator i = threadList.iterator();
while (i.hasNext()) {
((Thread)i.next()).start();
}
-
+
//Wait for threads to end
while (threadList.size() > 0) {
Thread t = (Thread)threadList.get(0);
@@ -116,7 +116,7 @@
}
private class TaskRunner extends AbstractLogEnabled implements Runnable {
-
+
public void run() {
try {
for (int r = 0; r < repeat; r++) {
@@ -134,14 +134,14 @@
}
}
-
+
/**
* Creates a new FOProcessor.
* @return the newly created instance
*/
public FOProcessor createFOProcessor() {
try {
- Class clazz = Class.forName(this.fopCfg.getAttribute("class",
+ Class clazz = Class.forName(this.fopCfg.getAttribute("class",
"org.apache.fop.threading.FOProcessorImpl"));
FOProcessor fop = (FOProcessor)clazz.newInstance();
ContainerUtil.enableLogging(fop, getLogger());
@@ -152,7 +152,7 @@
throw new CascadingRuntimeException("Error creating FO Processor", e);
}
}
-
+
private class TaskDef {
private String fo;
@@ -228,7 +228,7 @@
try {
InputStream in;
Templates templates;
-
+
if (def.getFO() != null) {
in = new java.io.FileInputStream(new File(def.getFO()));
templates = null;
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOProcessor.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOProcessor.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOProcessor.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOProcessorImpl.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOProcessorImpl.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOProcessorImpl.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/FOProcessorImpl.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -71,7 +71,7 @@
}
/** {@inheritDoc} */
- public void process(InputStream in, Templates templates, OutputStream out)
+ public void process(InputStream in, Templates templates, OutputStream out)
throws org.apache.fop.apps.FOPException, java.io.IOException {
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
Fop fop = fopFactory.newFop(this.mime, foUserAgent, out);
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/Main.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/Main.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/Main.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/threading/Main.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -39,7 +39,7 @@
System.out.print("Press return to continue...");
in.readLine();
}
-
+
/**
* Main method.
* @param args the command-line arguments
@@ -50,21 +50,21 @@
File cfgFile = new File(args[0]);
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
Configuration cfg = builder.buildFromFile(cfgFile);
-
+
boolean doPrompt = cfg.getAttributeAsBoolean("prompt", false);
if (doPrompt) {
prompt();
}
-
+
//Setup testbed
FOPTestbed testbed = new FOPTestbed();
ContainerUtil.enableLogging(testbed, new ConsoleLogger(ConsoleLogger.LEVEL_INFO));
ContainerUtil.configure(testbed, cfg);
ContainerUtil.initialize(testbed);
-
+
//Start tests
testbed.doStressTest();
-
+
System.exit(0);
} catch (Exception e) {
System.err.println(ExceptionUtil.printStackTrace(e));
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/traits/BorderPropsTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/traits/BorderPropsTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/traits/BorderPropsTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/traits/BorderPropsTestCase.java Fri Jul 25 05:44:20 2008
@@ -39,18 +39,18 @@
Color col = new Color(1.0f, 1.0f, 0.5f, 1.0f);
//Normalize: Avoid false alarms due to color conversion (rounding)
col = ColorUtil.parseColorString(null, ColorUtil.colorToString(col));
-
- BorderProps b1 = new BorderProps(Constants.EN_DOUBLE, 1250,
+
+ BorderProps b1 = new BorderProps(Constants.EN_DOUBLE, 1250,
col, BorderProps.COLLAPSE_OUTER);
String ser = b1.toString();
BorderProps b2 = BorderProps.valueOf(null, ser);
assertEquals(b1, b2);
- b1 = new BorderProps(Constants.EN_INSET, 9999,
+ b1 = new BorderProps(Constants.EN_INSET, 9999,
col, BorderProps.SEPARATE);
ser = b1.toString();
b2 = BorderProps.valueOf(null, ser);
assertEquals(b1, b2);
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java Fri Jul 25 05:44:20 2008
@@ -36,7 +36,7 @@
public void testFormatting() throws Exception {
String msg;
AdvancedMessageFormat format;
-
+
String pattern
= "Element \"{elementName}\" is missing[ required property \"{propertyName}\"]!";
format = new AdvancedMessageFormat(pattern);
@@ -45,14 +45,14 @@
params.put("node", new Object());
params.put("elementName", "fo:external-graphic");
params.put("propertyName", "src");
-
+
msg = format.format(params);
assertEquals("Element \"fo:external-graphic\" is missing required property \"src\"!", msg);
-
+
params.remove("propertyName");
msg = format.format(params);
assertEquals("Element \"fo:external-graphic\" is missing!", msg);
-
+
pattern
= "Testing \\{escaped \\[characters\\], now a normal field {elementName}!";
format = new AdvancedMessageFormat(pattern);
@@ -61,11 +61,11 @@
pattern = "Multi-conditional: [case1: {var1}|case2: {var2}|case3: {var3}]";
format = new AdvancedMessageFormat(pattern);
-
+
params = new java.util.HashMap();
msg = format.format(params);
assertEquals("Multi-conditional: ", msg);
-
+
params.put("var3", "value3");
msg = format.format(params);
assertEquals("Multi-conditional: case3: value3", msg);
@@ -73,11 +73,11 @@
msg = format.format(params);
assertEquals("Multi-conditional: case1: value1", msg);
}
-
+
public void testObjectFormatting() throws Exception {
String msg;
AdvancedMessageFormat format;
-
+
String pattern
= "Here's a Locator: {locator}";
format = new AdvancedMessageFormat(pattern);
@@ -87,15 +87,15 @@
loc.setColumnNumber(7);
loc.setLineNumber(12);
params.put("locator", loc);
-
+
msg = format.format(params);
assertEquals("Here\'s a Locator: 12:7", msg);
}
-
+
public void testIfFormatting() throws Exception {
String msg;
AdvancedMessageFormat format;
-
+
format = new AdvancedMessageFormat("You are{isBad,if, not} nice!");
Map params = new java.util.HashMap();
@@ -138,11 +138,11 @@
msg = format.format(params);
assertEquals("You are very, very nice!", msg);
}
-
+
public void testEqualsFormatting() throws Exception {
String msg;
AdvancedMessageFormat format;
-
+
format = new AdvancedMessageFormat(
"Error{severity,equals,EventSeverity:FATAL,,\nSome explanation!}");
@@ -156,11 +156,11 @@
msg = format.format(params);
assertEquals("Error\nSome explanation!", msg);
}
-
+
public void testChoiceFormatting() throws Exception {
String msg;
AdvancedMessageFormat format;
-
+
format = new AdvancedMessageFormat(
"You have {amount,choice,0#nothing|0<{amount} bucks|100<more than enough}.");
@@ -179,5 +179,5 @@
assertEquals("You have more than enough.", msg);
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ColorUtilTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ColorUtilTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ColorUtilTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ColorUtilTestCase.java Fri Jul 25 05:44:20 2008
@@ -39,16 +39,16 @@
public void testSerialization() throws Exception {
Color col = new Color(1.0f, 1.0f, 0.5f, 1.0f);
String s = ColorUtil.colorToString(col);
-
- //This is what the old color spit out. Now it is 80 due to rounding
+
+ //This is what the old color spit out. Now it is 80 due to rounding
//assertEquals("#ffff7f", s);
assertEquals("#ffff80", s);
-
+
col = new Color(1.0f, 0.0f, 0.0f, 0.8f);
s = ColorUtil.colorToString(col);
assertEquals("#ff0000cc", s);
}
-
+
/**
* Test deserialization from String.
* @throws Exception if an error occurs
@@ -66,7 +66,7 @@
assertEquals(0, col.getBlue());
assertEquals(204, col.getAlpha());
}
-
+
/**
* Test equals().
* @throws Exception if an error occurs
@@ -76,7 +76,7 @@
Color col2 = ColorUtil.parseColorString(null, "#ff0000cc");
assertEquals(col1, col2);
}
-
+
/**
* Tests the rgb() function.
* @throws Exception if an error occurs
@@ -85,7 +85,7 @@
FopFactory fopFactory = FopFactory.newInstance();
FOUserAgent ua = fopFactory.newFOUserAgent();
Color colActual;
-
+
colActual = ColorUtil.parseColorString(ua, "rgb(255, 40, 0)");
assertEquals(255, colActual.getRed());
assertEquals(40, colActual.getGreen());
@@ -93,7 +93,7 @@
assertEquals(255, colActual.getAlpha());
assertEquals(ColorSpace.getInstance(ColorSpace.CS_sRGB), colActual.getColorSpace());
}
-
+
/**
* Tests the fop-rgb-icc() function.
* @throws Exception if an error occurs
@@ -103,11 +103,11 @@
ColorSpace cs = fopFactory.getColorSpace(null,
"src/java/org/apache/fop/pdf/sRGB Color Space Profile.icm");
assertNotNull(cs);
-
-
+
+
FOUserAgent ua = fopFactory.newFOUserAgent();
ColorExt colActual;
-
+
//fop-rgb-icc() is used instead of rgb-icc() inside FOP!
String colSpec = "fop-rgb-icc(1.0,0.0,0.0,sRGBAlt,"
+ "\"src/java/org/apache/fop/pdf/sRGB Color Space Profile.icm\",1.0,0.0,0.0)";
@@ -125,7 +125,7 @@
assertEquals(1f, comps[0], 0);
assertEquals(0f, comps[1], 0);
assertEquals(0f, comps[2], 0);
-
+
assertEquals(colSpec, ColorUtil.colorToString(colActual));
colSpec = "fop-rgb-icc(1.0,0.5,0.0,blah,"
@@ -133,7 +133,7 @@
Color colFallback = ColorUtil.parseColorString(ua, colSpec);
assertEquals(new Color(1.0f, 0.5f, 0.0f), colFallback);
}
-
+
/**
* Tests the cmyk() function.
* @throws Exception if an error occurs
@@ -141,7 +141,7 @@
public void testCMYK() throws Exception {
ColorExt colActual;
String colSpec;
-
+
colSpec = "cmyk(0.0, 0.0, 1.0, 0.0)";
colActual = (ColorExt)ColorUtil.parseColorString(null, colSpec);
assertEquals(255, colActual.getRed());
@@ -155,7 +155,7 @@
assertEquals(1f, comps[2], 0);
assertEquals(0f, comps[3], 0);
assertEquals("cmyk(0.0,0.0,1.0,0.0)", ColorUtil.colorToString(colActual));
-
+
colSpec = "cmyk(0.0274, 0.2196, 0.3216, 0.0)";
colActual = (ColorExt)ColorUtil.parseColorString(null, colSpec);
assertEquals(248, colActual.getRed());
@@ -169,5 +169,5 @@
assertEquals(0f, comps[3], 0);
assertEquals("cmyk(0.0274,0.2196,0.3216,0.0)", ColorUtil.colorToString(colActual));
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ConsoleEventListenerForTests.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ConsoleEventListenerForTests.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ConsoleEventListenerForTests.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ConsoleEventListenerForTests.java Fri Jul 25 05:44:20 2008
@@ -28,11 +28,11 @@
public class ConsoleEventListenerForTests implements EventListener {
private String name;
-
+
public ConsoleEventListenerForTests(String name) {
this.name = name;
}
-
+
/** {@inheritDoc} */
public void processEvent(Event event) {
if (this.name != null) {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/DataURIResolverTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/DataURIResolverTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/DataURIResolverTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/DataURIResolverTestCase.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -35,7 +35,7 @@
public class DataURIResolverTestCase extends TestCase {
private static final byte[] TESTDATA = new byte[] {0, 1, 2, 3, 4, 5};
-
+
/**
* Tests DataURLUtil.
* @throws Exception if an error occurs
@@ -56,14 +56,14 @@
public void testNonMatchingContract() throws Exception {
URIResolver resolver = new DataURIResolver();
Source src;
-
+
src = resolver.resolve("http://xmlgraphics.apache.org/fop/index.html", null);
assertNull(src);
src = resolver.resolve("index.html", "http://xmlgraphics.apache.org/fop/");
assertNull(src);
}
-
+
private static boolean byteCmp(byte[] src, int srcOffset, byte[] cmp) {
for (int i = 0, c = cmp.length; i < c; i++) {
if (src[srcOffset + i] != cmp[i]) {
@@ -80,7 +80,7 @@
public void testDataURLHandling() throws Exception {
URIResolver resolver = new DataURIResolver();
Source src;
-
+
src = resolver.resolve("data:;base64,AAECAwQF", null);
assertNotNull(src);
StreamSource streamSource = (StreamSource)src;
@@ -112,5 +112,5 @@
assertEquals("A brief note", text);
*/
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/DigestFilter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/DigestFilter.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/DigestFilter.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/DigestFilter.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -38,7 +38,7 @@
* If the filter is namespace aware, the URI and local name for
* each element is digested, otherwise the QName. Attributes are
* sorted before the name-value pairs are digested.
- *
+ *
*/
public class DigestFilter extends XMLFilterImpl {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ElementListUtilsTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ElementListUtilsTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ElementListUtilsTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/ElementListUtilsTestCase.java Fri Jul 25 05:44:20 2008
@@ -50,16 +50,16 @@
lst.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, null, false));
lst.add(new KnuthGlue(0, Integer.MAX_VALUE, 0, null, false));
lst.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false, null, false));
-
+
boolean res = ElementListUtils.removeLegalBreaks(lst, 9000);
-
+
assertFalse(res);
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getP());
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getP());
assertEquals(0, ((KnuthPenalty)lst.get(5)).getP());
}
-
+
/**
* Tests ElementListUtils.removeLegalBreaks().
* @throws Exception if the test fails
@@ -76,11 +76,11 @@
lst.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, null, false));
lst.add(new KnuthGlue(0, Integer.MAX_VALUE, 0, null, false));
lst.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false, null, false));
-
+
boolean res = ElementListUtils.removeLegalBreaks(lst, 9000);
-
+
assertFalse(res);
-
+
//Must insert an INFINITE penalty
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getP());
assertEquals(0, ((KnuthGlue)lst.get(2)).getW());
@@ -88,7 +88,7 @@
assertEquals(0, ((KnuthGlue)lst.get(5)).getW());
assertEquals(0, ((KnuthGlue)lst.get(7)).getW());
}
-
+
/**
* Tests ElementListUtils.removeLegalBreaksFromEnd().
* @throws Exception if the test fails
@@ -105,16 +105,16 @@
lst.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, null, false));
lst.add(new KnuthGlue(0, Integer.MAX_VALUE, 0, null, false));
lst.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false, null, false));
-
+
boolean res = ElementListUtils.removeLegalBreaksFromEnd(lst, 9000);
-
+
assertFalse(res);
assertEquals(0, ((KnuthPenalty)lst.get(1)).getP());
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getP());
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getP());
}
-
+
/**
* Tests ElementListUtils.removeLegalBreaksFromEnd().
* @throws Exception if the test fails
@@ -131,9 +131,9 @@
lst.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, null, false));
lst.add(new KnuthGlue(0, Integer.MAX_VALUE, 0, null, false));
lst.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false, null, false));
-
+
boolean res = ElementListUtils.removeLegalBreaksFromEnd(lst, 9000);
-
+
assertFalse(res);
//Must insert an INFINITE penalty
@@ -142,6 +142,6 @@
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getP());
assertEquals(0, ((KnuthGlue)lst.get(6)).getW());
}
-
-
+
+
}
\ No newline at end of file
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/PDFNumberTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/PDFNumberTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/PDFNumberTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/PDFNumberTestCase.java Fri Jul 25 05:44:20 2008
@@ -39,14 +39,14 @@
assertEquals("0.1", PDFNumber.doubleOut(0.1f));
assertEquals("100", PDFNumber.doubleOut(100.0f));
assertEquals("100", PDFNumber.doubleOut(99.99999999999999999999999f));
-
- //You'd expect 100.123456 here but DecimalFormat uses the BigDecimal.ROUND_HALF_EVEN
+
+ //You'd expect 100.123456 here but DecimalFormat uses the BigDecimal.ROUND_HALF_EVEN
//strategy. I don't know if that's a problem. The strange thing testDoubleOut2
//seems to return the normally expected value. Weird.
assertEquals("100.123459", PDFNumber.doubleOut(100.12345611111111f));
assertEquals("-100.123459", PDFNumber.doubleOut(-100.12345611111111f));
}
-
+
/**
* Tests PDFNumber.doubleOut().
* @throws Exception if the test fails
@@ -61,7 +61,7 @@
assertEquals("100.1234", PDFNumber.doubleOut(100.12341111111111f, 4));
assertEquals("-100.1234", PDFNumber.doubleOut(-100.12341111111111f, 4));
}
-
+
/**
* Tests PDFNumber.doubleOut().
* @throws Exception if the test fails
@@ -74,7 +74,7 @@
assertEquals("100", PDFNumber.doubleOut(100.1234f, 0));
assertEquals("-100", PDFNumber.doubleOut(-100.1234f, 0));
}
-
+
/**
* Tests PDFNumber.doubleOut(). Special cases (former bugs).
* @throws Exception if the test fails
@@ -85,7 +85,7 @@
assertEquals("0", PDFNumber.doubleOut(d, 4));
assertEquals("0.00000572", PDFNumber.doubleOut(d, 8));
}
-
+
/**
* Tests PDFNumber.doubleOut(). Tests for wrong parameters.
* @throws Exception if the test fails
@@ -110,5 +110,5 @@
//we want that
}
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/UnitConvTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/UnitConvTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/UnitConvTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/UnitConvTestCase.java Fri Jul 25 05:44:20 2008
@@ -38,9 +38,9 @@
assertEquals("pt2mm", 297, UnitConv.pt2mm(841.890), 0.0001);
assertEquals("in2mpt", 792000, UnitConv.in2mpt(11.0), 1.0 / 2); //height of a letter page
assertEquals("mpt2in", 11.0, UnitConv.mpt2in(792000), 0.01 / 2); //height of a letter page
-
+
assertEquals("mm2px/72dpi", 841.8897764234434, UnitConv.mm2px(297.0, 72), 0);
assertEquals("mm2px/300dpi", 3507.8740684310146, UnitConv.mm2px(297.0, 300), 0);
}
-
+
}
\ No newline at end of file
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java Fri Jul 25 05:44:20 2008
@@ -35,7 +35,7 @@
getClass().getName(), Locale.ENGLISH, getClass().getClassLoader());
ResourceBundle bundleDE = XMLResourceBundle.getXMLBundle(
getClass().getName(), Locale.GERMAN, getClass().getClassLoader());
-
+
assertEquals("", bundle.getLocale().getLanguage());
assertEquals("de", bundleDE.getLocale().getLanguage());
@@ -46,7 +46,7 @@
assertEquals("Untranslatable", bundle.getString("untranslatable"));
assertEquals("Untranslatable", bundleDE.getString("untranslatable"));
}
-
+
public void testWithInvalidFile() throws Exception {
try {
ResourceBundle bundle = XMLResourceBundle.getXMLBundle(
@@ -56,5 +56,5 @@
//expected
}
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/visual/AbstractBitmapProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/visual/AbstractBitmapProducer.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/visual/AbstractBitmapProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/visual/AbstractBitmapProducer.java Fri Jul 25 05:44:20 2008
@@ -32,14 +32,14 @@
/** Logger */
protected static Log log = LogFactory.getLog(AbstractBitmapProducer.class);
-
+
/**
* Returns a new JAXP Transformer based on information in the ProducerContext.
* @param context context information for the process
* @return a new Transformer instance (identity or set up with a stylesheet)
* @throws TransformerConfigurationException in case creating the Transformer fails.
*/
- protected Transformer getTransformer(ProducerContext context)
+ protected Transformer getTransformer(ProducerContext context)
throws TransformerConfigurationException {
if (context.getTemplates() != null) {
return context.getTemplates().newTransformer();
@@ -47,5 +47,5 @@
return context.getTransformerFactory().newTransformer();
}
}
-
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org