diff options
author | Chimrod <> | 2024-03-31 18:03:58 +0200 |
---|---|---|
committer | Chimrod <> | 2024-03-31 18:03:58 +0200 |
commit | acc7d589ee6b0740af79abea0e29ccf504984fd1 (patch) | |
tree | 9d5b9c87af5ec1308e2e32ad613f770f9b36d5f3 /test | |
parent | c4fd300e0f8ae3b638e1f4b1e340b3f38481d8e6 (diff) |
Dedicated error message for '+ ='
Diffstat (limited to 'test')
-rw-r--r-- | test/syntax_error.ml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/syntax_error.ml b/test/syntax_error.ml index f65042a..5587908 100644 --- a/test/syntax_error.ml +++ b/test/syntax_error.ml @@ -248,6 +248,17 @@ let unclosed_act () = If there are nested blocks, the error will points the highest block."; } +let unknown_operator () = + _test_instruction + {| + variable + = 1 +|} + { + level = Error; + loc = _position; + message = "Unknown operator. Did you write '+ =' instead of '+=' ?"; + } + let test = ( "Syntax Errors", [ @@ -268,4 +279,5 @@ let test = Alcotest.test_case "Misplaced if" `Quick misplaced_if; Alcotest.test_case "(()" `Quick unclosed_paren2; Alcotest.test_case "act: else" `Quick unclosed_act; + Alcotest.test_case "+ =" `Quick unknown_operator; ] ) |