Skip to content

Commit

Permalink
Remove redundant code.
Browse files Browse the repository at this point in the history
  • Loading branch information
renggli committed May 21, 2018
1 parent 16f2176 commit f75031c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
64 changes: 32 additions & 32 deletions petitparser-core/src/test/java/org/petitparser/DeprecatedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,162 +11,162 @@
public class DeprecatedTest {

@Test
public void testAny() throws Exception {
public void testAny() {
assertNotNull(Chars.any());
}

@Test
public void testAny1() throws Exception {
public void testAny1() {
assertNotNull(Chars.any("Message"));
}

@Test
public void testAnyOf() throws Exception {
public void testAnyOf() {
assertNotNull(Chars.anyOf("abc"));
}

@Test
public void testAnyOf1() throws Exception {
public void testAnyOf1() {
assertNotNull(Chars.anyOf("abc", "Message"));
}

@Test
public void testCharacter() throws Exception {
public void testCharacter() {
assertNotNull(Chars.character('a'));
}

@Test
public void testCharacter1() throws Exception {
public void testCharacter1() {
assertNotNull(Chars.character('a', "Message"));
}

@Test
public void testDigit() throws Exception {
public void testDigit() {
assertNotNull(Chars.digit());
}

@Test
public void testDigit1() throws Exception {
public void testDigit1() {
assertNotNull(Chars.digit("Message"));
}

@Test
public void testLetter() throws Exception {
public void testLetter() {
assertNotNull(Chars.letter());
}

@Test
public void testLetter1() throws Exception {
public void testLetter1() {
assertNotNull(Chars.letter("Message"));
}

@Test
public void testLowerCase() throws Exception {
public void testLowerCase() {
assertNotNull(Chars.lowerCase());
}

@Test
public void testLowerCase1() throws Exception {
public void testLowerCase1() {
assertNotNull(Chars.lowerCase("Message"));
}

@Test
public void testPattern() throws Exception {
public void testPattern() {
assertNotNull(Chars.pattern("a"));
}

@Test
public void testPattern1() throws Exception {
public void testPattern1() {
assertNotNull(Chars.pattern("a", "Message"));
}

@Test
public void testRange() throws Exception {
public void testRange() {
assertNotNull(Chars.range('a', 'b'));
}

@Test
public void testRange1() throws Exception {
public void testRange1() {
assertNotNull(Chars.range('a', 'b', "Message"));
}

@Test
public void testUpperCase() throws Exception {
public void testUpperCase() {
assertNotNull(Chars.upperCase());
}

@Test
public void testUpperCase1() throws Exception {
public void testUpperCase1() {
assertNotNull(Chars.upperCase("Message"));
}

@Test
public void testWhitespace() throws Exception {
public void testWhitespace() {
assertNotNull(Chars.whitespace());
}

@Test
public void testWhitespace1() throws Exception {
public void testWhitespace1() {
assertNotNull(Chars.whitespace("Message"));
}

@Test
public void testWord() throws Exception {
public void testWord() {
assertNotNull(Chars.word());
}

@Test
public void testWord1() throws Exception {
public void testWord1() {
assertNotNull(Chars.word("Message"));
}

@Test
public void testEpsilon() throws Exception {
public void testEpsilon() {
assertNotNull(Parsers.epsilon());
}

@Test
public void testFailure() throws Exception {
public void testFailure() {
assertNotNull(Parsers.failure("Message"));
}

@Test
public void testString() throws Exception {
public void testString() {
assertNotNull(Parsers.string("abc"));
}

@Test
public void testString1() throws Exception {
public void testString1() {
assertNotNull(Parsers.string("abc", "Message"));
}

@Test
public void testStringIgnoreCase() throws Exception {
public void testStringIgnoreCase() {
assertNotNull(Parsers.stringIgnoreCase("abc"));
}

@Test
public void testStringIgnoreCase1() throws Exception {
public void testStringIgnoreCase1() {
assertNotNull(Parsers.stringIgnoreCase("abc", "Message"));
}

@Test
public void testParse() throws Exception {
public void testParse() {
Parsing.parse(Chars.character('a'), "a");
}

@Test
public void testAccepts() throws Exception {
public void testAccepts() {
Parsing.accepts(Chars.character('a'), "a");
}

@Test
public void testMatches() throws Exception {
public void testMatches() {
Parsing.matches(Chars.character('a'), "a");
}

@Test
public void testMatchesSkipping() throws Exception {
public void testMatchesSkipping() {
Parsing.matchesSkipping(Chars.character('a'), "a");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public Result parseOn(Context context) {
} else if (value == '&') {
Result result = ENTITY.parseOn(context.success(null, position));
if (result.isSuccess() && result.get() != null) {
output.append(input.substring(start, position));
output.append(input, start, position);
output.append((char) result.get());
position = result.getPosition();
start = position;
Expand All @@ -351,7 +351,7 @@ public Result parseOn(Context context) {
position++;
}
}
output.append(input.substring(start, position));
output.append(input, start, position);

// check for the minimum length
return output.length() < minLength
Expand Down

0 comments on commit f75031c

Please sign in to comment.