<AWT Dev> [9] Review Request: JDK-8081361 [TEST_BUG] Test java/awt/GridBagLayout/GridBagLayoutIpadXYTest/GridBagLayoutIpadXYTest fails

pooja chopra pooja.chopra at oracle.com
Tue Jun 30 09:26:32 UTC 2015


Hi Alexander,
I fixed the test to match the spec as mentioned 
https://docs.oracle.com/javase/8/docs/api/java/awt/GridBagLayout.html 
that the width of the component will be at least its minimum width plus 
ipadx pixels. Similarly, the height of the component will be at least 
the minimum height plus ipady pixels.

Whereas in the test it is checking for both to be equal and therefore 
test will fail for cases where component width or height is greater than 
minimum width plus ipadx pixels or minimum height plus ipady pixels.In 
the existing test the comparison is done as below :-

Dimension minSize = jtf.getMinimumSize();
         if ( minSize.width + customIpadx != jtf.getSize().width ||
              minSize.height + customIpady != jtf.getSize().height )

And I changed the comparison to match Spec as below :-

Dimension minSize = jtf.getMinimumSize();
          if (!(minSize.width + customIpadx <= jtf.getSize().width) ||
               !(minSize.height + customIpady <= jtf.getSize().height))

Regards,
Pooja
On 6/29/2015 4:55 PM, Alexander Scherbatiy wrote:
>
>
>  Hello Pooja,
>
>  What was the fix that causes the regression?
>
>  Thanks,
>  Alexandr.
>
> On 6/18/2015 12:22 PM, pooja chopra wrote:
>> Hello,
>> Please review a fix for issue:
>> 8081361 [TEST_BUG] Test 
>> java/awt/GridBagLayout/GridBagLayoutIpadXYTest/GridBagLayoutIpadXYTest fails 
>>
>>
>> Test bug fix.
>> https://bugs.openjdk.java.net/browse/JDK-8081361
>>
>> The webrev is : http://cr.openjdk.java.net/~pchopra/8081361/webrev.00/
>>
>> Regards,
>> Pooja
>



More information about the awt-dev mailing list