commit | de473dd0a767a468fd2bd019273a7666676d212f | [log] [tgz] |
---|---|---|
author | Narayan Kamath <narayan@google.com> | Wed Jan 06 11:58:59 2016 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Wed Jan 06 11:58:59 2016 +0000 |
tree | 7a341899fcd4eaad80c0a3eeeed718a60008786a | |
parent | 2fd92974819b262cd4361750b645191c51202a6a [diff] | |
parent | c907a4c7191765bb5180c5941a4ddf31f56c33f6 [diff] |
Merge "Update bogus PatternSyntaxException test case."
diff --git a/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/PatternSyntaxExceptionTest.java b/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/PatternSyntaxExceptionTest.java index 0f9e1e6..6fbe9cf 100644 --- a/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/PatternSyntaxExceptionTest.java +++ b/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/PatternSyntaxExceptionTest.java
@@ -78,12 +78,14 @@ s = e.getMessage(); assertFalse(s.contains("^")); - // No pattern, but index specified + // No pattern, but index specified. NOTE: This is an "unusual" case since + // it make no sense to provide an index and not a pattern. e = new PatternSyntaxException("Foo", null, 0); assertEquals(0, e.getIndex()); s = e.getMessage(); - assertFalse(s.contains("^")); + assertTrue(s.contains("^")); + assertTrue(s.contains("null")); } public void testCase() {