Skip to content

Commit b55bd41

Browse files
committed
Fix lsp tests
1 parent d851a72 commit b55bd41

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

Diff for: compiler/test/suites/grainlsp.re

+10-13
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe("grainlsp", ({test, testSkip}) => {
8181
"goto_definition1",
8282
"file:///a.gr",
8383
{|module A
84-
let func = x => x
84+
let func = x => print(x)
8585
func(1)
8686
|},
8787
lsp_input(
@@ -99,7 +99,7 @@ func(1)
9999
"goto_definition2",
100100
"file:///a.gr",
101101
{|module A
102-
let func = x => x
102+
let func = x => print(x)
103103
func(1)
104104
|},
105105
lsp_input(
@@ -118,15 +118,15 @@ func(1)
118118
make_test_utils_uri("a.gr"),
119119
{|module A
120120
from "./provideAll.gr" include ProvideAll
121-
ProvideAll.y(1)
121+
ignore(ProvideAll.y(1))
122122
|},
123123
lsp_input(
124124
"textDocument/definition",
125-
lsp_text_document_position(make_test_utils_uri("a.gr"), 2, 11),
125+
lsp_text_document_position(make_test_utils_uri("a.gr"), 2, 18),
126126
),
127127
lsp_location_link(
128128
make_test_utils_uri("provideAll.gr"),
129-
((2, 0), (2, 12)),
129+
((2, 7), (2, 19)),
130130
((3, 12), (3, 13)),
131131
),
132132
);
@@ -269,7 +269,7 @@ let abc: T = { x: 1 }
269269
"code_action_add_function_label1",
270270
"file:///a.gr",
271271
{|module A
272-
let f = (x, y, z) => x ++ y ++ z
272+
let f = (x, y, z) => print(x ++ y ++ z)
273273
f("y", x="x", "z")
274274
|},
275275
lsp_input(
@@ -300,7 +300,7 @@ f("y", x="x", "z")
300300
"code_action_add_function_label2",
301301
"file:///a.gr",
302302
{|module A
303-
let f = (x, y, z) => x ++ y ++ z
303+
let f = (x, y, z) => print(x ++ y ++ z)
304304
f("y", x="x", "z")
305305
|},
306306
lsp_input(
@@ -331,7 +331,7 @@ f("y", x="x", "z")
331331
"code_action_add_function_label3",
332332
"file:///a.gr",
333333
{|module A
334-
let f = (x) => x
334+
let f = (x) => print(x)
335335
f(x="x")
336336
|},
337337
lsp_input(
@@ -506,7 +506,7 @@ from "./provideAll.gr" include ProvideAll
506506
record T { x: Number }
507507
let a = 1
508508
let b = 2 and c = 3
509-
"abc"
509+
print("abc")
510510
|},
511511
lsp_input(
512512
"textDocument/codeLens",
@@ -549,10 +549,7 @@ let b = 2 and c = 3
549549
("range", lsp_range((4, 1), (4, 1))),
550550
(
551551
"command",
552-
`Assoc([
553-
("title", `String("String")),
554-
("command", `String("")),
555-
]),
552+
`Assoc([("title", `String("Void")), ("command", `String(""))]),
556553
),
557554
]),
558555
]),

0 commit comments

Comments
 (0)