Skip to content

Commit

Permalink
Merge pull request #5564 from mP1/feature/mP1-walkingkooka-text-curso…
Browse files Browse the repository at this point in the history
…r-parser-pull-246-ParserTesting-parseThrows-equals-message-was-contains

mP1/walkingkooka-text-cursor-parser#246 Parse…
  • Loading branch information
mP1 authored Jan 14, 2025
2 parents eaea16d + 6c4065d commit efab098
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5259,7 +5259,7 @@ public void testNumberFormatDigitExponentLessThanEqualsDigitFails() {
this.numberFormatParseThrows(
digit(),
exponent1(lessThanEquals()),
"Invalid character '<' at (4,1) expected NUMBER_NUMBER_NUMBER_TEXT | NUMBER_NUMBER_TEXT | NUMBER_TEXT | CONDITION_GENERAL_OR_NUMBER_COLO"
"Invalid character '<' at (4,1) expected NUMBER_NUMBER_NUMBER_TEXT | NUMBER_NUMBER_TEXT | NUMBER_TEXT | CONDITION_GENERAL_OR_NUMBER_COLOR"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ private void errorParserParseAndCheck(final String from,
public void testValueOrExpressionParserParseStarFails() {
this.valueOrExpressionParserParseFails(
"1+*",
"Invalid character '*' at (3,1)"
"Invalid character '*' at (3,1) expected BINARY_SUB_EXPRESSION"
);
}

Expand Down Expand Up @@ -3063,15 +3063,15 @@ private void valueOrExpressionParserParseNestedGroupAddition() {
public void testValueOrExpressionParserParseInvalidTokenFails() {
this.valueOrExpressionParserParseFails(
"!",
this.reporterMessage('!', 1, 1)
"Invalid character '!' at (1,1) expected EXPRESSION_OPT"
);
}

@Test
public void testValueOrExpressionParserParseInvalidTokenFails2() {
this.valueOrExpressionParserParseFails(
" !",
this.reporterMessage('!', 3, 1)
"Invalid character '!' at (3,1) expected EXPRESSION_OPT"
);
}

Expand All @@ -3088,24 +3088,18 @@ public void testValueOrExpressionParserParseInvalidBinaryTokenRightFailsDouble()
private void valueOrExpressionParserParseFails() {
this.valueOrExpressionParserParseFails(
"1+!",
this.reporterMessage('!', 3, 1)
"Invalid character '!' at (3,1) expected BINARY_SUB_EXPRESSION"
);
}

@Test
public void testParseInvalidGroupTokenFails() {
this.valueOrExpressionParserParseFails(
"( !",
this.reporterMessage('!', 3, 1)
"Invalid character '!' at (3,1) expected EXPRESSION_OPT"
);
}

private String reporterMessage(final char c,
final int column,
final int row) {
return "Invalid character " + CharSequences.quoteIfChars(c) + " at (" + column + "," + row + ")";
}

@Test
public void testParseAdditionBigDecimal() {
this.testParseAddition();
Expand Down

0 comments on commit efab098

Please sign in to comment.