diff options
author | Chimrod <> | 2024-06-11 23:22:22 +0200 |
---|---|---|
committer | Chimrod <> | 2024-06-11 23:22:22 +0200 |
commit | e6053d23747c09acfb3169e923dbac0e5a02b495 (patch) | |
tree | 7bbf38d6662be7d0605ec9e6f009511f321b74a5 /test/type_of.ml | |
parent | 8f3f3589b949e1d6b8041414cec86f901d800b69 (diff) |
New tests and more typecheck
Diffstat (limited to 'test/type_of.ml')
-rw-r--r-- | test/type_of.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/type_of.ml b/test/type_of.ml index e5db14e..e5f7f9b 100644 --- a/test/type_of.ml +++ b/test/type_of.ml @@ -26,7 +26,7 @@ let _test_instruction : string -> Qsp_syntax.Report.t list -> unit = Check._test_instruction let type_mismatch () = _test_instruction {|abc = 'ABC'|} (message Error) -let assign_int_str () = _test_instruction {|$abc = 123|} [] +let assign_int_str () = _test_instruction {|$abc = 123|} (message Warn) let type_mismatch2 () = _test_instruction {|abc[''] = $Var|} (message Warn) let type_conversion () = @@ -80,7 +80,7 @@ let test = ( "Typechecking", [ Alcotest.test_case "Assign str to int" `Quick type_mismatch; - Alcotest.test_case "Assign int to str" `Quick assign_int_str; + Alcotest.test_case "$str = int" `Quick assign_int_str; Alcotest.test_case "Assign array" `Quick type_mismatch2; Alcotest.test_case "Conversion" `Quick type_conversion; Alcotest.test_case "Conversion'" `Quick type_conversion'; @@ -94,5 +94,5 @@ let test = Alcotest.test_case "Comparaison Mismatch" `Quick type_comparaison_mismatch; Alcotest.test_case "Wrong predicate" `Quick wrong_predicate; Alcotest.test_case "+(int, str)" `Quick concat_text; - Alcotest.test_case "str += int" `Quick increment_string; + Alcotest.test_case "str += int" `Quick increment_string; ] ) |