1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{}}
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,
5 "text":"class X {};\nauto x = X{};"
8 {"jsonrpc":"2.0","id":1,"method":"textDocument/typeDefinition","params":{
9 "textDocument":{"uri":"test:///main.cpp"},
10 "position":{"line":1,"character":5}
13 # CHECK-NEXT: "jsonrpc": "2.0",
14 # CHECK-NEXT: "result": [
16 # CHECK-NEXT: "range": {
17 # CHECK-NEXT: "end": {
18 # CHECK-NEXT: "character": 7,
19 # CHECK-NEXT: "line": 0
21 # CHECK-NEXT: "start": {
22 # CHECK-NEXT: "character": 6,
23 # CHECK-NEXT: "line": 0
26 # CHECK-NEXT: "uri": "file://{{.*}}/clangd-test/main.cpp"
30 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
32 {"jsonrpc":"2.0","method":"exit"}