This is the mail archive of the 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]

Patch: FYI: New test forjava.text.AttributedStringIterator.runLimit

I added a new test exposing a bug in

According to the Javadoc, runLimit:

"Returns the index of the first character following the run with respect
to the given attribute containing the current character."

In this case, Classpath returns returns 23, even though that's where the
iterator was positioned.


2005-06-13  Ziga Mahkovec  <>

	* gnu/testlet/java/text/AttributedString/ Added new test
	exposing a runLimit bug.

Index: gnu/testlet/java/text/AttributedString/
RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/AttributedString/,v
retrieving revision 1.2
diff -u -r1.2
--- gnu/testlet/java/text/AttributedString/	28 Feb 2004 13:23:33 -0000	1.2
+++ gnu/testlet/java/text/AttributedString/	13 Jun 2005 17:15:40 -0000
@@ -60,6 +60,11 @@
   int rl = aci.getRunLimit();
   harness.check(rl, 23, "getRunLimit");
+  aci.setIndex(rl);
+  rl = aci.getRunLimit(AttributedCharacterIterator.Attribute.LANGUAGE);
+  harness.check(rl, 29, "getRunLimit");
+  aci.first();
   StringBuffer result = new StringBuffer("");

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