Skip to content

Commit

Permalink
Promote failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
liam923 committed Oct 14, 2024
1 parent d88bfc3 commit 3c12506
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/test-dirs/function-recovery.t
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
value_mode meet(local,once,nonportable)(modevar#0[global,many,portable .. global,many,nonportable]);join(aliased,contended)(modevar#1[aliased,uncontended .. unique,uncontended])
expression (type.ml[1,0+8]..type.ml[1,0+61])
extra
Texp_newtype' t/277
Texp_newtype t
Texp_function
alloc_mode map_comonadic(regional_to_global)(modevar#2[global,many,portable .. global,many,nonportable]);id(modevar#3[aliased,contended .. unique,uncontended])
[
Expand Down
8 changes: 4 additions & 4 deletions tests/test-dirs/mode-recovery.t
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Error from a closure lock

The error is reported
$ $MERLIN single errors -filename closure1.ml < closure1.ml | jq .value[].message -r
The value count is local, so cannot be used inside a closure that might escape.
The value count is local, so cannot be used inside a function that might escape.

We can locate the value that was used incorrectly
$ $MERLIN single locate -position 8:37 -filename closure1.ml < closure1.ml | jq .value.pos -c
Expand All @@ -81,8 +81,8 @@ Error from closure lock

The error is reported and foo still has mode nonportable
$ $MERLIN single errors -filename closure2.ml < closure2.ml | jq .value[].message -r
The value foo is nonportable, so cannot be used inside a closure that is portable.
The value bar is nonportable, so cannot be used inside a closure that is portable.
The value foo is nonportable, so cannot be used inside a function that is portable.
The value bar is nonportable, so cannot be used inside a function that is portable.

We can locate the values that were used incorrectly
$ $MERLIN single locate -position 7:13 -filename closrue2.ml < closure2.ml | jq .value.pos -c
Expand Down Expand Up @@ -135,7 +135,7 @@ The error is reported
"message": "x must have a type of layout value because it is captured by an object.
The layout of 'a is bits32
because of the definition of x at file \"unboxed.ml\", line 3, characters 10-14.
But the layout of 'a must be a sublayout of value
But the layout of 'a must overlap with value
because it's the type of a variable captured in an object."
}
],
Expand Down
4 changes: 0 additions & 4 deletions tests/test-dirs/typing-recovery.t
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,9 @@ make sure we also handle that correctly in structures:
Texp_tuple
alloc_mode meet(local,once,nonportable,map_comonadic(regional_to_global)(modevar#2[global,many,portable .. global,many,nonportable]));unique,uncontended
[
<tuple component>
Label: None
expression (test_ct.ml[3,20+24]..test_ct.ml[3,20+25])
Texp_constant Const_int 3
<tuple component>
Label: None
expression (test_ct.ml[3,20+27]..test_ct.ml[3,20+28])
Texp_constant Const_int 4
Expand Down Expand Up @@ -666,11 +664,9 @@ make sure we also handle that correctly in structures:
Texp_tuple
alloc_mode meet(local,once,nonportable,map_comonadic(regional_to_global)(modevar#4[global,many,portable .. global,many,nonportable]));unique,uncontended
[
<tuple component>
Label: None
expression (test_ct.ml[5,50+23]..test_ct.ml[5,50+24])
Texp_constant Const_int 3
<tuple component>
Label: None
expression (test_ct.ml[5,50+26]..test_ct.ml[5,50+27])
Texp_constant Const_int 4
Expand Down

0 comments on commit 3c12506

Please sign in to comment.