Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ulmer-a committed Aug 9, 2021
1 parent 313ccf9 commit 069bceb
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/parser/tests/parse_errors/parse_error_statements_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ fn invalid_variable_data_type_error_recovery() {
VAR
a DINT : ;
c : INT;
h , , : INT;
f , INT : ;
END_VAR
END_PROGRAM
");
Expand Down Expand Up @@ -345,7 +347,23 @@ fn invalid_variable_data_type_error_recovery() {
"DataTypeDefinition".into(),
"KeywordSemicolon".into(),
SourceRange::new(61..62)
)
),
Diagnostic::missing_token("KeywordColon".into(), SourceRange::new(108..109)),
Diagnostic::unexpected_token_found(
"DataTypeDefinition".into(),
"KeywordComma".into(),
SourceRange::new(108..109)
),
Diagnostic::unexpected_token_found(
"KeywordSemicolon".into(),
"', : INT'".into(),
SourceRange::new(108..115)
),
Diagnostic::unexpected_token_found(
"DataTypeDefinition".into(),
"KeywordSemicolon".into(),
SourceRange::new(143..144)
),
]
);
}
Expand Down

0 comments on commit 069bceb

Please sign in to comment.