Skip to content

Commit

Permalink
test: promote positive changes to the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Dec 1, 2022
1 parent b21c8ba commit a1ffdc0
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 23 deletions.
4 changes: 2 additions & 2 deletions tests/test-dirs/locate-type.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"file": "$TESTCASE_ROOT/a.ml",
"pos": {
"line": 2,
"col": 2
"col": 7
}
},
"notifications": []
Expand All @@ -20,7 +20,7 @@
"file": "$TESTCASE_ROOT/a.ml",
"pos": {
"line": 2,
"col": 2
"col": 7
}
},
"notifications": []
Expand Down
6 changes: 3 additions & 3 deletions tests/test-dirs/locate/context-detection/cd-field.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"file": "$TESTCASE_ROOT/field.ml",
"pos": {
"line": 1,
"col": 0
"col": 5
}
},
"notifications": []
Expand All @@ -19,7 +19,7 @@
"file": "$TESTCASE_ROOT/field.ml",
"pos": {
"line": 1,
"col": 0
"col": 5
}
},
"notifications": []
Expand All @@ -34,7 +34,7 @@ the field bar rather than the identifier.
"file": "$TESTCASE_ROOT/field.ml",
"pos": {
"line": 10,
"col": 2
"col": 7
}
},
"notifications": []
Expand Down
4 changes: 2 additions & 2 deletions tests/test-dirs/locate/context-detection/cd-label.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
}

FIXME: this is not a very satisfying answer.
We could expect 2:12 or at least 2:4
We could expect 2:12
$ $MERLIN single locate -look-for ml -position 3:24 \
> -filename ./record.ml < ./record.ml | jq '.value'
{
"file": "$TESTCASE_ROOT/record.ml",
"pos": {
"line": 1,
"col": 0
"col": 5
}
}

Expand Down
18 changes: 14 additions & 4 deletions tests/test-dirs/locate/context-detection/cd-test.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Trying them all:
"notifications": []
}

FIXME we would expect 3:13

$ $MERLIN single locate -look-for ml -position 7:17 -filename ./test.ml < ./test.ml
{
"class": "return",
Expand Down Expand Up @@ -54,14 +56,16 @@ FIXME this should say "Already at definition point" (we're defining the label):
"notifications": []
}

We expect 1:5

$ $MERLIN single locate -look-for ml -position 13:16 -filename ./test.ml < ./test.ml
{
"class": "return",
"value": {
"file": "$TESTCASE_ROOT/test.ml",
"pos": {
"line": 1,
"col": 0
"col": 5
}
},
"notifications": []
Expand Down Expand Up @@ -89,14 +93,16 @@ FIXME we failed to parse/reconstruct the ident, that's interesting
"notifications": []
}

We expect 1:5

$ $MERLIN single locate -look-for ml -position 16:20 -filename ./test.ml < ./test.ml
{
"class": "return",
"value": {
"file": "$TESTCASE_ROOT/test.ml",
"pos": {
"line": 1,
"col": 0
"col": 5
}
},
"notifications": []
Expand All @@ -115,6 +121,8 @@ FIXME we failed to parse/reconstruct the ident, that's interesting
"notifications": []
}

FIXME unprecise, we expect 11:11

$ $MERLIN single locate -look-for ml -position 18:15 -filename ./test.ml < ./test.ml
{
"class": "return",
Expand Down Expand Up @@ -144,14 +152,16 @@ FIXME this should jump to line 11:
"notifications": []
}

FIXME unprecise, we want 13:12

$ $MERLIN single locate -look-for ml -position 23:13 -filename ./test.ml < ./test.ml
{
"class": "return",
"value": {
"file": "$TESTCASE_ROOT/test.ml",
"pos": {
"line": 13,
"col": 0
"col": 5
}
},
"notifications": []
Expand All @@ -177,7 +187,7 @@ FIXME this should jump to line 11:
"file": "$TESTCASE_ROOT/test.ml",
"pos": {
"line": 13,
"col": 0
"col": 5
}
},
"notifications": []
Expand Down
4 changes: 2 additions & 2 deletions tests/test-dirs/locate/functors/f-all_local.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Check that we can jump locally inside the functor:
"file": "$TESTCASE_ROOT/all_local.ml",
"pos": {
"line": 12,
"col": 2
"col": 7
}
},
"notifications": []
Expand Down Expand Up @@ -53,7 +53,7 @@ Check the argument is substituted for the parameter
"file": "$TESTCASE_ROOT/all_local.ml",
"pos": {
"line": 6,
"col": 2
"col": 7
}
},
"notifications": []
Expand Down
4 changes: 2 additions & 2 deletions tests/test-dirs/locate/functors/f-from_application.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Jump from inside the functor application to inside the functor application:
"file": "$TESTCASE_ROOT/from_application.ml",
"pos": {
"line": 14,
"col": 4
"col": 9
}
},
"notifications": []
Expand All @@ -38,7 +38,7 @@ Jump from inside the functor application to the outer scope:
"file": "$TESTCASE_ROOT/from_application.ml",
"pos": {
"line": 9,
"col": 0
"col": 5
}
},
"notifications": []
Expand Down
10 changes: 5 additions & 5 deletions tests/test-dirs/locate/functors/f-nested_applications.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"file": "$TESTCASE_ROOT/nested_applications.ml",
"pos": {
"line": 10,
"col": 2
"col": 7
}
},
"notifications": []
Expand All @@ -21,7 +21,7 @@
"file": "$TESTCASE_ROOT/nested_applications.ml",
"pos": {
"line": 10,
"col": 2
"col": 7
}
},
"notifications": []
Expand All @@ -35,7 +35,7 @@
"file": "$TESTCASE_ROOT/nested_applications.ml",
"pos": {
"line": 10,
"col": 2
"col": 7
}
},
"notifications": []
Expand All @@ -49,7 +49,7 @@
"file": "$TESTCASE_ROOT/nested_applications.ml",
"pos": {
"line": 10,
"col": 2
"col": 7
}
},
"notifications": []
Expand All @@ -63,7 +63,7 @@
"file": "$TESTCASE_ROOT/nested_applications.ml",
"pos": {
"line": 10,
"col": 2
"col": 7
}
},
"notifications": []
Expand Down
5 changes: 2 additions & 3 deletions tests/test-dirs/locate/locate-constrs.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ We expect 1:27
}
}

FIXME: this is not a very satisfying answer.
We expect 1:18
We expect 1:23
$ $MERLIN single locate -look-for ml -position 2:12 \
> -filename ./constr.ml < ./constr.ml | jq '.value'
{
"file": "$TESTCASE_ROOT/constr.ml",
"pos": {
"line": 1,
"col": 18
"col": 23
}
}

Expand Down

0 comments on commit a1ffdc0

Please sign in to comment.