1 # RUN: clangd -lit-test < %s | FileCheck %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///simple.cpp","languageId":"cpp","version":1,"text":"void foo(); void foo() {} int main() { foo(); }\n"}}}
6 {"jsonrpc":"2.0","id":1,"method":"textDocument/symbolInfo","params":{"textDocument":{"uri":"test:///simple.cpp"},"position":{"line":0,"character":40}}}
7 # CHECK: "containerName": null,
8 # CHECK-NEXT: "declarationRange": {
9 # CHECK-NEXT: "range": {
10 # CHECK-NEXT: "end": {
11 # CHECK-NEXT: "character": 8,
12 # CHECK-NEXT: "line": 0
14 # CHECK-NEXT: "start": {
15 # CHECK-NEXT: "character": 5,
16 # CHECK-NEXT: "line": 0
19 # CHECK-NEXT: "uri": "file://{{.*}}/clangd-test/simple.cpp"
21 # CHECK-NEXT: "definitionRange": {
22 # CHECK-NEXT: "range": {
23 # CHECK-NEXT: "end": {
24 # CHECK-NEXT: "character": 20,
25 # CHECK-NEXT: "line": 0
27 # CHECK-NEXT: "start": {
28 # CHECK-NEXT: "character": 17,
29 # CHECK-NEXT: "line": 0
32 # CHECK-NEXT: "uri": "file://{{.*}}/clangd-test/simple.cpp"
34 # CHECK-NEXT: "id": "CA2EBE44A1D76D2A",
35 # CHECK-NEXT: "name": "foo",
36 # CHECK-NEXT: "usr": "c:@F@foo#"
38 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
40 {"jsonrpc":"2.0","method":"exit"}