Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8264952

[TestBug] Controls unit tests - ControlTest and SpinnerTest fail for non US Locale

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      os_x

      Description

      Below unit test fails with the latest build on my macBook pro with macOS 10.15.7 if non US locale is set : (I tested with German locale)

      > Task :controls:test

      test.javafx.scene.control.SpinnerTest > test_jdk_8150946_testCommit_valid FAILED
          junit.framework.AssertionFailedError: expected:<2.5> but was:<2.0>
              at junit.framework.Assert.fail(Assert.java:47)
              at junit.framework.Assert.failNotEquals(Assert.java:283)
              at junit.framework.Assert.assertEquals(Assert.java:64)
              at junit.framework.Assert.assertEquals(Assert.java:71)
              at test.javafx.scene.control.SpinnerTest.test_jdk_8150946_testCommit_valid(SpinnerTest.java:1319)

      test.javafx.scene.control.SpinnerTest > dblSpinner_testToString_valueInRange FAILED
          junit.framework.ComparisonFailure: null expected:<0[.]3> but was:<0[,]3>
              at junit.framework.Assert.assertEquals(Assert.java:81)
              at junit.framework.Assert.assertEquals(Assert.java:87)
              at test.javafx.scene.control.SpinnerTest.dblSpinner_testToString_valueInRange(SpinnerTest.java:618)

      test.javafx.scene.control.SpinnerTest > dblSpinner_testFromString_valueInRange FAILED
          junit.framework.AssertionFailedError: expected:<0.3> but was:<0.0>
              at junit.framework.Assert.fail(Assert.java:47)
              at junit.framework.Assert.failNotEquals(Assert.java:283)
              at junit.framework.Assert.assertEquals(Assert.java:64)
              at junit.framework.Assert.assertEquals(Assert.java:71)
              at test.javafx.scene.control.SpinnerTest.dblSpinner_testFromString_valueInRange(SpinnerTest.java:626)

      test.javafx.scene.control.SpinnerTest > test_jdk_8150946_testCancel FAILED
          junit.framework.ComparisonFailure: null expected:<2[.]5> but was:<2[,]5>
              at junit.framework.Assert.assertEquals(Assert.java:81)
              at junit.framework.Assert.assertEquals(Assert.java:87)
              at test.javafx.scene.control.SpinnerTest.test_jdk_8150946_testCancel(SpinnerTest.java:1345)

      test.javafx.scene.control.ControlTest > testRT18097 FAILED
          java.lang.AssertionError: javafx.scene.control.DatePicker -fx-show-week-numbers expected:<false> but was:<true>
              at org.junit.Assert.fail(Assert.java:91)
              at org.junit.Assert.failNotEquals(Assert.java:645)
              at org.junit.Assert.assertEquals(Assert.java:126)
              at test.javafx.scene.control.ControlTest.checkClass(ControlTest.java:1049)
              at test.javafx.scene.control.ControlTest.checkDirectory(ControlTest.java:1080)
              at test.javafx.scene.control.ControlTest.recursiveCheck(ControlTest.java:1092)
              at test.javafx.scene.control.ControlTest.recursiveCheck(ControlTest.java:1095)
              at test.javafx.scene.control.ControlTest.recursiveCheck(ControlTest.java:1095)
              at test.javafx.scene.control.ControlTest.testRT18097(ControlTest.java:1007)

      7952 tests completed, 5 failed, 194 skipped

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aghaisas Ajit Ghaisas
              Reporter:
              aghaisas Ajit Ghaisas
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: