[clang-tools-extra] Fix a link in ReleaseNotes.rst
[llvm-project.git] / clang-tools-extra / clangd / test / type-definition.test
blob226fff15c14b5e8a0e6eecc09cf4afc735eb64af
1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{}}
3 ---
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,
5   "text":"class X {};\nauto x = X{};"
6 }}}
7 ---
8 {"jsonrpc":"2.0","id":1,"method":"textDocument/typeDefinition","params":{
9   "textDocument":{"uri":"test:///main.cpp"},
10   "position":{"line":1,"character":5}
12 #      CHECK:  "id": 1
13 # CHECK-NEXT:  "jsonrpc": "2.0",
14 # CHECK-NEXT:  "result": [
15 # CHECK-NEXT:    {
16 # CHECK-NEXT:      "range": {
17 # CHECK-NEXT:        "end": {
18 # CHECK-NEXT:          "character": 7,
19 # CHECK-NEXT:          "line": 0
20 # CHECK-NEXT:        },
21 # CHECK-NEXT:        "start": {
22 # CHECK-NEXT:          "character": 6,
23 # CHECK-NEXT:          "line": 0
24 # CHECK-NEXT:        }
25 # CHECK-NEXT:      },
26 # CHECK-NEXT:      "uri": "file://{{.*}}/clangd-test/main.cpp"
27 # CHECK-NEXT:    }
28 # CHECK-NEXT:  ]
29 ---
30 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
31 ---
32 {"jsonrpc":"2.0","method":"exit"}