From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30977 invoked by alias); 2 Nov 2005 16:39:14 -0000 Mailing-List: contact mauve-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sourceware.org Received: (qmail 30963 invoked by uid 22791); 2 Nov 2005 16:39:10 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 02 Nov 2005 16:39:10 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id jA2Gd8PV008495 for ; Wed, 2 Nov 2005 11:39:08 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id jA2Gd8V05647 for ; Wed, 2 Nov 2005 11:39:08 -0500 Received: from tow.toronto.redhat.com (tow.toronto.redhat.com [172.16.14.160]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id jA2Gd8Sh002808 for ; Wed, 2 Nov 2005 11:39:08 -0500 Subject: Re: FYI: New Test for Dialog From: Lillian Angel To: mauve-discuss@sources.redhat.com In-Reply-To: <1130944967.2872.68.camel@tow.toronto.redhat.com> References: <1130944967.2872.68.camel@tow.toronto.redhat.com> Content-Type: multipart/mixed; boundary="=-oJZ+olW1gKynJ6b4J1Ix" Date: Wed, 02 Nov 2005 16:39:00 -0000 Message-Id: <1130949547.2872.70.camel@tow.toronto.redhat.com> Mime-Version: 1.0 X-SW-Source: 2005-q4/txt/msg00023.txt.bz2 --=-oJZ+olW1gKynJ6b4J1Ix Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 479 Roman pointed out some problems with my last test case. Fixed. 2005-11-01 Lillian Angel * gnu/testlet/java/awt/Dialog/size.java: Fixed logic in test case. On Wed, 2005-11-02 at 10:22 -0500, Lillian Angel wrote: > Added a new test to make sure the Dialog is shown at the preferred size > if pack is not called before show. > > 2005-11-01 Lillian Angel > > * gnu/testlet/java/awt/Dialog/size.java: New Test. > > --=-oJZ+olW1gKynJ6b4J1Ix Content-Disposition: attachment; filename=size.java Content-Type: text/x-java; name=size.java; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 1588 // Tags: GUI JDK1.1 // Copyright (C) 2005 Red Hat // Mauve is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // Mauve is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Mauve; see the file COPYING. If not, write to // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301 USA. package gnu.testlet.java.awt.Dialog; import gnu.testlet.TestHarness; import gnu.testlet.Testlet; import java.awt.Dimension; import java.awt.Dialog; import java.awt.Frame; import java.awt.Label; public class size implements Testlet { /** * Runs the test using the specified harness. * * @param harness the test harness (null not permitted). */ public void test(TestHarness harness) { Dialog jd = new Dialog(new Frame()); jd.show(); jd.add(new Label("Hello world")); // jd insets may be larger than preferred size Dimension pref = jd.getPreferredSize(); Dimension size = jd.getSize(); System.err.println("size: " + size); System.err.println("pref: " + pref); harness.check(size.width >= pref.width); harness.check(size.height >= pref.height); } } --=-oJZ+olW1gKynJ6b4J1Ix--