Bump version to 19.1.0git
[llvm-project.git] / clang-tools-extra / clangd / test / implementations.test
blobcc20d90bab7754e2efcea766fcf4dfaf8a2f74be
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"}}
3 ---
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(); };"}}}
5 ---
6 {"jsonrpc":"2.0","id":1,"method":"textDocument/implementation","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":32}}}
7 #      CHECK:  "id": 1
8 # CHECK-NEXT:  "jsonrpc": "2.0",
9 # CHECK-NEXT:  "result": [
10 # CHECK-NEXT:    {
11 # CHECK-NEXT:      "range": {
12 # CHECK-NEXT:        "end": {
13 # CHECK-NEXT:          "character": 33,
14 # CHECK-NEXT:          "line": 1
15 # CHECK-NEXT:        },
16 # CHECK-NEXT:        "start": {
17 # CHECK-NEXT:          "character": 30,
18 # CHECK-NEXT:          "line": 1
19 # CHECK-NEXT:        }
20 # CHECK-NEXT:      },
21 # CHECK-NEXT:      "uri": "file://{{.*}}/clangd-test/main.cpp"
22 # CHECK-NEXT:    },
23 # CHECK-NEXT:    {
24 # CHECK-NEXT:      "range": {
25 # CHECK-NEXT:        "end": {
26 # CHECK-NEXT:          "character": 33,
27 # CHECK-NEXT:          "line": 2
28 # CHECK-NEXT:        },
29 # CHECK-NEXT:        "start": {
30 # CHECK-NEXT:          "character": 30,
31 # CHECK-NEXT:          "line": 2
32 # CHECK-NEXT:        }
33 # CHECK-NEXT:      },
34 # CHECK-NEXT:    "uri": "file://{{.*}}/clangd-test/main.cpp"
35 # CHECK-NEXT:  }
36 ---
37 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
38 ---
39 {"jsonrpc":"2.0","method":"exit"}