You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2020/12/16 11:33:44 UTC

svn commit: r1884498 - /pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/PDFontTest.java

Author: tilman
Date: Wed Dec 16 11:33:44 2020
New Revision: 1884498

URL: http://svn.apache.org/viewvc?rev=1884498&view=rev
Log:
PDFBOX-5048: fix assert calls and make public

Modified:
    pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/PDFontTest.java

Modified: pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/PDFontTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/PDFontTest.java?rev=1884498&r1=1884497&r2=1884498&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/PDFontTest.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/PDFontTest.java Wed Dec 16 11:33:44 2020
@@ -278,15 +278,15 @@ public class PDFontTest
      * @throws IOException 
      */
     @Test
-    void testPDFox5048() throws IOException
+    public void testPDFox5048() throws IOException
     {
         InputStream is = new URL("https://issues.apache.org/jira/secure/attachment/13017227/stringwidth.pdf").openStream();
         PDDocument doc = PDDocument.load(is);
         PDPage page = doc.getPage(0);
         PDFont font = page.getResources().getFont(COSName.getPDFName("F70"));
         Assert.assertTrue(font.isDamaged());
-        Assert.assertEquals(0, font.getHeight(0));
-        Assert.assertEquals(0, font.getStringWidth("Pa"));
+        Assert.assertEquals(0f, font.getHeight(0), 0);
+        Assert.assertEquals(0f, font.getStringWidth("Pa"), 0);
         doc.close();
         is.close();
     }