RFR: 8314215: Trailing Spaces before Line Breaks Affect the Center Alignment of Text [v15]
Karthik P K
kpk at openjdk.org
Tue Apr 23 12:43:39 UTC 2024
On Mon, 12 Feb 2024 10:00:57 GMT, Karthik P K <kpk at openjdk.org> wrote:
>> John Hendrikx has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Change test to use the more common Arial font and add assumptions
>
> I ran the tests in my Mac system with macOS 14.3 and found 2 tests are failing with following error:
>
>
> TextLayoutTest > caseTest(Case) > test.com.sun.javafx.text.TextLayoutTest.caseTest(Case)[10] FAILED
> org.opentest4j.AssertionFailedError: left aligned rich text (spans): line 0 for Parameters[text=The quick brown लोमड़ी jumps over the lazy कुत्ता, wrapWidth=160.0, lineWidths=[158.1914, 93.134766]] ==> expected: <RectBounds { minX:0.0, minY:-10.863281, maxX:158.1914, maxY:2.9355469} (w:158.1914, h:13.798828)> but was: <RectBounds { minX:0.0, minY:-10.863281, maxX:155.3047, maxY:2.9355469} (w:155.3047, h:13.798828)>
> at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
> at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
> at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
> at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1152)
> at app//test.com.sun.javafx.text.TextLayoutTest.caseTest(TextLayoutTest.java:501)
>
> TextLayoutTest > caseTest(Case) > test.com.sun.javafx.text.TextLayoutTest.caseTest(Case)[11] FAILED
> org.opentest4j.AssertionFailedError: left aligned rich text (spans): line 0 for Parameters[text=The quick brown लोमड़ी jumps over the lazy कुत्ता, wrapWidth=160.0, lineWidths=[158.1914, 93.134766]] ==> expected: <RectBounds { minX:0.0, minY:-10.863281, maxX:158.1914, maxY:2.9355469} (w:158.1914, h:13.798828)> but was: <RectBounds { minX:0.0, minY:-10.863281, maxX:155.3047, maxY:2.9355469} (w:155.3047, h:13.798828)>
> at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
> at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
> at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
> at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1152)
> at app//test.com.sun.javafx.text.TextLayoutTest.caseTest(TextLayoutTest.java:501)
>
> TextLayoutTest > fixedComplexTestsToEnsureNoFurtherRegressions() SKIPPED
>
> TextLayoutTest > complexTestsThatAreBrokenSince2013() SKIPPED
>
>
> The failing tests are SOFT_WRAP_WITH_COMPLEX_TEXT and SOFT_WRAP_WITH_COMPLEX_TEXT_AND_EXTRA_SPACE.
>
> Added a minor comment inline as well.
> @karthikpandelu @kevinrushforth @andy-goryachev-oracle
>
> I split the failing Mac tests into Windows and Mac variants. However, the Mac specific tests probably still fail. If one of you could post the test errors, I can fix the values used as I don't have a Mac to test on.
Here is the result of TextLayoutTest in MacOS M1 system.
TextLayoutTest > caseTest(Case) > [12] SOFT_WRAP_WITH_COMPLEX_TEXT_ON_MAC FAILED
org.opentest4j.AssertionFailedError: left aligned rich text (spans): line 1 for SOFT_WRAP_WITH_COMPLEX_TEXT_ON_MAC ==> expected: <RectBounds { minX:0.0, minY:-10.863281, maxX:93.134766, maxY:2.9355469} (w:93.134766, h:13.798828)> but was: <RectBounds { minX:0.0, minY:-10.863281, maxX:91.04719, maxY:2.9355469} (w:91.04719, h:13.798828)>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1152)
at app//test.com.sun.javafx.text.TextLayoutTest.caseTest(TextLayoutTest.java:533)
TextLayoutTest > caseTest(Case) > [13] SOFT_WRAP_WITH_COMPLEX_TEXT_AND_EXTRA_SPACE_ON_MAC FAILED
org.opentest4j.AssertionFailedError: left aligned rich text (spans): line 1 for SOFT_WRAP_WITH_COMPLEX_TEXT_AND_EXTRA_SPACE_ON_MAC ==> expected: <RectBounds { minX:0.0, minY:-10.863281, maxX:93.134766, maxY:2.9355469} (w:93.134766, h:13.798828)> but was: <RectBounds { minX:0.0, minY:-10.863281, maxX:91.04719, maxY:2.9355469} (w:91.04719, h:13.798828)>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1152)
at app//test.com.sun.javafx.text.TextLayoutTest.caseTest(TextLayoutTest.java:533)
Following are the skipped tests:
TextLayoutTest > caseTest(Case) > [10] SOFT_WRAP_WITH_COMPLEX_TEXT_ON_WINDOWS SKIPPED
TextLayoutTest > caseTest(Case) > [11] SOFT_WRAP_WITH_COMPLEX_TEXT_AND_EXTRA_SPACE_ON_WINDOWS SKIPPED
TextLayoutTest > fixedComplexTestsToEnsureNoFurtherRegressions() SKIPPED
TextLayoutTest > complexTestsThatAreBrokenSince2013() SKIPPED
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1236#issuecomment-2072197356
More information about the openjfx-dev
mailing list