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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Environment:

      Test bug

    • Subcomponent:
    • Resolved In Build:
      b105
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            arapte Ambarish Rapte
            Reporter:
            arapte Ambarish Rapte
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: