Bump version to 19.1.0git
[llvm-project.git] / clang-tools-extra / clangd / test / signature-help.test
bloba642574571cc36921d07651ea1a6e7fba947cc59
1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
2 # Start a session.
3 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{"textDocument": {"signatureHelp": {"signatureInformation": {"documentationFormat": ["markdown", "plaintext"]}}}},"trace":"off"}}
4 ---
5 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"// comment `markdown` _escape_\nvoid x(int);\nint main(){\nx("}}}
6 ---
7 {"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":3,"character":2}}}
8 #      CHECK: "id": 1,
9 # CHECK-NEXT: "jsonrpc": "2.0",
10 # CHECK-NEXT: "result": {
11 # CHECK-NEXT:   "activeParameter": 0,
12 # CHECK-NEXT:   "activeSignature": 0,
13 # CHECK-NEXT:   "signatures": [
14 # CHECK-NEXT:     {
15 # CHECK-NEXT:       "documentation": {
16 # CHECK-NEXT:         "kind": "markdown",
17 # CHECK-NEXT:         "value": "comment `markdown` \\_escape\\_"
18 # CHECK-NEXT:       },
19 # CHECK-NEXT:       "label": "x(int) -> void",
20 # CHECK-NEXT:       "parameters": [
21 # CHECK-NEXT:         {
22 # CHECK-NEXT:           "label": "int"
23 # CHECK-NEXT:         }
24 # CHECK-NEXT:       ]
25 # CHECK-NEXT:     }
26 # CHECK-NEXT:   ]
27 # CHECK-NEXT: }
28 ---
29 {"jsonrpc":"2.0","id":100000,"method":"shutdown"}
30 ---
31 {"jsonrpc":"2.0","method":"exit"}