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

ComboBoxTest.ensureImpl_getPseudoClassStateReturnsValidValue() fails

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 8
    • 8
    • javafx

    Description

      It appears as if the sets are being modified in-place (rather than copied), which means that they are equal, when they shouldn't be. I have @Ignore'd this test for now. The test fails on the indicated line:

      @Test public void ensureImpl_getPseudoClassStateReturnsValidValue() {
              Set<PseudoClass> value1 = comboBox.getPseudoClassStates();
              assertFalse(comboBox.isEditable());
              assertTrue(value1.size() >= 0);
              
              comboBox.setEditable(true);
              Set<PseudoClass> value2 = comboBox.getPseudoClassStates();
              assertTrue(value2.contains(PseudoClass.getPseudoClass("editable")));
              
              comboBox.show();
              Set<PseudoClass> value3 = comboBox.getPseudoClassStates();
              assertTrue(value3.contains(PseudoClass.getPseudoClass("showing")));
              
              comboBox.arm();
              Set<PseudoClass> value4 = comboBox.getPseudoClassStates();
              assertTrue(value4.contains(PseudoClass.getPseudoClass("armed")));
              
              assertFalse(value1.equals(value2)); // TEST FAILS HERE
              assertFalse(value1.equals(value3));
              assertFalse(value1.equals(value4));
              assertFalse(value2.equals(value3));
              assertFalse(value2.equals(value4));
              assertFalse(value3.equals(value4));
          }

      Attachments

        Activity

          People

            dgrieve David Grieve
            jgiles Jonathan Giles
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: