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

[TEST_BUG] Incorrect binary comparison in java/awt/event/KeyEvent/ExtendedModifiersTest/ExtendedModifiersTest.java

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • client-libs
    • Test bug

    • b105
    • generic
    • generic

        The test does not compare correctly for validating the result.
        Test code is, as
         169 int modEx = modifiersEx & refMask;
         177 assertEQ(modifiersEx, modEx, "invalid extended modifiers");

         modEx & modifiersEx are compared for validating result.

        But actually,
        modEx & refMask should be compared.

        The test executes fine currently because,
        for each scenario refMask & modifiersEx are exactly same.

        We have to check if the particular mask bits are correctly set.

        for example,
        When calling runScenario() line number 220
        If we add InputEvent.ALT_DOWN_MASK in the second argument in addition to previous masks.
        The test still passes, where as it should fail.

              arapte Ambarish Rapte
              arapte Ambarish Rapte
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: