This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: MetalLookAndFeel - small test fixes


This patch (committed) fixes a small problem with the tests running on platforms where the OceanTheme is the default - the expected results assumed the DefaultMetalLookAndFeel:

2006-02-01 David Gilbert <david.gilbert@object-refinery.com>

* gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java
(test): Set a known theme at the start of the test,
* gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java
(test): Likewise.


Regards,

Dave
Index: gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java,v
retrieving revision 1.3
diff -u -r1.3 getAcceleratorForeground.java
--- gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java	3 Jan 2006 21:21:22 -0000	1.3
+++ gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java	1 Feb 2006 09:43:54 -0000
@@ -1,6 +1,6 @@
 // Tags: JDK1.2
 
-// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.com>
+// Copyright (C) 2005, 2006 David Gilbert <david.gilbert@object-refinery.com>
 
 // Mauve is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
 
 // 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.  */
+// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+// Boston, MA 02110-1301 USA.
 
 package gnu.testlet.javax.swing.plaf.metal.MetalLookAndFeel;
 
@@ -40,7 +40,7 @@
    * @param harness  the test harness (<code>null</code> not permitted).
    */
   public void test(TestHarness harness) {
-    new MetalLookAndFeel();
+    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
     ColorUIResource c = MetalLookAndFeel.getAcceleratorForeground();
     harness.check(c, new ColorUIResource(new Color(99, 130, 191)));
 
Index: gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java,v
retrieving revision 1.3
diff -u -r1.3 setCurrentTheme.java
--- gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java	3 Jan 2006 21:21:22 -0000	1.3
+++ gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java	1 Feb 2006 09:43:55 -0000
@@ -1,6 +1,6 @@
 // Tags: JDK1.2
 
-// Copyright (C) 2005 Roman Kennke <roman@kennke.org>
+// Copyright (C) 2005, 2006 Roman Kennke <roman@kennke.org>
 
 // This file is part of Mauve.
 
@@ -16,8 +16,8 @@
 
 // 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.
+// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+// Boston, MA 02110-1301 USA.
 
 package gnu.testlet.javax.swing.plaf.metal.MetalLookAndFeel;
 
@@ -39,6 +39,7 @@
 {
   public void test(TestHarness h)
   {
+    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
     MetalLookAndFeel laf = new MetalLookAndFeel();
     Color c1 = laf.getDefaults().getColor("Button.background");
     h.check(c1, new Color(238, 238, 238));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]