MCPcopy Create free account
hub / github.com/google/re2j / testStartEndBeforeFind

Method testStartEndBeforeFind

javatests/com/google/re2j/MatcherTest.java:221–230  ·  view source on GitHub ↗

Test that IllegalStateException is thrown if start/end are called before calling find

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

compileMethod · 0.95
startMethod · 0.95
failMethod · 0.80
matcherMethod · 0.45

Tested by

no test coverage detected