Skip to content

Commit 4def439

Browse files
committed
add failing tests
1 parent 8464053 commit 4def439

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

analysis/tests/src/SignatureHelp.res

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,18 @@ let iAmSoSpecial = (iJustHaveOneArg: string) => {
5353

5454
// let _ = "hello"->otherFunc(1
5555
// ^she
56+
57+
let fn = (age: int, name: string, year: int) => {
58+
ignore(age)
59+
ignore(name)
60+
ignore(year)
61+
}
62+
63+
// let _ = fn(22, )
64+
// ^she
65+
66+
// let _ = fn(22, , 2023)
67+
// ^she
68+
69+
// let _ = fn(12, "hello", )
70+
// ^she

analysis/tests/src/expected/SignatureHelp.res.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,54 @@ extracted params:
215215
"activeParameter": 1
216216
}
217217

218+
Signature help src/SignatureHelp.res 62:17
219+
posCursor:[62:13] posNoWhite:[62:12] Found expr:[62:11->62:19]
220+
Pexp_apply ...[62:11->62:13] (...[62:14->62:16])
221+
posCursor:[62:13] posNoWhite:[62:12] Found expr:[62:11->62:13]
222+
Pexp_ident fn:[62:11->62:13]
223+
argAtCursor: none
224+
extracted params:
225+
[(int, string, int]
226+
{
227+
"signatures": [{
228+
"label": "let fn: (int, string, int) => unit",
229+
"parameters": [{"label": [8, 12], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [14, 20], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [22, 25], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}]
230+
}],
231+
"activeSignature": 0,
232+
"activeParameter": -1
233+
}
234+
235+
Signature help src/SignatureHelp.res 65:17
236+
posCursor:[65:13] posNoWhite:[65:12] Found expr:[65:11->65:25]
237+
Pexp_apply ...[65:11->65:13] (...[65:14->65:16], ...[65:20->65:24])
238+
posCursor:[65:13] posNoWhite:[65:12] Found expr:[65:11->65:13]
239+
Pexp_ident fn:[65:11->65:13]
240+
argAtCursor: none
241+
extracted params:
242+
[(int, string, int]
243+
{
244+
"signatures": [{
245+
"label": "let fn: (int, string, int) => unit",
246+
"parameters": [{"label": [8, 12], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [14, 20], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [22, 25], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}]
247+
}],
248+
"activeSignature": 0,
249+
"activeParameter": -1
250+
}
251+
252+
Signature help src/SignatureHelp.res 68:26
253+
posCursor:[68:13] posNoWhite:[68:12] Found expr:[68:11->68:28]
254+
Pexp_apply ...[68:11->68:13] (...[68:14->68:16], ...[68:18->68:25])
255+
posCursor:[68:13] posNoWhite:[68:12] Found expr:[68:11->68:13]
256+
Pexp_ident fn:[68:11->68:13]
257+
argAtCursor: none
258+
extracted params:
259+
[(int, string, int]
260+
{
261+
"signatures": [{
262+
"label": "let fn: (int, string, int) => unit",
263+
"parameters": [{"label": [8, 12], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [14, 20], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [22, 25], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}]
264+
}],
265+
"activeSignature": 0,
266+
"activeParameter": -1
267+
}
268+

0 commit comments

Comments
 (0)