diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/type_of.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/type_of.ml b/test/type_of.ml index a387bf6..d2be5e7 100644 --- a/test/type_of.ml +++ b/test/type_of.ml @@ -26,6 +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 type_mismatch2 () = _test_instruction {|abc[''] = $Var|} (message Warn) let type_conversion () = @@ -75,7 +76,8 @@ let wrong_predicate () = let test = ( "Typechecking", [ - Alcotest.test_case "Assign" `Quick type_mismatch; + Alcotest.test_case "Assign str to int" `Quick type_mismatch; + Alcotest.test_case "Assign int to str" `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'; |