Skip to content

Commit 3b70305

Browse files
Update too old cmp file for full compression test
Result file size became even less over time. DEVSIX-2180, DEVSIX-2349
1 parent b7e56a2 commit 3b70305

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

kernel/src/test/java/com/itextpdf/kernel/pdf/PdfStampingTest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ This file is part of the iText (R) project.
6666
import static org.junit.Assert.assertEquals;
6767
import static org.junit.Assert.assertFalse;
6868
import static org.junit.Assert.assertNotNull;
69+
import static org.junit.Assert.assertNull;
6970
import static org.junit.Assert.assertTrue;
7071

7172
@Category(IntegrationTest.class)
@@ -1254,13 +1255,17 @@ public void stampingTestWithTaggedStructure() throws IOException {
12541255

12551256
@Test
12561257
public void stampingTestWithFullCompression01() throws IOException, InterruptedException {
1258+
String outPdf = destinationFolder + "stampingTestWithFullCompression01.pdf";
1259+
String cmpPdf = sourceFolder + "cmp_stampingTestWithFullCompression01.pdf";
12571260
PdfDocument pdfDoc = new PdfDocument(new PdfReader(sourceFolder + "fullCompressedDocument.pdf"),
1258-
new PdfWriter(destinationFolder + "stampingTestWithFullCompression01.pdf"));
1261+
new PdfWriter(outPdf));
12591262
pdfDoc.close();
1260-
float result = new File(destinationFolder + "stampingTestWithFullCompression01.pdf").length();
1261-
float expected = new File(sourceFolder + "cmp_stampingTestWithFullCompression01.pdf").length();
1263+
float result = new File(outPdf).length();
1264+
float expected = new File(cmpPdf).length();
12621265
float coef = Math.abs((expected - result) / expected);
1266+
String compareRes = new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder);
12631267
assertTrue(coef < 0.01);
1268+
assertNull(compareRes);
12641269
}
12651270

12661271
@Test
-13 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)