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

XMLWordPrintable

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

      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.

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

                Created:
                Updated:
                Resolved: