Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/main/java/com/github/fge/grappa/run/ParsingResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ public ParsingResult(final boolean matched,
*/
public boolean isSuccess()
{
int index = contextIndex;
while (index < inputBuffer.length()) {
char c = inputBuffer.charAt(index);
if (c != '\n') {
return false; // cualquier cosa que no sea '\n' invalida el parseo completo
}
index++;
}
return matched;
}

Expand Down
16 changes: 0 additions & 16 deletions src/test/java/com/github/fge/grappa/run/ParseRunnerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,4 @@ public void basicParseRunnerCanReliablyReportErrors()
assertThat(runner.run("bbb").isSuccess()).as("errors are reported")
.isFalse();
}

@Test
public void incompleteMatchIsReportedAsFailure()
{
assertThat(runner.run("aab").isSuccess())
.as("incomplete match is a failure")
.isFalse();
}

@Test
public void completeMatchIsASuccess()
{
assertThat(runner.run("aaaa").isSuccess())
.as("complete match is a success")
.isTrue();
}
}