[mlir][sparse] implement non-permutation MapRef encoding (#69406)
[llvm-project.git] / clang-tools-extra / clangd / test / hover.test
blobec8d0488fa5ed119f9ed03d472f4f8d358f6f196
1 # RUN: clangd -lit-test < %s | FileCheck %s\r
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}\r
3 ---\r
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"void foo(); int main() { foo(); }\n"}}}\r
5 ---\r
6 {"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":27}}}\r
7 #      CHECK:  "id": 1,\r
8 # CHECK-NEXT:  "jsonrpc": "2.0",\r
9 # CHECK-NEXT:  "result": {\r
10 # CHECK-NEXT:    "contents": {\r
11 # CHECK-NEXT:      "kind": "plaintext",\r
12 # CHECK-NEXT:      "value": "function foo\n\n→ void\n\nvoid foo()"\r
13 # CHECK-NEXT:    },\r
14 # CHECK-NEXT:    "range": {\r
15 # CHECK-NEXT:      "end": {\r
16 # CHECK-NEXT:        "character": 28,\r
17 # CHECK-NEXT:        "line": 0\r
18 # CHECK-NEXT:      },\r
19 # CHECK-NEXT:      "start": {\r
20 # CHECK-NEXT:        "character": 25,\r
21 # CHECK-NEXT:        "line": 0\r
22 # CHECK-NEXT:      }\r
23 # CHECK-NEXT:    }\r
24 # CHECK-NEXT:  }\r
25 # CHECK-NEXT:}\r
26 ---\r
27 {"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":10}}}\r
28 #      CHECK:  "id": 1,\r
29 # CHECK-NEXT:  "jsonrpc": "2.0",\r
30 # CHECK-NEXT:  "result": null\r
31 ---\r
32 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main2.cpp","languageId":"cpp","version":1,"text":"enum foo{}; int main() { foo f; }\n"}}}\r
33 ---\r
34 {"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main2.cpp"},"position":{"line":0,"character":27}}}\r
35 #      CHECK:  "id": 1,\r
36 # CHECK-NEXT:  "jsonrpc": "2.0",\r
37 # CHECK-NEXT:  "result": {\r
38 # CHECK-NEXT:    "contents": {\r
39 # CHECK-NEXT:      "kind": "plaintext",\r
40 # CHECK-NEXT:      "value": "enum foo\n\nenum foo {}"\r
41 # CHECK-NEXT:    },\r
42 # CHECK-NEXT:    "range": {\r
43 # CHECK-NEXT:      "end": {\r
44 # CHECK-NEXT:        "character": 28,\r
45 # CHECK-NEXT:        "line": 0\r
46 # CHECK-NEXT:      },\r
47 # CHECK-NEXT:      "start": {\r
48 # CHECK-NEXT:        "character": 25,\r
49 # CHECK-NEXT:        "line": 0\r
50 # CHECK-NEXT:      }\r
51 # CHECK-NEXT:    }\r
52 # CHECK-NEXT:  }\r
53 # CHECK-NEXT:}\r
54 ---\r
55 {"jsonrpc":"2.0","id":3,"method":"shutdown"}\r
56 ---\r
57 {"jsonrpc":"2.0","method":"exit"}\r