Test that IllegalStateException is thrown if start/end are called before calling find
()
| 219 | * Test that IllegalStateException is thrown if start/end are called before calling find |
| 220 | */ |
| 221 | @Test |
| 222 | public void testStartEndBeforeFind() { |
| 223 | try { |
| 224 | Matcher m = Pattern.compile("a").matcher("abaca"); |
| 225 | m.start(); |
| 226 | fail(); |
| 227 | } catch (IllegalStateException ise) { |
| 228 | assertTrue(true); |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | /** |
| 233 | * Test for b/6891357. Basically matches should behave like find when it comes to updating the |