This is the mail archive of the
mauve-patches@sources.redhat.com
mailing list for the Mauve project.
Patch: FYI: New test forjava.text.AttributedStringIterator.runLimit
- From: Ziga Mahkovec <ziga dot mahkovec at klika dot si>
- To: mauve-patches at sources dot redhat dot com
- Date: Mon, 13 Jun 2005 19:38:30 +0200
- Subject: Patch: FYI: New test forjava.text.AttributedStringIterator.runLimit
I added a new test exposing a bug in
java.text.AttributedStringIterator.runLimit.
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.
--
Ziga
2005-06-13 Ziga Mahkovec <ziga.mahkovec@klika.si>
* gnu/testlet/java/text/AttributedString/Test.java: Added new test
exposing a runLimit bug.
Index: gnu/testlet/java/text/AttributedString/Test.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/AttributedString/Test.java,v
retrieving revision 1.2
diff -u -r1.2 Test.java
--- gnu/testlet/java/text/AttributedString/Test.java 28 Feb 2004 13:23:33 -0000 1.2
+++ gnu/testlet/java/text/AttributedString/Test.java 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("");
do
{