* FYI: AttributedCharacterIterator - new tests
@ 2006-09-11 14:18 David Gilbert
0 siblings, 0 replies; only message in thread
From: David Gilbert @ 2006-09-11 14:18 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
This patch (committed) adds some new tests for the
AttributedCharacterIterator:
2006-09-11 David Gilbert <david.gilbert@object-refinery.com>
* gnu/testlet/java/text/AttributedCharacterIterator/getRunLimit.java
(test1): Added checks,
*
gnu/testlet/java/text/AttributedCharacterIterator/Attribute/toString.java:
New test.
I've already committed a patch to GNU Classpath CVS to fix the failing
checks.
Regards,
Dave
[-- Attachment #2: diff.txt --]
[-- Type: text/plain, Size: 3253 bytes --]
Index: gnu/testlet/java/text/AttributedCharacterIterator/getRunLimit.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/AttributedCharacterIterator/getRunLimit.java,v
retrieving revision 1.1
diff -u -r1.1 getRunLimit.java
--- gnu/testlet/java/text/AttributedCharacterIterator/getRunLimit.java 11 Sep 2006 11:24:51 -0000 1.1
+++ gnu/testlet/java/text/AttributedCharacterIterator/getRunLimit.java 11 Sep 2006 14:14:17 -0000
@@ -49,11 +49,16 @@
AttributedString as = new AttributedString("ABCDEFGHIJ");
as.addAttribute(TextAttribute.LANGUAGE, "English");
as.addAttribute(TextAttribute.FOREGROUND, Color.red, 2, 4);
+ as.addAttribute(TextAttribute.BACKGROUND, Color.blue, 7, 8);
AttributedCharacterIterator aci = as.getIterator();
harness.check(aci.getRunLimit(), 2);
aci.setIndex(2);
harness.check(aci.getRunLimit(), 4);
aci.setIndex(5);
+ harness.check(aci.getRunLimit(), 7);
+ aci.setIndex(7);
+ harness.check(aci.getRunLimit(), 8);
+ aci.setIndex(8);
harness.check(aci.getRunLimit(), 10);
// try an empty string
Index: gnu/testlet/java/text/AttributedCharacterIterator/Attribute/toString.java
===================================================================
RCS file: gnu/testlet/java/text/AttributedCharacterIterator/Attribute/toString.java
diff -N gnu/testlet/java/text/AttributedCharacterIterator/Attribute/toString.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/java/text/AttributedCharacterIterator/Attribute/toString.java 11 Sep 2006 14:14:17 -0000
@@ -0,0 +1,42 @@
+/* toString.java -- some checks for the toString() method.
+ Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: 1.2
+
+package gnu.testlet.java.text.AttributedCharacterIterator.Attribute;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.text.AttributedCharacterIterator;
+
+public class toString implements Testlet
+{
+ public void test(TestHarness harness)
+ {
+ harness.check(AttributedCharacterIterator.Attribute.INPUT_METHOD_SEGMENT.toString(),
+ "java.text.AttributedCharacterIterator$Attribute(input_method_segment)");
+ harness.check(AttributedCharacterIterator.Attribute.LANGUAGE.toString(),
+ "java.text.AttributedCharacterIterator$Attribute(language)");
+ harness.check(AttributedCharacterIterator.Attribute.READING.toString(),
+ "java.text.AttributedCharacterIterator$Attribute(reading)");
+ }
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-09-11 14:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-11 14:18 FYI: AttributedCharacterIterator - new tests David Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).