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: fix for Utilities.getTabbedTextOffset test


Hi,
the attached changes the Utilities.getTabbedTextOffset test. I got confused
about the meaning of the methods arguments and made it dependent on the length
of the text. However the argument in question is a coordinate and has nothing to
do with the length. I added a note and changed the argument.

2006-04-27  Robert Schuster  <robertschuster@fsfe.org>

        * gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java:
        (test): Use fixed value to end loop.

cya
Robert
Index: gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java,v
retrieving revision 1.1
diff -u -r1.1 getTabbedTextOffset.java
--- gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java	27 Apr 2006 09:21:15 -0000	1.1
+++ gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java	27 Apr 2006 10:20:52 -0000
@@ -51,17 +51,19 @@
    */
   public void test(TestHarness harness)      
   {
+     // The x value that has to be reached before getTabbedTextOffset stops.
+     int endX = 50;
 
      harness.checkPoint("without rounding");
-     for (int i=0; i < s.count; i++)
+     for (int i=0; i <= endX; i++)
        harness.check(calculate(i, false), expectWithoutRounding(i));
 
      harness.checkPoint("with rounding");
-     for (int i=0; i < s.count; i++)
+     for (int i=0; i <= endX; i++)
        harness.check(calculate(i, true), expectWithRounding(i));
 
      harness.checkPoint("with rounding (implicit)");
-     for (int i=0; i < s.count; i++)
+     for (int i=0; i <= endX; i++)
        harness.check(calculate(i), expectWithRounding(i));
 
   }

Attachment: signature.asc
Description: OpenPGP digital signature


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