Skip to content

Commit

Permalink
feat(objectionary#3744): fix all the unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Jan 15, 2025
1 parent a8ae7c4 commit 39b298a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ public void syntaxError(
final String[] names = parser.getRuleNames();
final String detailed;
if (names[EoParser.RULE_objects].equals(rule)) {
detailed = "Invalid object declaration";
detailed = "Invalid object list declaration";
} else if (names[EoParser.RULE_metas].equals(rule)) {
detailed = "Invalid meta declaration";
} else if (names[EoParser.RULE_program].equals(rule)) {
detailed = "Invalid program declaration";
} else if (names[EoParser.RULE_slave].equals(rule)) {
detailed = "Invalid objects declaration that may be used inside abstract object";
} else if (names[EoParser.RULE_object].equals(rule)) {
detailed = "Invalid object declaration";
} else {
detailed = "no viable alternative at input";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ line: 4
# Cryptic error message is returned when there are two empty lines between metas.
# The error message should be more informative and should highlight the exact location
# of the error.
message: |
message: |+
[4:0] error: 'Invalid program declaration'
input: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
---
line: 3
message: |-
[3:0] error: 'Invalid object declaration'
[3:0] error: 'Invalid object list declaration'
+meta other
^^^^^^^^^^
input: |
Expand Down

0 comments on commit 39b298a

Please sign in to comment.