From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5214 invoked by alias); 23 Aug 2005 14:04:13 -0000 Mailing-List: contact mauve-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sources.redhat.com Received: (qmail 5207 invoked by uid 22791); 23 Aug 2005 14:04:09 -0000 Received: from outmail128175.authsmtp.net (HELO squirrel.dmpriest.net.uk) (62.13.128.175) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 23 Aug 2005 14:04:09 +0000 Received: from [192.168.1.4] (host81-130-208-103.in-addr.btopenworld.com [81.130.208.103]) (authenticated bits=0) by squirrel.dmpriest.net.uk (8.13.3/8.13.3/Kp) with ESMTP id j7NE4792033471 for ; Tue, 23 Aug 2005 15:04:07 +0100 (BST) (envelope-from david.gilbert@object-refinery.com) Message-ID: <430B3AEE.3080506@object-refinery.com> Date: Tue, 23 Aug 2005 14:04:00 -0000 From: David Gilbert User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050728) MIME-Version: 1.0 To: mauve-discuss@sources.redhat.com Subject: FYI: new test for UIManager.LookAndFeelInfo constructor Content-Type: multipart/mixed; boundary="------------020404020501070206040301" X-Server-Quench: c586de69-13de-11da-a87f-001185d377ca X-Authentic-SMTP: 61633132333134.squirrel.dmpriest.net.uk:1.38/Kp X-Powered-By: AuthSMTP - http://www.authsmtp.com - Authenticated SMTP Mail Relay X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-SW-Source: 2005-q3/txt/msg00010.txt.bz2 This is a multi-part message in MIME format. --------------020404020501070206040301 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 231 I added this test while working on the UIManager class: 2005-08-23 David Gilbert * gnu/testlet/javax/swing/UIManager/LookAndFeelInfo/constructor.java: new file. Regards, Dave Gilbert --------------020404020501070206040301 Content-Type: text/plain; name="patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch.txt" Content-length: 2175 Index: gnu/testlet/javax/swing/UIManager/LookAndFeelInfo/constructor.java =================================================================== RCS file: gnu/testlet/javax/swing/UIManager/LookAndFeelInfo/constructor.java diff -N gnu/testlet/javax/swing/UIManager/LookAndFeelInfo/constructor.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/javax/swing/UIManager/LookAndFeelInfo/constructor.java 23 Aug 2005 14:01:31 -0000 @@ -0,0 +1,51 @@ +// Tags: JDK1.2 + +// Copyright (C) 2005 David Gilbert + +// 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, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. */ + +package gnu.testlet.javax.swing.UIManager.LookAndFeelInfo; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import javax.swing.UIManager.LookAndFeelInfo; + +/** + * Tests the constructor for the {@link LookAndFeelInfo} class. + */ +public class constructor implements Testlet { + + /** + * Runs the test using the specified harness. + * + * @param harness the test harness (null not permitted). + */ + public void test(TestHarness harness) + { + LookAndFeelInfo lafi = new LookAndFeelInfo("name", "class.name"); + harness.check(lafi.getName(), "name"); + harness.check(lafi.getClassName(), "class.name"); + + // try null name + lafi = new LookAndFeelInfo(null, "class.name"); + harness.check(lafi.getName(), null); + + // try null class + lafi = new LookAndFeelInfo("name", null); + harness.check(lafi.getClassName(), null); + } +} --------------020404020501070206040301--