Skip to content

Commit fc7f491

Browse files
committed
Promote tests
1 parent 89713ed commit fc7f491

File tree

10 files changed

+87
-91
lines changed

10 files changed

+87
-91
lines changed

tests/test-dirs/alerts.t/run.t

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@
5252
The compiler accept both
5353
$ $OCAMLC -c main.ml
5454
File "main.ml", line 2, characters 8-12:
55-
2 | let x = sqrt 3.
56-
^^^^
5755
Alert deprecated: Lib.sqrt
5856
I am deprecated
5957

tests/test-dirs/document/unattached-comment.t

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ And that it also works outside of the current buffer:
1919

2020
$ $OCAMLC -c -bin-annot -w +50 test.ml
2121
File "test.ml", line 1, characters 14-42:
22-
1 | let foo x y = (** incorrect doc for foo *)
23-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2422
Warning 50 [unexpected-docstring]: unattached documentation comment (ignored)
2523

2624
$ $MERLIN single document -position 1:18 -filename outside.ml << EOF

tests/test-dirs/function-recovery.t

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"value": "[
1111
structure_item (test.ml[1,0+0]..test.ml[3,104+28])
1212
Tstr_module
13-
ERROR_locate_from_inside_function_literal_used_as_non_function/283
13+
ERROR_locate_from_inside_function_literal_used_as_non_function/284
1414
module_expr (test.ml[1,0+72]..test.ml[3,104+28])
1515
Tmod_structure
1616
[
@@ -19,9 +19,9 @@
1919
[
2020
<def>
2121
pattern (test.ml[2,79+6]..test.ml[2,79+13])
22-
Tpat_var \"problem/281\"
22+
Tpat_var \"problem/282\"
2323
sort value
24-
value_mode meet(local,once,nonportable,yielding,stateful)(modevar#4[global,many,portable,unyielding,stateless .. global,once,nonportable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#5[aliased,contended,immutable .. unique,uncontended,read_write])
24+
value_mode meet(local,once,nonportable,unforkable,yielding,stateful)(modevar#4[global,many,portable,forkable,unyielding,stateless .. global,once,nonportable,unforkable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#5[aliased,contended,immutable .. unique,uncontended,read_write])
2525
expression (test.ml[2,79+16]..test.ml[2,79+24])
2626
Texp_variant \"Problem\"
2727
None
@@ -36,7 +36,7 @@
3636
None
3737
expression (test.ml[3,104+11]..test.ml[3,104+28])
3838
Texp_function
39-
alloc_mode id(modevar#13[global,many,portable,unyielding,stateless .. local,once,nonportable,yielding,stateful]);id(modevar#14[aliased,contended,immutable .. unique,uncontended,read_write])
39+
alloc_mode id(modevar#13[global,many,portable,forkable,unyielding,stateless .. local,once,nonportable,unforkable,yielding,stateful]);id(modevar#14[aliased,contended,immutable .. unique,uncontended,read_write])
4040
[]
4141
Tfunction_body
4242
expression (test.ml[3,104+11]..test.ml[3,104+28])
@@ -49,7 +49,7 @@
4949
expression (_none_[0,0+-1]..[0,0+-1]) ghost
5050
Pexp_constant PConst_int (1,None)
5151
]
52-
Texp_ident \"*type-error*/282\"
52+
Texp_ident \"*type-error*/283\"
5353
]
5454
]
5555
]
@@ -69,14 +69,14 @@
6969
[
7070
<def>
7171
pattern (type.ml[1,0+4]..type.ml[1,0+5])
72-
Tpat_var \"f/281\"
72+
Tpat_var \"f/282\"
7373
sort value
74-
value_mode meet(local,once,nonportable,yielding,stateful)(modevar#2[global,many,portable,unyielding,stateless .. global,once,nonportable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#3[aliased,contended,immutable .. unique,uncontended,read_write])
74+
value_mode meet(local,once,nonportable,unforkable,yielding,stateful)(modevar#2[global,many,portable,forkable,unyielding,stateless .. global,once,nonportable,unforkable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#3[aliased,contended,immutable .. unique,uncontended,read_write])
7575
expression (type.ml[1,0+8]..type.ml[1,0+61])
7676
extra
7777
Texp_newtype t
7878
Texp_function
79-
alloc_mode map_comonadic(regional_to_global)(modevar#4[global,many,portable,unyielding,stateless .. global,once,nonportable,yielding,stateful]);id(modevar#5[aliased,contended,immutable .. unique,uncontended,read_write])
79+
alloc_mode map_comonadic(regional_to_global)(modevar#4[global,many,portable,forkable,unyielding,stateless .. global,once,nonportable,unforkable,yielding,stateful]);id(modevar#5[aliased,contended,immutable .. unique,uncontended,read_write])
8080
[
8181
Nolabel
8282
Param_pat
@@ -87,12 +87,12 @@
8787
Ttyp_constr \"list/11!\"
8888
[
8989
core_type (type.ml[1,0+28]..type.ml[1,0+29])
90-
Ttyp_constr \"t/283\"
90+
Ttyp_constr \"t/284\"
9191
[]
9292
]
93-
Tpat_var \"foo/284\"
93+
Tpat_var \"foo/285\"
9494
sort value
95-
value_mode map_comonadic(local_to_regional)(modevar#6[global,many,portable,unyielding,stateless .. local,once,nonportable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#7[aliased,contended,immutable .. unique,uncontended,read_write])
95+
value_mode map_comonadic(local_to_regional)(modevar#6[global,many,portable,forkable,unyielding,stateless .. local,once,nonportable,unforkable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#7[aliased,contended,immutable .. unique,uncontended,read_write])
9696
]
9797
Tfunction_body
9898
expression (type.ml[1,0+39]..type.ml[1,0+61])
@@ -103,7 +103,7 @@
103103
extra
104104
Tpat_extra_constraint
105105
core_type (type.ml[1,0+48]..type.ml[1,0+49])
106-
Ttyp_constr \"t/283\"
106+
Ttyp_constr \"t/284\"
107107
[]
108108
Tpat_any
109109
expression (type.ml[1,0+53]..type.ml[1,0+55])
@@ -116,7 +116,7 @@
116116
expression (_none_[0,0+-1]..[0,0+-1]) ghost
117117
Pexp_constant PConst_int (1,None)
118118
]
119-
Texp_ident \"*type-error*/285\"
119+
Texp_ident \"*type-error*/286\"
120120
]
121121
expression (type.ml[1,0+59]..type.ml[1,0+61])
122122
attribute \"merlin.loc\"
@@ -195,9 +195,9 @@
195195
"ghost": false,
196196
"attrs": [],
197197
"kind": "pattern (test.ml[1,0+4]..test.ml[1,0+5])
198-
Tpat_var \"f/281\"
198+
Tpat_var \"f/282\"
199199
sort value
200-
value_mode meet(local,once,nonportable,yielding,stateful)(modevar#2[global,many,portable,unyielding,stateless .. global,once,nonportable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#3[aliased,contended,immutable .. unique,uncontended,read_write])
200+
value_mode meet(local,once,nonportable,unforkable,yielding,stateful)(modevar#2[global,many,portable,forkable,unyielding,stateless .. global,once,nonportable,unforkable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#3[aliased,contended,immutable .. unique,uncontended,read_write])
201201
",
202202
"children": []
203203
},
@@ -228,9 +228,9 @@
228228
"ghost": false,
229229
"attrs": [],
230230
"kind": "pattern (test.ml[1,0+6]..test.ml[1,0+9])
231-
Tpat_var \"x/283\"
231+
Tpat_var \"x/284\"
232232
sort '_representable_layout_1
233-
value_mode map_comonadic(local_to_regional)(modevar#6[global,many,portable,unyielding,stateless .. local,once,nonportable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#7[aliased,contended,immutable .. unique,uncontended,read_write])
233+
value_mode map_comonadic(local_to_regional)(modevar#6[global,many,portable,forkable,unyielding,stateless .. local,once,nonportable,unforkable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#7[aliased,contended,immutable .. unique,uncontended,read_write])
234234
",
235235
"children": []
236236
},
@@ -460,9 +460,9 @@
460460
Tpat_construct \"Some\"
461461
[
462462
pattern (test.ml[4,57+9]..test.ml[4,57+12])
463-
Tpat_var \"_aa/284\"
463+
Tpat_var \"_aa/285\"
464464
sort value
465-
value_mode global,many,portable,unyielding,stateless;unique,uncontended,read_write
465+
value_mode global,many,portable,forkable,unyielding,stateless;unique,uncontended,read_write
466466
]
467467
None
468468
",
@@ -480,9 +480,9 @@
480480
"ghost": false,
481481
"attrs": [],
482482
"kind": "pattern (test.ml[4,57+9]..test.ml[4,57+12])
483-
Tpat_var \"_aa/284\"
483+
Tpat_var \"_aa/285\"
484484
sort value
485-
value_mode global,many,portable,unyielding,stateless;unique,uncontended,read_write
485+
value_mode global,many,portable,forkable,unyielding,stateless;unique,uncontended,read_write
486486
",
487487
"children": []
488488
}

tests/test-dirs/inconsistent-assumptions.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ Do an update that breaks the build:
6868
$ $OCAMLC -c -w @a-40-41-42-49-70 -short-paths -open My_lib__ -o my_lib__Bar bar.ml
6969
$ $OCAMLC -c -w @a-40-41-42-49-70 -short-paths -open My_lib__ -o my_lib__Foo foo.ml 2>&1 | head -n 3
7070
File "foo.ml", line 4, characters 11-12:
71-
4 | let x, _ = x + 1, Bar.b
72-
^
71+
Error: This expression has type char but an expression was expected of type
72+
int
7373
$ cd ..
7474

7575
Go to the file, and ask merlin to move you to the error:

tests/test-dirs/mode-recovery.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ The error is reported and foo still has mode nonportable
8787
> | revert-newlines \
8888
> | jq .value[].message -r
8989
The value foo is nonportable
90-
because it closes over the value y (at File "closure2.ml", line 3, characters 2-3)
90+
because it contains a usage (of the value y at File "closure2.ml", line 3, characters 2-3)
9191
which is expected to be uncontended.
92-
However, the highlighted expression is expected to be portable
92+
However, the highlighted value foo is expected to be portable
9393
because it is used inside a function which is expected to be portable.
9494
The value bar is nonportable but is expected to be portable
9595
because it is used inside a function which is expected to be portable.

tests/test-dirs/server-tests/typer-cache/stamps.t/run.t

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,31 @@ buffers, and different runs for the same buffer:
88
$ echo "let f x = x" | \
99
> $MERLIN server dump -what browse -filename test.ml | \
1010
> sed 's:\\n:\n:g' | grep Tpat_var
11-
Tpat_var \"f/281\"
12-
Tpat_var \"x/283\"
11+
Tpat_var \"f/282\"
12+
Tpat_var \"x/284\"
1313
1414
$ echo "let f x = let () = () in x" | \
1515
> $MERLIN server dump -what browse -filename test.ml | \
1616
> sed 's:\\n:\n:g' | grep Tpat_var
17-
Tpat_var \"f/284\"
18-
Tpat_var \"x/286\"
17+
Tpat_var \"f/285\"
18+
Tpat_var \"x/287\"
1919
2020
$ echo "let f x = x" | \
2121
> $MERLIN server dump -what browse -filename other_test.ml | \
2222
> sed 's:\\n:\n:g' | grep Tpat_var
23-
Tpat_var \"f/281\"
24-
Tpat_var \"x/283\"
23+
Tpat_var \"f/282\"
24+
Tpat_var \"x/284\"
2525
2626
$ echo "let f x = let () = () in x" | \
2727
> $MERLIN server dump -what browse -filename test.ml | \
2828
> sed 's:\\n:\n:g' | grep Tpat_var
29-
Tpat_var \"f/284\"
30-
Tpat_var \"x/286\"
29+
Tpat_var \"f/285\"
30+
Tpat_var \"x/287\"
3131
3232
$ echo "let f x = x" | \
3333
> $MERLIN server dump -what browse -filename test.ml | \
3434
> sed 's:\\n:\n:g' | grep Tpat_var
35-
Tpat_var \"f/287\"
36-
Tpat_var \"x/289\"
35+
Tpat_var \"f/288\"
36+
Tpat_var \"x/290\"
3737
3838
$ $MERLIN server stop-server

tests/test-dirs/type-enclosing/issue1335.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ provide better result.
8989
"line": 1,
9090
"col": 25
9191
},
92-
"type": "type t1 : value mod non_float = [ `A of [ `A of 'a | `B ] as 'a | `B ]",
92+
"type": "type t1 : immutable_data with t1 = [ `A of [ `A of 'a | `B ] as 'a | `B ]",
9393
"tail": "no"
9494
}
9595
],

tests/test-dirs/type-enclosing/kinds.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Non-Tconstr types
7575
Verbosity 0:
7676
type t = [ `Bar of int | `Foo ]
7777
Verbosity 1:
78-
type t : value mod non_float = [ `Bar of int | `Foo ]
78+
type t : immutable_data with int = [ `Bar of int | `Foo ]
7979

8080
Module types
8181
# CR-someday: Make kinds get printed when verbosity is 1

tests/test-dirs/type-enclosing/underscore-ids.t

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,9 @@ We try several places in the identifier to check the result stability
443443
[
444444
<def>
445445
pattern (under.ml[1,0+4]..under.ml[1,0+6])
446-
Tpat_var \"aa/281\"
446+
Tpat_var \"aa/282\"
447447
sort value
448-
value_mode meet(local,once,nonportable,yielding,stateful)(modevar#2[global,many,portable,unyielding,stateless .. global,once,nonportable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#3[aliased,contended,immutable .. unique,uncontended,read_write])
448+
value_mode meet(local,once,nonportable,unforkable,yielding,stateful)(modevar#2[global,many,portable,forkable,unyielding,stateless .. global,once,nonportable,unforkable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#3[aliased,contended,immutable .. unique,uncontended,read_write])
449449
expression (under.ml[1,0+9]..under.ml[1,0+12])
450450
Texp_constant Const_float 4.2
451451
]
@@ -454,19 +454,19 @@ We try several places in the identifier to check the result stability
454454
[
455455
<def>
456456
pattern (under.ml[2,13+4]..under.ml[2,13+5])
457-
Tpat_var \"f/282\"
457+
Tpat_var \"f/283\"
458458
sort value
459-
value_mode meet(local,once,nonportable,yielding,stateful)(modevar#9[global,many,portable,unyielding,stateless .. global,once,nonportable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#a[aliased,contended,immutable .. unique,uncontended,read_write])
459+
value_mode meet(local,once,nonportable,unforkable,yielding,stateful)(modevar#9[global,many,portable,forkable,unyielding,stateless .. global,once,nonportable,unforkable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#a[aliased,contended,immutable .. unique,uncontended,read_write])
460460
expression (under.ml[2,13+6]..under.ml[5,70+17]) ghost
461461
Texp_function
462-
alloc_mode map_comonadic(regional_to_global)(modevar#b[global,many,portable,unyielding,stateless .. global,once,nonportable,yielding,stateful]);id(modevar#c[aliased,contended,immutable .. unique,uncontended,read_write])
462+
alloc_mode map_comonadic(regional_to_global)(modevar#b[global,many,portable,forkable,unyielding,stateless .. global,once,nonportable,unforkable,yielding,stateful]);id(modevar#c[aliased,contended,immutable .. unique,uncontended,read_write])
463463
[
464464
Nolabel
465465
Param_pat
466466
pattern (under.ml[2,13+6]..under.ml[2,13+9])
467-
Tpat_var \"x/284\"
467+
Tpat_var \"x/285\"
468468
sort '_representable_layout_1
469-
value_mode map_comonadic(local_to_regional)(modevar#d[global,many,portable,unyielding,stateless .. local,once,nonportable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#e[aliased,contended,immutable .. unique,uncontended,read_write])
469+
value_mode map_comonadic(local_to_regional)(modevar#d[global,many,portable,forkable,unyielding,stateless .. local,once,nonportable,unforkable,yielding,stateful]);imply(unique,uncontended,read_write)(modevar#e[aliased,contended,immutable .. unique,uncontended,read_write])
470470
]
471471
Tfunction_body
472472
expression (under.ml[2,13+18]..under.ml[5,70+17])
@@ -479,7 +479,7 @@ We try several places in the identifier to check the result stability
479479
expression (_none_[0,0+-1]..[0,0+-1]) ghost
480480
Pexp_constant PConst_int (1,None)
481481
]
482-
Texp_ident \"*type-error*/287\"
482+
Texp_ident \"*type-error*/288\"
483483
]
484484
]
485485

0 commit comments

Comments
 (0)