RFR: 8342602: Remove JButton/PressedButtonRightClickTest test
Alexey Ivanov
aivanov at openjdk.org
Mon Oct 21 17:06:36 UTC 2024
On Mon, 21 Oct 2024 15:59:20 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> > Even though the tests verify slightly different conditions, the effect is the same. The button must remain pressed when right mouse button is pressed and released.
>
> But it's still a different condition, and removing the test will reduce coverage.
No, it will not reduce the coverage. If `model.isPressed()` returns `true`, it means the action event isn't triggered; if `model.isPressed()` becomes `false`, the action event is triggered.
Both tests verify *the same end result*: no action event is triggered if mouse button 3 is pressed and released while mouse button 1 is pressed. `bug4490179.java` does it explicitly whereas `PressedButtonRightClickTest.java` does it implicitly by checking the state of the button model.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21587#issuecomment-2427267520
More information about the client-libs-dev
mailing list