diff options
author | Chimrod <> | 2024-02-05 09:37:27 +0100 |
---|---|---|
committer | Chimrod <> | 2024-02-08 11:45:10 +0100 |
commit | 82c63921c09e2b07d3d5fbf82a912bbe707ffecb (patch) | |
tree | 74cae4200f0405eb2bb2f569d82afd28fe6e2332 /test | |
parent | e2bcf0a034b9c83b44158d299b2b255d328b17b0 (diff) |
Added a new error message
Diffstat (limited to 'test')
-rw-r--r-- | test/syntax_error.ml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/syntax_error.ml b/test/syntax_error.ml index 66f442d..f65042a 100644 --- a/test/syntax_error.ml +++ b/test/syntax_error.ml @@ -234,6 +234,20 @@ iif(1,0,0 + iif(1, 1, 2) |} { level = Error; loc = _position; message = "Unclosed `(`" } +let unclosed_act () = + _test_instruction {| + act 'Smthg': + else + end + end|} + { + level = Error; + loc = _position; + message = + "A block starting with `ACT` is not closed by `END`\n\ + If there are nested blocks, the error will points the highest block."; + } + let test = ( "Syntax Errors", [ @@ -253,4 +267,5 @@ let test = Alcotest.test_case "Location change" `Quick location_change; Alcotest.test_case "Misplaced if" `Quick misplaced_if; Alcotest.test_case "(()" `Quick unclosed_paren2; + Alcotest.test_case "act: else" `Quick unclosed_act; ] ) |