RFR: 8328279: Convert java/awt/Cursor/CursorOverlappedPanelsTest test to main

Harshitha Onkar honkar at openjdk.org
Sat Mar 16 22:19:32 UTC 2024


On Fri, 15 Mar 2024 16:13:33 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

> Converted to a main manual test.

test/jdk/java/awt/Cursor/CursorOverlappedPanelsTest.java line 34:

> 32: import javax.swing.JPanel;
> 33: 
> 34: /**

Suggestion:

/*

test/jdk/java/awt/Cursor/CursorOverlappedPanelsTest.java line 56:

> 54:         frame.getContentPane().add(layeredPane);
> 55:         frame.pack();
> 56:         frame.setVisible(true);

frame.setVisible(true) can be removed, this avoid the test pane to appear initially at a different location and then switch the final location, additionally PassFailJFrame handles it.

test/jdk/java/awt/Cursor/CursorOverlappedPanelsTest.java line 85:

> 83:                 .title("Overlapping Panels Cursor Test Instructions")
> 84:                 .instructions(instructions)
> 85:                 .rows(4)

May be 5-6 rows looks better for the instruction length.
Using the below format avoids the need to specify a hardcoded row count number :)

Suggestion:

                .rows((int) instructions.lines().count() + 1)

test/jdk/java/awt/Cursor/CursorOverlappedPanelsTest.java line 91:

> 89:                 .awaitAndCheck();
> 90:     }
> 91: }

EOF newline missing.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18331#discussion_r1527004319
PR Review Comment: https://git.openjdk.org/jdk/pull/18331#discussion_r1527005718
PR Review Comment: https://git.openjdk.org/jdk/pull/18331#discussion_r1527007416
PR Review Comment: https://git.openjdk.org/jdk/pull/18331#discussion_r1527005886


More information about the client-libs-dev mailing list