From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4928 invoked by alias); 31 Jan 2006 16:46:04 -0000 Received: (qmail 4834 invoked by uid 22791); 31 Jan 2006 16:46:01 -0000 X-Spam-Check-By: sourceware.org Received: from outmail128177.authsmtp.com (HELO outmail128177.authsmtp.com) (62.13.128.177) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 31 Jan 2006 16:45:50 +0000 Received: from [192.168.1.31] (host217-37-65-246.in-addr.btopenworld.com [217.37.65.246]) (authenticated bits=0) by squirrel.dmpriest.net.uk (8.13.3/8.13.3/Kp) with ESMTP id k0VGjjDb086298 for ; Tue, 31 Jan 2006 16:45:45 GMT (envelope-from david.gilbert@object-refinery.com) Message-ID: <43DF943F.6070909@object-refinery.com> Date: Tue, 31 Jan 2006 16:46:00 -0000 From: David Gilbert User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) MIME-Version: 1.0 To: mauve-patches@sources.redhat.com Subject: FYI: MetalRadioButtonUI test fixes Content-Type: multipart/mixed; boundary="------------030205070101080609070600" X-Server-Quench: 0653952e-9279-11da-84c5-001185d377ca X-Authentic-SMTP: 61633132333134.squirrel.dmpriest.net.uk:1.45/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-IsSubscribed: yes Mailing-List: contact mauve-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-patches-owner@sourceware.org X-SW-Source: 2006/txt/msg00073.txt.bz2 This is a multi-part message in MIME format. --------------030205070101080609070600 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 652 The expected results in the tests for the MetalRadioButtonUI class assumed the MetalLookAndFeel/DefaultMetalTheme is installed. This patch (committed) explicitly sets the laf/theme, because sometimes this isn't the default: 2006-01-31 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getDisabledTextColor.java (test): Set known theme in MetalLookAndFeel, * gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getFocusColor.java: (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getSelectColor.java: (test): Likewise. Regards, Dave --------------030205070101080609070600 Content-Type: text/plain; name="diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diff.txt" Content-length: 4237 Index: gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getDisabledTextColor.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getDisabledTextColor.java,v retrieving revision 1.1 diff -u -r1.1 getDisabledTextColor.java --- gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getDisabledTextColor.java 6 Sep 2005 20:43:10 -0000 1.1 +++ gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getDisabledTextColor.java 31 Jan 2006 16:38:38 -0000 @@ -25,7 +25,11 @@ import gnu.testlet.Testlet; import javax.swing.JRadioButton; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; import javax.swing.plaf.ColorUIResource; +import javax.swing.plaf.metal.DefaultMetalTheme; +import javax.swing.plaf.metal.MetalLookAndFeel; /** * Some checks for the getDisabledTextColor() method. @@ -40,6 +44,16 @@ */ public void test(TestHarness harness) { + // test with a known theme + try + { + MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); + UIManager.setLookAndFeel(new MetalLookAndFeel()); + } + catch (UnsupportedLookAndFeelException e) + { + e.printStackTrace(); + } // a new instance has no select color yet MyMetalRadioButtonUI ui = new MyMetalRadioButtonUI(); harness.check(ui.getDisabledTextColor(), null); Index: gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getFocusColor.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getFocusColor.java,v retrieving revision 1.1 diff -u -r1.1 getFocusColor.java --- gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getFocusColor.java 6 Sep 2005 20:43:10 -0000 1.1 +++ gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getFocusColor.java 31 Jan 2006 16:38:38 -0000 @@ -26,7 +26,11 @@ import gnu.testlet.Testlet; import javax.swing.JRadioButton; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; import javax.swing.plaf.ColorUIResource; +import javax.swing.plaf.metal.DefaultMetalTheme; +import javax.swing.plaf.metal.MetalLookAndFeel; /** * Some checks for the getFocusColor() method. @@ -41,6 +45,17 @@ */ public void test(TestHarness harness) { + // test with a known theme + try + { + MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); + UIManager.setLookAndFeel(new MetalLookAndFeel()); + } + catch (UnsupportedLookAndFeelException e) + { + e.printStackTrace(); + } + // a new instance has no select color yet MyMetalRadioButtonUI ui = new MyMetalRadioButtonUI(); harness.check(ui.getFocusColor(), null); Index: gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getSelectColor.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getSelectColor.java,v retrieving revision 1.1 diff -u -r1.1 getSelectColor.java --- gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getSelectColor.java 6 Sep 2005 20:43:10 -0000 1.1 +++ gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getSelectColor.java 31 Jan 2006 16:38:38 -0000 @@ -26,7 +26,11 @@ import gnu.testlet.Testlet; import javax.swing.JRadioButton; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; import javax.swing.plaf.ColorUIResource; +import javax.swing.plaf.metal.DefaultMetalTheme; +import javax.swing.plaf.metal.MetalLookAndFeel; /** * Some checks for the getSelectColor() method. @@ -41,6 +45,17 @@ */ public void test(TestHarness harness) { + // test with a known theme + try + { + MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); + UIManager.setLookAndFeel(new MetalLookAndFeel()); + } + catch (UnsupportedLookAndFeelException e) + { + e.printStackTrace(); + } + // a new instance has no select color yet MyMetalRadioButtonUI ui = new MyMetalRadioButtonUI(); harness.check(ui.getSelectColor(), null); --------------030205070101080609070600--