Skip to content

Overwriting tests #3123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 16, 2024
Prev Previous commit
Next Next commit
Update tests
  • Loading branch information
anfelor committed Oct 7, 2024
commit 4f178a06a85e113520ee9832dbb4e05bea512ba5
8 changes: 4 additions & 4 deletions ocaml/testsuite/tests/typing-unique/overwriting.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Line 2, characters 10-41:
2 | let x = overwrite_ r with { x = "foo" }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alert : Overwrite not implemented.
Uncaught exception: File "ocaml/parsing/location.ml", line 1112, characters 2-8: Assertion failed
Uncaught exception: File "ocaml/parsing/location.ml", line 1106, characters 2-8: Assertion failed

|}]

Expand All @@ -27,7 +27,7 @@ let update2 = update { x = "bar" }
Line 1, characters 14-20:
1 | let update2 = update { x = "bar" }
^^^^^^
Error: Unbound value update
Error: Unbound value "update"
|}]

(* Only global values may be written during overwrites,
Expand All @@ -40,7 +40,7 @@ Line 2, characters 11-36:
2 | exclave_ (overwrite_ r with { x })
^^^^^^^^^^^^^^^^^^^^^^^^^
Alert : Overwrite not implemented.
Uncaught exception: File "ocaml/parsing/location.ml", line 1112, characters 2-8: Assertion failed
Uncaught exception: File "ocaml/parsing/location.ml", line 1106, characters 2-8: Assertion failed

|}]

Expand All @@ -51,7 +51,7 @@ Line 2, characters 11-36:
2 | exclave_ (overwrite_ r with { x })
^^^^^^^^^^^^^^^^^^^^^^^^^
Alert : Overwrite not implemented.
Uncaught exception: File "ocaml/parsing/location.ml", line 1112, characters 2-8: Assertion failed
Uncaught exception: File "ocaml/parsing/location.ml", line 1106, characters 2-8: Assertion failed

|}]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ Line 5, characters 19-48:
5 | if b then p else overwrite_ p with { x = 2.0 }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alert : Overwrite not implemented.
Uncaught exception: File "ocaml/parsing/location.ml", line 1112, characters 2-8: Assertion failed
Uncaught exception: File "ocaml/parsing/location.ml", line 1106, characters 2-8: Assertion failed

|}]
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Line 2, characters 10-66:
2 | let q = overwrite_ p with { dim = 3; x = 2.0; y = 3.0; z = 4.0 } in
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alert : Overwrite not implemented.
Uncaught exception: File "ocaml/parsing/location.ml", line 1112, characters 2-8: Assertion failed
Uncaught exception: File "ocaml/parsing/location.ml", line 1106, characters 2-8: Assertion failed

|}]
(*
Expand All @@ -44,7 +44,7 @@ let test =
Line 4, characters 2-22:
4 | update_with_constant p == update_with_constant q
^^^^^^^^^^^^^^^^^^^^
Error: Unbound value update_with_constant
Error: Unbound value "update_with_constant"
|}]
(*
[%%expect{|
Expand All @@ -67,7 +67,7 @@ Line 2, characters 10-57:
2 | let q = overwrite_ p with { x = 2.0; y = 3.0; z = 4.0 } in
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alert : Overwrite not implemented.
Uncaught exception: File "ocaml/parsing/location.ml", line 1112, characters 2-8: Assertion failed
Uncaught exception: File "ocaml/parsing/location.ml", line 1106, characters 2-8: Assertion failed

|}]
(*
Expand All @@ -85,7 +85,7 @@ let test =
Line 4, characters 2-23:
4 | fupdate_with_constant p == fupdate_with_constant q
^^^^^^^^^^^^^^^^^^^^^
Error: Unbound value fupdate_with_constant
Error: Unbound value "fupdate_with_constant"
|}]
(*
[%%expect{|
Expand Down Expand Up @@ -180,7 +180,7 @@ Line 3, characters 19-48:
3 | if b then p else overwrite_ p with { x = 2.0 }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alert : Overwrite not implemented.
Uncaught exception: File "ocaml/parsing/location.ml", line 1112, characters 2-8: Assertion failed
Uncaught exception: File "ocaml/parsing/location.ml", line 1106, characters 2-8: Assertion failed

|}]
(*
Expand All @@ -196,8 +196,8 @@ let test =
Line 2, characters 4-17:
2 | ((constant_lift true).x, (constant_lift false).x, (constant_lift true).x)
^^^^^^^^^^^^^
Error: Unbound value constant_lift
Hint: Did you mean constant_list?
Error: Unbound value "constant_lift"
Hint: Did you mean "constant_list"?
|}]
(*
[%%expect{|
Expand Down
2 changes: 1 addition & 1 deletion ocaml/testsuite/tests/typing-unique/overwriting_map.ml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ Line 3, characters 16-51:
3 | | hd :: tl -> overwrite_ xs with f hd :: map f tl
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alert : Overwrite not implemented.
Uncaught exception: File "ocaml/parsing/location.ml", line 1112, characters 2-8: Assertion failed
Uncaught exception: File "ocaml/parsing/location.ml", line 1106, characters 2-8: Assertion failed

|}]
2 changes: 1 addition & 1 deletion ocaml/testsuite/tests/typing-unique/rbtree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,6 @@ Lines 114-117, characters 12-88:
116 | left = overwrite_ ll with Node { color = Black };
117 | right = overwrite_ t with Node { color = Black; left = l.right } }
Alert : Overwrite not implemented.
Uncaught exception: File "ocaml/parsing/location.ml", line 1112, characters 2-8: Assertion failed
Uncaught exception: File "ocaml/parsing/location.ml", line 1106, characters 2-8: Assertion failed

|}]
Loading