RFR: 8316306: Open source and convert manual Swing test

Harshitha Onkar honkar at openjdk.org
Tue Sep 19 00:30:40 UTC 2023


On Tue, 19 Sep 2023 00:07:33 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

> This is to convert and open source test: javax/swing/JToolBar/4203039/bug4203039.java 
> 
> This manual test now uses PassFailJFrame to handle the display for the instructions text as well as the pass/fail buttons.

test/jdk/javax/swing/JToolBar/bug4203039.java line 36:

> 34:  * @bug 4203039
> 35:  * @summary JToolBar needs a way to limit docking to a particular orientation
> 36:  * @library /java/awt/regtesthelpers

path to PassFailJFrame looks good.

test/jdk/javax/swing/JToolBar/bug4203039.java line 47:

> 45:             "installed components on the SOUTH\nand EAST, so verify the " +
> 46:             "toolbar cannot dock in those\nlocations but can dock on the " +
> 47:             "NORTH and WEST";

Suggestion:

   private static final String instructionsText = """
            This test is used to verify that application-installed
            components prevent the toolbar from docking in
            those locations.

            This test has installed components on the SOUTH
            and EAST, so verify the toolbar cannot dock in those
            locations but can dock on the NORTH and WEST""";

Use of text block looks cleaner here, eliminates the need of appending `\n` in between.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15806#discussion_r1329416315
PR Review Comment: https://git.openjdk.org/jdk/pull/15806#discussion_r1329417139


More information about the client-libs-dev mailing list