aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChimrod <>2024-03-31 18:03:58 +0200
committerChimrod <>2024-03-31 18:03:58 +0200
commitacc7d589ee6b0740af79abea0e29ccf504984fd1 (patch)
tree9d5b9c87af5ec1308e2e32ad613f770f9b36d5f3 /test
parentc4fd300e0f8ae3b638e1f4b1e340b3f38481d8e6 (diff)
Dedicated error message for '+ ='
Diffstat (limited to 'test')
-rw-r--r--test/syntax_error.ml12
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;
] )