summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2012-10-08 15:53:42 -0700
committerElliott Hughes <enh@google.com>2012-10-08 17:44:45 -0700
commitbf158e3aae95587aa11e1d89417c830905fbfe9c (patch)
treef65eaa67ccb41777a8a3c939f4248145499a2fd7
parent170bf8ee9a4f3df4515bd663def26cd721450012 (diff)
downloadapache-harmony-bf158e3aae95587aa11e1d89417c830905fbfe9c.tar.gz
Fix three harmony tests that failed on Android and the RI.
(cherry-pick of 55b505d649b4babcc8420673050cac50c9c41c9c.) Bug: 7288264 Bug: 7307154 Change-Id: I4cde772e8860b98cb01230c7628446a58cebc8c4
-rw-r--r--text/src/test/java/org/apache/harmony/text/tests/java/text/BreakIteratorTest.java19
1 files changed, 4 insertions, 15 deletions
diff --git a/text/src/test/java/org/apache/harmony/text/tests/java/text/BreakIteratorTest.java b/text/src/test/java/org/apache/harmony/text/tests/java/text/BreakIteratorTest.java
index bc30d1a..6593f5f 100644
--- a/text/src/test/java/org/apache/harmony/text/tests/java/text/BreakIteratorTest.java
+++ b/text/src/test/java/org/apache/harmony/text/tests/java/text/BreakIteratorTest.java
@@ -94,11 +94,7 @@ public class BreakIteratorTest extends TestCase {
fail("should throw illegal argument exception");
} catch (IllegalArgumentException e) {
}
- try {
- iterator.following(TEXT.length());
- fail("should throw illegal argument exception");
- } catch (IllegalArgumentException e) {
- }
+ assertEquals(BreakIterator.DONE, iterator.following(TEXT.length()));
}
public void testIsBoundary() {
@@ -116,11 +112,7 @@ public class BreakIteratorTest extends TestCase {
fail("should throw illegal argument exception");
} catch (IllegalArgumentException e) {
}
- try {
- iterator.isBoundary(TEXT.length());
- fail("should throw illegal argument exception");
- } catch (IllegalArgumentException e) {
- }
+ assertTrue(iterator.isBoundary(TEXT.length()));
}
public void testLast() {
@@ -158,11 +150,8 @@ public class BreakIteratorTest extends TestCase {
fail("should throw illegal argument exception");
} catch (IllegalArgumentException e) {
}
- try {
- iterator.preceding(TEXT.length());
- fail("should throw illegal argument exception");
- } catch (IllegalArgumentException e) {
- }
+ assertEquals(TEXT.length() - 1, iterator.preceding(TEXT.length()));
+ assertEquals(BreakIterator.DONE, iterator.preceding(0));
}
public void testPrevious() {