pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1773473 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormFlattenTest.java
Date Fri, 09 Dec 2016 20:59:14 GMT
Author: msahyoun
Date: Fri Dec  9 20:59:13 2016
New Revision: 1773473

URL: http://svn.apache.org/viewvc?rev=1773473&view=rev
Log:
PDFBOX-3262: add return code of render comparison. Add assertion for hidden fields test. 

Modified:
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormFlattenTest.java

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormFlattenTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormFlattenTest.java?rev=1773473&r1=1773472&r2=1773473&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormFlattenTest.java
(original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormFlattenTest.java
Fri Dec  9 20:59:13 2016
@@ -135,7 +135,7 @@ public class PDAcroFormFlattenTest {
 		String sourceUrl = "https://issues.apache.org/jira/secure/attachment/12792007/hidden_fields.pdf";
 		String targetFileName = "hidden_fields.pdf";
 		
-		flattenAndCompare(sourceUrl, targetFileName);       
+		assertTrue(flattenAndCompare(sourceUrl, targetFileName));       
     }
     	
 	/*
@@ -213,7 +213,7 @@ public class PDAcroFormFlattenTest {
 	/*
 	 * Flatten and compare with generated image samples.
 	 */
-	private static void flattenAndCompare(String sourceUrl, String targetFileName) throws IOException
+	private static boolean flattenAndCompare(String sourceUrl, String targetFileName) throws
IOException
 	{
 		
 		generateSamples(sourceUrl,targetFileName);
@@ -235,6 +235,7 @@ public class PDAcroFormFlattenTest {
             // don't fail, rendering is different on different systems, result must be viewed
manually
             System.out.println("Rendering of " + outputFile + " failed or is not identical
to expected rendering in " + IN_DIR + " directory");
             removeMatchingRenditions(inputFile);
+            return false;
         }
         else
         {
@@ -243,6 +244,8 @@ public class PDAcroFormFlattenTest {
         	inputFile.delete();
         	outputFile.delete();
         }
+        
+        return true;
 	}	
 	
 	/*



Mime
View raw message