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: SwingUtilities.layoutCompoundLabel test fix


The SwingUtilities.layoutCompoundLabel test tests for some absolute size
values, where it must take the font metrics differences into account. I
fixed this.

2006-02-28  Roman Kennke  <kennke@aicas.com>

        * gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java:
        (test): Fixed some tests the take font metrics differences into
account.

/Roman
Index: gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java,v
retrieving revision 1.1
diff -u -r1.1 layoutCompoundLabel.java
--- gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java	3 Oct 2005 16:37:46 -0000	1.1
+++ gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java	28 Feb 2006 15:06:50 -0000
@@ -80,7 +80,7 @@
     harness.checkPoint("TL-text");
     displayText = SwingUtilities.layoutCompoundLabel(fm, text, icon, TOP, LEFT, CENTER, LEFT, viewR, iconR, textR, 3);
     harness.check(viewR, new Rectangle(10, 20, 100, 25));
-    harness.check(iconR, new Rectangle(10 + ww, 27, 0, 0));
+    harness.check(iconR, new Rectangle(10 + ww, 20 + hh / 2, 0, 0));
     harness.check(textR, new Rectangle(10, 20, ww, hh));
     
     harness.checkPoint("TC-text");
@@ -88,7 +88,7 @@
     textR = new Rectangle();
     displayText = SwingUtilities.layoutCompoundLabel(fm, text, icon, TOP, CENTER, CENTER, LEFT, viewR, iconR, textR, 3);
     harness.check(viewR, new Rectangle(10, 20, 100, 25));
-    harness.check(iconR, new Rectangle(60 + (ww + 1) / 2, 27, 0, 0));
+    harness.check(iconR, new Rectangle(60 + (ww + 1) / 2, 20 + hh / 2, 0, 0));
     harness.check(textR, new Rectangle(60 - ww / 2, 20, ww, hh));
     
     harness.checkPoint("TR-text");
@@ -96,7 +96,7 @@
     textR = new Rectangle();
     displayText = SwingUtilities.layoutCompoundLabel(fm, text, icon, TOP, RIGHT, CENTER, LEFT, viewR, iconR, textR, 3);
     harness.check(viewR, new Rectangle(10, 20, 100, 25));
-    harness.check(iconR, new Rectangle(110, 27, 0, 0));
+    harness.check(iconR, new Rectangle(110, 20 + hh / 2, 0, 0));
     harness.check(textR, new Rectangle(110 - ww, 20, ww, hh));
     
     harness.checkPoint("CL-text");

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