This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
FYI: new MetalBorders tests
- From: David Gilbert <david dot gilbert at object-refinery dot com>
- To: mauve-patches at sources dot redhat dot com
- Date: Tue, 20 Sep 2005 11:56:06 +0000
- Subject: FYI: new MetalBorders tests
I committed this patch:
2005-09-20 David Gilbert <david.gilbert@object-refinery.com>
*
gnu/testlet/javax/swing/plaf/metal/MetalBorders/getButtonBorder.java:
new test,
*
gnu/testlet/javax/swing/plaf/metal/MetalBorders/getDesktopIconBorder.java
(test): added check for UIResource,
*
gnu/testlet/javax/swing/plaf/metal/MetalBorders/getTextBorder.java: new
test,
*
gnu/testlet/javax/swing/plaf/metal/MetalBorders/getTextFieldBorder.java:
new test,
*
gnu/testlet/javax/swing/plaf/metal/MetalBorders/getToggleButtonBorder.java:
new test.
Regards,
Dave Gilbert
Index: gnu/testlet/javax/swing/plaf/metal/MetalBorders/getButtonBorder.java
===================================================================
RCS file: gnu/testlet/javax/swing/plaf/metal/MetalBorders/getButtonBorder.java
diff -N gnu/testlet/javax/swing/plaf/metal/MetalBorders/getButtonBorder.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/plaf/metal/MetalBorders/getButtonBorder.java 20 Sep 2005 10:52:24 -0000
@@ -0,0 +1,52 @@
+// Tags: JDK1.4
+
+// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.com>
+
+// This file is part of Mauve.
+
+// 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.javax.swing.plaf.metal.MetalBorders;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.Insets;
+
+import javax.swing.border.Border;
+import javax.swing.plaf.UIResource;
+import javax.swing.plaf.metal.MetalBorders;
+
+/**
+* Some tests for the MetalBorders.getButtonBorder() method.
+*/
+public class getButtonBorder implements Testlet
+{
+
+ /**
+ * Runs the test using the specified harness.
+ *
+ * @param harness the test harness (<code>null</code> not permitted).
+ */
+ public void test(TestHarness harness)
+ {
+ Border b = MetalBorders.getButtonBorder();
+ harness.check(b instanceof UIResource);
+ Insets insets = b.getBorderInsets(null);
+ harness.check(insets, new Insets(3, 3, 3, 3));
+ }
+
+}
Index: gnu/testlet/javax/swing/plaf/metal/MetalBorders/getDesktopIconBorder.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/metal/MetalBorders/getDesktopIconBorder.java,v
retrieving revision 1.1
diff -u -r1.1 getDesktopIconBorder.java
--- gnu/testlet/javax/swing/plaf/metal/MetalBorders/getDesktopIconBorder.java 13 Sep 2005 19:16:16 -0000 1.1
+++ gnu/testlet/javax/swing/plaf/metal/MetalBorders/getDesktopIconBorder.java 20 Sep 2005 10:52:24 -0000
@@ -27,8 +27,8 @@
import java.awt.Insets;
import javax.swing.border.Border;
+import javax.swing.plaf.UIResource;
import javax.swing.plaf.metal.MetalBorders;
-import javax.swing.plaf.metal.MetalBorders.ButtonBorder;
/**
* Some tests for the MetalBorders.getDesktopIconBorder() method.
@@ -44,6 +44,7 @@
public void test(TestHarness harness)
{
Border b = MetalBorders.getDesktopIconBorder();
+ harness.check(b instanceof UIResource);
Insets insets = b.getBorderInsets(null);
harness.check(insets, new Insets(3, 3, 2, 3));
}
Index: gnu/testlet/javax/swing/plaf/metal/MetalBorders/getTextBorder.java
===================================================================
RCS file: gnu/testlet/javax/swing/plaf/metal/MetalBorders/getTextBorder.java
diff -N gnu/testlet/javax/swing/plaf/metal/MetalBorders/getTextBorder.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/plaf/metal/MetalBorders/getTextBorder.java 20 Sep 2005 10:52:24 -0000
@@ -0,0 +1,52 @@
+// Tags: JDK1.4
+
+// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.com>
+
+// This file is part of Mauve.
+
+// 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.javax.swing.plaf.metal.MetalBorders;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.Insets;
+
+import javax.swing.border.Border;
+import javax.swing.plaf.UIResource;
+import javax.swing.plaf.metal.MetalBorders;
+
+/**
+* Some tests for the MetalBorders.getTextBorder() method.
+*/
+public class getTextBorder implements Testlet
+{
+
+ /**
+ * Runs the test using the specified harness.
+ *
+ * @param harness the test harness (<code>null</code> not permitted).
+ */
+ public void test(TestHarness harness)
+ {
+ Border b = MetalBorders.getTextBorder();
+ harness.check(b instanceof UIResource);
+ Insets insets = b.getBorderInsets(null);
+ harness.check(insets, new Insets(2, 2, 2, 2));
+ }
+
+}
Index: gnu/testlet/javax/swing/plaf/metal/MetalBorders/getTextFieldBorder.java
===================================================================
RCS file: gnu/testlet/javax/swing/plaf/metal/MetalBorders/getTextFieldBorder.java
diff -N gnu/testlet/javax/swing/plaf/metal/MetalBorders/getTextFieldBorder.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/plaf/metal/MetalBorders/getTextFieldBorder.java 20 Sep 2005 10:52:24 -0000
@@ -0,0 +1,52 @@
+// Tags: JDK1.4
+
+// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.com>
+
+// This file is part of Mauve.
+
+// 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.javax.swing.plaf.metal.MetalBorders;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.Insets;
+
+import javax.swing.border.Border;
+import javax.swing.plaf.UIResource;
+import javax.swing.plaf.metal.MetalBorders;
+
+/**
+* Some tests for the MetalBorders.getTextFieldBorder() method.
+*/
+public class getTextFieldBorder implements Testlet
+{
+
+ /**
+ * Runs the test using the specified harness.
+ *
+ * @param harness the test harness (<code>null</code> not permitted).
+ */
+ public void test(TestHarness harness)
+ {
+ Border b = MetalBorders.getTextFieldBorder();
+ harness.check(b instanceof UIResource);
+ Insets insets = b.getBorderInsets(null);
+ harness.check(insets, new Insets(2, 2, 2, 2));
+ }
+
+}
Index: gnu/testlet/javax/swing/plaf/metal/MetalBorders/getToggleButtonBorder.java
===================================================================
RCS file: gnu/testlet/javax/swing/plaf/metal/MetalBorders/getToggleButtonBorder.java
diff -N gnu/testlet/javax/swing/plaf/metal/MetalBorders/getToggleButtonBorder.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/plaf/metal/MetalBorders/getToggleButtonBorder.java 20 Sep 2005 10:52:24 -0000
@@ -0,0 +1,52 @@
+// Tags: JDK1.4
+
+// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.com>
+
+// This file is part of Mauve.
+
+// 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.javax.swing.plaf.metal.MetalBorders;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.Insets;
+
+import javax.swing.border.Border;
+import javax.swing.plaf.UIResource;
+import javax.swing.plaf.metal.MetalBorders;
+
+/**
+* Some tests for the MetalBorders.getToggleButtonBorder() method.
+*/
+public class getToggleButtonBorder implements Testlet
+{
+
+ /**
+ * Runs the test using the specified harness.
+ *
+ * @param harness the test harness (<code>null</code> not permitted).
+ */
+ public void test(TestHarness harness)
+ {
+ Border b = MetalBorders.getToggleButtonBorder();
+ harness.check(b instanceof UIResource);
+ Insets insets = b.getBorderInsets(null);
+ harness.check(insets, new Insets(3, 3, 3, 3));
+ }
+
+}