From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23702 invoked by alias); 7 Sep 2011 11:34:01 -0000 Received: (qmail 23570 invoked by uid 22791); 7 Sep 2011 11:34:00 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Sep 2011 11:33:25 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p87BXOk1015904 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 7 Sep 2011 07:33:25 -0400 Received: from dhcp-lab-190.englab.brq.redhat.com (dhcp-2-245.brq.redhat.com [10.34.2.245]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p87BXNtC003272; Wed, 7 Sep 2011 07:33:24 -0400 Message-ID: <4E6756FC.6010701@redhat.com> Date: Wed, 07 Sep 2011 11:34:00 -0000 From: Pavel Tisnovsky User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: Dr Andrew John Hughes CC: mauve-discuss@sourceware.org Subject: Re: RFC: fix for Mauve test javax/swing/JTextArea/prefferedSize.java References: <4E60E586.1010600@redhat.com> <20110902150332.GC19081@rivendell.middle-earth.co.uk> <4E60F1A3.1080909@redhat.com> <20110907023910.GJ19081@rivendell.middle-earth.co.uk> In-Reply-To: <20110907023910.GJ19081@rivendell.middle-earth.co.uk> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact mauve-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sourceware.org X-SW-Source: 2011-q3/txt/msg00017.txt.bz2 Dr Andrew John Hughes wrote: > On 17:09 Fri 02 Sep , Pavel Tisnovsky wrote: >> Dr Andrew John Hughes wrote: >>> On 16:17 Fri 02 Sep , Pavel Tisnovsky wrote: >>>> Greetings, >>>> >>>> I think that the last 6 checks contained in Mauve test >>>> "javax/swing/JTextArea/prefferedSize.java" should be changed. In the original >>>> test, the preferred width of the JTextArea is compared with 100 pixels after >>>> word line wrapping is enabled. >>>> >>>> But it does not make sense (IMHO) because the JTextArea contains only empty text >>>> or some NL characters ('\n'), which means, that preferred and minimum width of >>>> JTextArea should be 0 pixels, not 100 in both cases because empty text and NL >>>> sequence has only some non-zero height, but zero width. This behaviour is >>>> independent of auto wrapping and/or word wrapping. >>>> >>>> It's probably worth to add some check for preferred height. >>>> >>>> Here is proposed change to this test: >>>> >>>> --- preferredSize.java 2005-12-07 20:23:38.000000000 +0100 >>>> +++ prefferedsize.java 2011-09-02 16:02:00.000000000 +0200 >>>> @@ -51,14 +51,14 @@ >>>> ta2.setLineWrap(true); >>>> ta2.setWrapStyleWord(true); >>>> >>>> - harness.check (ta2.getPreferredSize().width == 100); >>>> - harness.check (view.getPreferredSpan(View.HORIZONTAL) == 100); >>>> + harness.check (ta2.getPreferredSize().width == 0); >>>> + harness.check (view.getPreferredSpan(View.HORIZONTAL) == 0); >>>> ta2.setText(""); >>>> - harness.check (ta2.getPreferredSize().width == 100); >>>> - harness.check (view.getPreferredSpan(View.HORIZONTAL) == 100); >>>> + harness.check (ta2.getPreferredSize().width == 0); >>>> + harness.check (view.getPreferredSpan(View.HORIZONTAL) == 0); >>>> ta2.setText("\n\n\n\n\n\n\n\n\n"); >>>> - harness.check (ta2.getPreferredSize().width == 100); >>>> - harness.check (view.getPreferredSpan(View.HORIZONTAL) == 100); >>>> + harness.check (ta2.getPreferredSize().width == 0); >>>> + harness.check (view.getPreferredSpan(View.HORIZONTAL) == 0); >>>> } >>>> catch (Exception e) >>>> { >>>> ~ >>>> >>>> Is it possible to change this test case please? >>>> >>>> Cheers, >>>> Pavel >>> Do tests still pass with these changes? >> yes > > On both OpenJDK and GNU Classpath? They pass only on OpenJDK. On GNU Classpath (4.4.4), some tests failed regardless of whether the patch has been applied or not. But the failures occurred on previous test not touched by the patch: ta2.setText(""); harness.check (ta2.getPreferredSize().width == 0); harness.check (view.getPreferredSpan(View.HORIZONTAL) == 0); ta2.setText("\n\n\n\n\n\n\n\n\n"); harness.check (ta2.getPreferredSize().width == 0); harness.check (view.getPreferredSpan(View.HORIZONTAL) == 0); before the line wrap & word wrap is enabled. The proposed patch fixes other failures on OpenJDK & GNU Classpath too, ie: OpenJDK: 6 failures -> 0 failures GNU Classpath: 8 failures -> 2 failures Pavel