Debian Codegraph @

llvm-project/clang-tools-extra/clangd/test/signature-help-with-offsets.test

raw
1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
2 # Start a session.
3 {
4 "jsonrpc": "2.0",
5 "id": 0,
6 "method": "initialize",
7 "params": {
8 "processId": 123,
9 "rootPath": "clangd",
10 "capabilities": {
11 "textDocument": {
12 "signatureHelp": {
13 "signatureInformation": {
14 "parameterInformation": {
15 "labelOffsetSupport": true
16 }
17 }
18 }
19 }
20 },
21 "trace": "off"
22 }
23 }
24 ---
25 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"void x(int);\nint main(){\nx("}}}
26 ---
27 {"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":2,"character":2}}}
28 # CHECK: "id": 1,
29 # CHECK-NEXT: "jsonrpc": "2.0",
30 # CHECK-NEXT: "result": {
31 # CHECK-NEXT: "activeParameter": 0,
32 # CHECK-NEXT: "activeSignature": 0,
33 # CHECK-NEXT: "signatures": [
34 # CHECK-NEXT: {
35 # CHECK-NEXT: "label": "x(int) -> void",
36 # CHECK-NEXT: "parameters": [
37 # CHECK-NEXT: {
38 # CHECK-NEXT: "label": [
39 # CHECK-NEXT: 2,
40 # CHECK-NEXT: 5
41 # CHECK-NEXT: ]
42 # CHECK-NEXT: }
43 # CHECK-NEXT: ]
44 # CHECK-NEXT: }
45 # CHECK-NEXT: ]
46 # CHECK-NEXT: }
47 ---
48 {"jsonrpc":"2.0","id":100000,"method":"shutdown"}
49 ---
50 {"jsonrpc":"2.0","method":"exit"}