RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v3]
Alexey Ivanov
aivanov at openjdk.java.net
Tue Feb 8 20:40:16 UTC 2022
On Mon, 7 Feb 2022 18:29:47 GMT, lawrence.andrews <duke at openjdk.java.net> wrote:
>> 1) Removed =yesno that was causing the test to fail with following exception
>> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno
>> After removing =yesno, test was just passing without user interaction so fixed the following
>>
>> Add the following so that user can user interact with the test
>> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected.
>> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results.
>>
>> @shurymury
>
> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:
>
> Dispose the frame via EDT
The second line with “This text should be solid black” that's rendered with `VALUE_TEXT_ANTIALIAS_GASP` isn't black for me, it uses gray AA. However, it remains black for `BufferedImage` case.
test/jdk/java/awt/Graphics/TextAAHintsTest.java line 2:
> 1: package awt;
> 2:
Usually tests are not part of any package.
test/jdk/java/awt/Graphics/TextAAHintsTest.java line 52:
> 50: import javax.swing.SwingUtilities;
> 51:
> 52: public class TextAAHintsTest extends Component {
There's an extra space before `extends`.
test/jdk/java/awt/Graphics/TextAAHintsTest.java line 177:
> 175: 1. Verify that first set of text are rendered correctly.
> 176: 2. Second set of text are created using BufferedImage of the first text.
> 177: 3. Third set of text are created using VolatileImage of the first text.
“are” → “is”: the _set_ is singular.
test/jdk/java/awt/Graphics/TextAAHintsTest.java line 180:
> 178: """;
> 179: TextArea instructionTextArea = new TextArea(instructions, 8, 50);
> 180: instructionTextArea.setEnabled(false);
Please leave it enabled but make it read-only (`setEditable(false)`). This way the text will be black and easier to read.
test/jdk/java/awt/Graphics/TextAAHintsTest.java line 191:
> 189: });
> 190: Button failButton = new Button("Fail");
> 191: failButton.addActionListener(e->{
Usually, there are spaces around `->` in lambda expressions.
This particular event handler isn't short. I suggest making it a static method or at least moving showing the dialog into a separate method. It'll make the code easier to read.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7275
More information about the client-libs-dev
mailing list