-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41178 from malinthar/fix-#38851
Add missing completion test cases
- Loading branch information
Showing
6 changed files
with
807 additions
and
0 deletions.
There are no files selected for viewing
309 changes: 309 additions & 0 deletions
309
.../modules/langserver-core/src/test/resources/completion/function_body/config/config16.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,309 @@ | ||
{ | ||
"position": { | ||
"line": 3, | ||
"character": 12 | ||
}, | ||
"source": "function_body/source/source16.bal", | ||
"description": "Test completions after qualified name in function body block", | ||
"items": [ | ||
{ | ||
"label": "TEST_INT_CONST1", | ||
"kind": "Variable", | ||
"detail": "1", | ||
"documentation": { | ||
"right": { | ||
"kind": "markdown", | ||
"value": "" | ||
} | ||
}, | ||
"sortText": "C", | ||
"insertText": "TEST_INT_CONST1", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TEST_STRING_CONST1", | ||
"kind": "Variable", | ||
"detail": "\"HELLO WORLD\"", | ||
"documentation": { | ||
"right": { | ||
"kind": "markdown", | ||
"value": "" | ||
} | ||
}, | ||
"sortText": "C", | ||
"insertText": "TEST_STRING_CONST1", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "ENUM1_FIELD1", | ||
"kind": "EnumMember", | ||
"detail": "\"ENUM1_FIELD1\"", | ||
"documentation": { | ||
"right": { | ||
"kind": "markdown", | ||
"value": "" | ||
} | ||
}, | ||
"sortText": "H", | ||
"insertText": "ENUM1_FIELD1", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "AnnotationType", | ||
"kind": "Struct", | ||
"detail": "Record", | ||
"sortText": "M", | ||
"insertText": "AnnotationType", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "ResponseMessage", | ||
"kind": "Enum", | ||
"detail": "Union", | ||
"documentation": { | ||
"left": "The types of messages that are accepted by HTTP `listener` when sending out the outbound response." | ||
}, | ||
"sortText": "I", | ||
"insertText": "ResponseMessage", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "RequestMessage", | ||
"kind": "Enum", | ||
"detail": "Union", | ||
"documentation": { | ||
"left": "The types of messages that are accepted by HTTP `client` when sending out the outbound request." | ||
}, | ||
"sortText": "I", | ||
"insertText": "RequestMessage", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TargetType", | ||
"kind": "TypeParameter", | ||
"detail": "Typedesc", | ||
"documentation": { | ||
"left": "The types of data values that are expected by the `client` to return after the data binding operation." | ||
}, | ||
"sortText": "N", | ||
"insertText": "TargetType", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "ClientError", | ||
"kind": "Event", | ||
"detail": "Error", | ||
"documentation": { | ||
"left": "Defines the possible client error types." | ||
}, | ||
"sortText": "L", | ||
"insertText": "ClientError", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TargetType2", | ||
"kind": "TypeParameter", | ||
"detail": "Typedesc", | ||
"documentation": { | ||
"left": "The super type of all the types." | ||
}, | ||
"sortText": "N", | ||
"insertText": "TargetType2", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TestEnum1", | ||
"kind": "Enum", | ||
"detail": "enum", | ||
"sortText": "I", | ||
"insertText": "TestEnum1", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TestRecord1", | ||
"kind": "Struct", | ||
"detail": "Record", | ||
"sortText": "M", | ||
"insertText": "TestRecord1", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TestRecord2", | ||
"kind": "Struct", | ||
"detail": "Record", | ||
"sortText": "M", | ||
"insertText": "TestRecord2", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TestMap2", | ||
"kind": "TypeParameter", | ||
"detail": "Map", | ||
"sortText": "N", | ||
"insertText": "TestMap2", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TestMap3", | ||
"kind": "TypeParameter", | ||
"detail": "Map", | ||
"sortText": "N", | ||
"insertText": "TestMap3", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TestObject1", | ||
"kind": "Interface", | ||
"detail": "Object", | ||
"sortText": "K", | ||
"insertText": "TestObject1", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "ErrorOne", | ||
"kind": "Event", | ||
"detail": "Error", | ||
"sortText": "L", | ||
"insertText": "ErrorOne", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "ErrorTwo", | ||
"kind": "Event", | ||
"detail": "Error", | ||
"sortText": "L", | ||
"insertText": "ErrorTwo", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "Client", | ||
"kind": "Interface", | ||
"detail": "Class", | ||
"documentation": { | ||
"left": "The HTTP client provides the capability for initiating contact with a remote HTTP service. The API it\nprovides includes functions for the standard HTTP methods, forwarding a received request and sending requests\nusing custom HTTP verbs." | ||
}, | ||
"sortText": "K", | ||
"insertText": "Client", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "Response", | ||
"kind": "Interface", | ||
"detail": "Class", | ||
"documentation": { | ||
"left": "Represents a response.\n" | ||
}, | ||
"sortText": "K", | ||
"insertText": "Response", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "Listener", | ||
"kind": "Interface", | ||
"detail": "Class", | ||
"sortText": "K", | ||
"insertText": "Listener", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TestClass1", | ||
"kind": "Interface", | ||
"detail": "Class", | ||
"sortText": "K", | ||
"insertText": "TestClass1", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "TEST_FUTURE_INT", | ||
"kind": "Variable", | ||
"detail": "future<int>", | ||
"sortText": "C", | ||
"insertText": "TEST_FUTURE_INT", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "GLOBAL_VAR", | ||
"kind": "Variable", | ||
"detail": "int", | ||
"sortText": "C", | ||
"insertText": "GLOBAL_VAR", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "listener1", | ||
"kind": "Variable", | ||
"detail": "module1:Listener", | ||
"sortText": "C", | ||
"insertText": "listener1", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "function1()", | ||
"kind": "Function", | ||
"detail": "()", | ||
"documentation": { | ||
"right": { | ||
"kind": "markdown", | ||
"value": "**Package:** _ballerina/module1:0.1.0_ \n \n \n" | ||
} | ||
}, | ||
"sortText": "A", | ||
"filterText": "function1", | ||
"insertText": "function1()", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "function2()", | ||
"kind": "Function", | ||
"detail": "()", | ||
"documentation": { | ||
"right": { | ||
"kind": "markdown", | ||
"value": "**Package:** _ballerina/module1:0.1.0_ \n \nThis is function2 \n" | ||
} | ||
}, | ||
"sortText": "A", | ||
"filterText": "function2", | ||
"insertText": "function2()", | ||
"insertTextFormat": "Snippet" | ||
}, | ||
{ | ||
"label": "function3(int param1, int param2, float... param3)", | ||
"kind": "Function", | ||
"detail": "int", | ||
"documentation": { | ||
"right": { | ||
"kind": "markdown", | ||
"value": "**Package:** _ballerina/module1:0.1.0_ \n \nThis is function3 with input parameters\n \n**Params** \n- `int` param1: param1 Parameter Description \n- `int` param2: param2 Parameter Description \n- `float[]` param3: param3 Parameter Description \n \n**Return** `int` \n- Return Value Description \n \n" | ||
} | ||
}, | ||
"sortText": "A", | ||
"filterText": "function3", | ||
"insertText": "function3(${1})", | ||
"insertTextFormat": "Snippet", | ||
"command": { | ||
"title": "editor.action.triggerParameterHints", | ||
"command": "editor.action.triggerParameterHints" | ||
} | ||
}, | ||
{ | ||
"label": "function4(int param1, int param2, string param3, float... param4)", | ||
"kind": "Function", | ||
"detail": "()", | ||
"documentation": { | ||
"right": { | ||
"kind": "markdown", | ||
"value": "**Package:** _ballerina/module1:0.1.0_ \n \nThis is function4 with input parameters\n \n**Params** \n- `int` param1: param1 Parameter Description \n- `int` param2: param2 Parameter Description \n- `string` param3: param3 Parameter Description(Defaultable) \n- `float[]` param4: param4 Parameter Description" | ||
} | ||
}, | ||
"sortText": "A", | ||
"filterText": "function4", | ||
"insertText": "function4(${1})", | ||
"insertTextFormat": "Snippet", | ||
"command": { | ||
"title": "editor.action.triggerParameterHints", | ||
"command": "editor.action.triggerParameterHints" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.