@Test
public void testLineComment() {

  assertEquals(4, Patterns.lineComment("//").match("//ab", 0, 4));
  assertEquals(4, Patterns.lineComment("//").match("//ab\n", 0, 5));
  assertEquals(5, Patterns.lineComment("//").match("//ab\r\n", 0, 6));
  assertEquals(MISMATCH, Patterns.lineComment("//").match("/ab\r\n", 0, 6));
  assertEquals(MISMATCH, Patterns.lineComment("//").match("//ab\r\n", 0, 0));
}