You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "pj.fanning" <fa...@yahoo.com> on 2017/07/09 22:02:50 UTC

TestFonts failing on my laptop

Hi,
The new test, TestFonts, is failing on my laptop.
https://svn.apache.org/viewvc?view=revision&revision=1801329

I have a Mac and the font size seems to be 399 instead of the 312 expected
in the test.

java.lang.AssertionError: expected:<399.0> but was:<312.0>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:553)
	at org.junit.Assert.assertEquals(Assert.java:683)
	at org.apache.poi.sl.TestFonts.resizeToFitTextHSLF(TestFonts.java:90)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)





--
View this message in context: http://apache-poi.1045710.n5.nabble.com/TestFonts-failing-on-my-laptop-tp5728134.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: TestFonts failing on my laptop

Posted by Andreas Beeker <ki...@apache.org>.
Although the .ttf-Font is provided, the rendering can be quite different. [1]
That's the reason, why I'm trying to also execute the Job on the Windows machines too -
currently I'm playing around with Jenkins pipeline syntax.

What happens if you change something in GraphicsEnvironment.prefer*() ?

So as a quick fix, I would simply allow a few values.
Ignoring the returned value makes the whole test futile.

Andi


[1] https://stackoverflow.com/questions/26063828

On 7/10/17 12:02 AM, pj.fanning wrote:
> Hi,
> The new test, TestFonts, is failing on my laptop.
> https://svn.apache.org/viewvc?view=revision&revision=1801329
>
> I have a Mac and the font size seems to be 399 instead of the 312 expected
> in the test.
>



Re: TestFonts failing on my laptop

Posted by "pj.fanning" <fa...@yahoo.com>.
I'm temporarily commented out the assertion that was failing.
https://svn.apache.org/viewvc?view=revision&revision=1801395



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/TestFonts-failing-on-my-laptop-tp5728134p5728135.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org