This is the mail archive of the
mauve-discuss@sourceware.org
mailing list for the Mauve project.
RFC: fix for Mauve test javax/swing/Border/TitledBorder/constructors.java
- From: Pavel Tisnovsky <ptisnovs at redhat dot com>
- To: mauve-discuss at sourceware dot org
- Date: Fri, 02 Sep 2011 17:33:38 +0200
- Subject: RFC: fix for Mauve test javax/swing/Border/TitledBorder/constructors.java
Greetings,
here's fix for another Mauve test. In the test
"javax/swing/Border/TitledBorder/constructors.java" the position of the title in
the border should be compared with the constant TitledBorder.DEFAULT_POSITION,
not with TitledBorder.TOP, at least in cases when following constructors are used:
TitledBorder(Border border)
TitledBorder(Border border, String title)
TitledBorder(String title)
(there exist three other constructors where title position can be explicitly
specified, but the fix changes only test cases which use the previous three
constructors).
Here's proposed fix for the test:
--- javax/swing/border/Border/TitledBorder/constructors.java 2006-02-01
15:14:22.000000000 +0100
+++ javax/swing/border/Border/TitledBorder/constructors.java 2011-09-02
16:37:19.000000000 +0200
@@ -77,7 +77,7 @@
harness.check(tb.getTitleColor(), c);
Font f = UIManager.getLookAndFeelDefaults().getFont("TitledBorder.font");
harness.check(tb.getTitleFont(), f);
- harness.check(tb.getTitlePosition(), TitledBorder.TOP);
+ harness.check(tb.getTitlePosition(), TitledBorder.DEFAULT_POSITION);
harness.check(tb.getTitleJustification(), TitledBorder.LEADING);
tb = new TitledBorder((Border) null);
@@ -98,7 +98,7 @@
harness.check(tb.getTitleColor(), c);
Font f = UIManager.getLookAndFeelDefaults().getFont("TitledBorder.font");
harness.check(tb.getTitleFont(), f);
- harness.check(tb.getTitlePosition(), TitledBorder.TOP);
+ harness.check(tb.getTitlePosition(), TitledBorder.DEFAULT_POSITION);
harness.check(tb.getTitleJustification(), TitledBorder.LEADING);
tb = new TitledBorder((Border) null, "XYZ");
@@ -202,7 +202,7 @@
harness.check(tb.getTitleColor(), c);
Font f = UIManager.getLookAndFeelDefaults().getFont("TitledBorder.font");
harness.check(tb.getTitleFont(), f);
- harness.check(tb.getTitlePosition(), TitledBorder.TOP);
+ harness.check(tb.getTitlePosition(), TitledBorder.DEFAULT_POSITION);
harness.check(tb.getTitleJustification(), TitledBorder.LEADING);
tb = new TitledBorder((String) null);
~
Can anybody please review this change?
Thank you in advance,
Pavel