On Mon, 19 Apr 2021 16:48:07 GMT, Ajit Ghaisas <aghai...@openjdk.org> wrote:
>> This PR enables ignored unit tests from MenuItemTest and fixes them. >> 4 ignored tests are fixed. >> 2 ignored tests are removed. >> 2 new tests are added. >> >> **Before fix :** >> total tests = 89 >> failures = 0 >> ignored tests = 6 >> >> **After fix :** >> total tests = 89 >> failures = 0 >> ignored tests = 0 > > modules/javafx.controls/src/test/java/test/javafx/scene/control/MenuItemTest.java > line 410: > >> 408: >> 409: @Test(expected=NullPointerException.class) >> 410: public void setSpecifiedAccelerator_nullKeyCombination1() { > > Constructing KeyCodeCombination with a null KeyCode & constructing a > KeyCharacterCombination with null key character results in > NullPointerException as present in KeyCombinationTest.java. > > These tests were ignored with a comment on similar lines. I have enabled them > and added expected NullPointerException. Where is the NPE thrown? I see that your change makes the test pass, but if it never gets to the `setAccelerator` call or the `assertEquals` statements maybe you could remove them? ------------- PR: https://git.openjdk.java.net/jfx/pull/466