1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %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:///main.cpp","languageId":"cpp","version":1,"text":"struct Parent { virtual void Foo(); };\nstruct Child1 : Parent { void Foo() override(); };\nstruct Child2 : Parent { void Foo() override(); };"}}}
6 {"jsonrpc":"2.0","id":1,"method":"textDocument/implementation","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":32}}}
8 # CHECK-NEXT: "jsonrpc": "2.0",
9 # CHECK-NEXT: "result": [
11 # CHECK-NEXT: "range": {
12 # CHECK-NEXT: "end": {
13 # CHECK-NEXT: "character": 33,
14 # CHECK-NEXT: "line": 1
16 # CHECK-NEXT: "start": {
17 # CHECK-NEXT: "character": 30,
18 # CHECK-NEXT: "line": 1
21 # CHECK-NEXT: "uri": "file://{{.*}}/clangd-test/main.cpp"
24 # CHECK-NEXT: "range": {
25 # CHECK-NEXT: "end": {
26 # CHECK-NEXT: "character": 33,
27 # CHECK-NEXT: "line": 2
29 # CHECK-NEXT: "start": {
30 # CHECK-NEXT: "character": 30,
31 # CHECK-NEXT: "line": 2
34 # CHECK-NEXT: "uri": "file://{{.*}}/clangd-test/main.cpp"
37 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
39 {"jsonrpc":"2.0","method":"exit"}