-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da1883c
commit f6f1a71
Showing
4 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...e/src/test/resources/codeaction/create-function/config/undefinedFunctionCodeAction31.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"position": { | ||
"line": 6, | ||
"character": 22 | ||
}, | ||
"source": "createUndefinedFunction20.bal", | ||
"expected": [ | ||
{ | ||
"title": "Create function 'foo(...)'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 7, | ||
"character": 1 | ||
}, | ||
"end": { | ||
"line": 7, | ||
"character": 1 | ||
} | ||
}, | ||
"newText": "\n\nfunction foo(string letter) returns MyType {\n return {value: \"\"};\n}" | ||
} | ||
], | ||
"resolvable": true, | ||
"data": { | ||
"extName": "org.ballerinalang.langserver.codeaction.BallerinaCodeActionExtension", | ||
"codeActionName": "Create Function", | ||
"fileUri": "createUndefinedFunction20.bal", | ||
"range": { | ||
"start": { | ||
"line": 6, | ||
"character": 19 | ||
}, | ||
"end": { | ||
"line": 6, | ||
"character": 30 | ||
} | ||
}, | ||
"actionData": { | ||
"key": "node.range", | ||
"value": { | ||
"start": { | ||
"line": 6.0, | ||
"character": 19.0 | ||
}, | ||
"end": { | ||
"line": 6.0, | ||
"character": 30.0 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
...r-core/src/test/resources/codeaction/create-function/source/createUndefinedFunction20.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type MyType record {| | ||
string value; | ||
|}; | ||
|
||
function func() { | ||
stream<MyType> streamName = stream from string letter in "JohnSnow" | ||
select foo(letter); | ||
} |