1 # RUN: clangd -lit-test < %s | FileCheck %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{}}
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
5 "uri":"test:///main.cpp",
8 "text":"int foo(int bar);\nint x = foo(42);\nint y = foo(42);"
11 {"jsonrpc":"2.0","id":1,"method":"clangd/inlayHints","params":{
12 "textDocument":{"uri":"test:///main.cpp"},
14 "start": {"line":1,"character":0},
15 "end": {"line":2,"character":0}
19 # CHECK-NEXT: "jsonrpc": "2.0",
20 # CHECK-NEXT: "result": [
22 # CHECK-NEXT: "kind": "parameter",
23 # CHECK-NEXT: "label": "bar: ",
24 # CHECK-NEXT: "position": {
25 # CHECK-NEXT: "character": 12,
26 # CHECK-NEXT: "line": 1
28 # CHECK-NEXT: "range": {
29 # CHECK-NEXT: "end": {
30 # CHECK-NEXT: "character": 14,
31 # CHECK-NEXT: "line": 1
33 # CHECK-NEXT: "start": {
34 # CHECK-NEXT: "character": 12,
35 # CHECK-NEXT: "line": 1
42 {"jsonrpc":"2.0","id":2,"method":"textDocument/inlayHint","params":{
43 "textDocument":{"uri":"test:///main.cpp"},
45 "start": {"line":1,"character":0},
46 "end": {"line":2,"character":0}
50 # CHECK-NEXT: "jsonrpc": "2.0",
51 # CHECK-NEXT: "result": [
53 # CHECK-NEXT: "kind": 2,
54 # CHECK-NEXT: "label": [
56 # CHECK-NEXT: "value": "bar:"
59 # CHECK-NEXT: "paddingLeft": false,
60 # CHECK-NEXT: "paddingRight": true,
61 # CHECK-NEXT: "position": {
62 # CHECK-NEXT: "character": 12,
63 # CHECK-NEXT: "line": 1
69 {"jsonrpc":"2.0","id":100,"method":"shutdown"}
71 {"jsonrpc":"2.0","method":"exit"}