[clang-tidy][NFC]remove deps of clang in clang tidy test (#116588)
[llvm-project.git] / mlir / test / tblgen-lsp-server / references.test
blob55aa96e8ed8b931dbc683458a0e05e7e324df861
1 // RUN: tblgen-lsp-server -lit-test < %s | FileCheck -strict-whitespace %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"tablegen","capabilities":{},"trace":"off"}}
3 // -----
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
5   "uri":"test:///foo.td",
6   "languageId":"tablegen",
7   "version":1,
8   "text":"class Foo;\ndef FooDerived : Foo;\n"
9 }}}
10 // -----
11 {"jsonrpc":"2.0","id":1,"method":"textDocument/references","params":{
12   "textDocument":{"uri":"test:///foo.td"},
13   "position":{"line":0,"character":7},
14   "context":{"includeDeclaration": false}
16 //      CHECK:  "id": 1
17 // CHECK-NEXT:  "jsonrpc": "2.0",
18 // CHECK-NEXT:  "result": [
19 // CHECK-NEXT:    {
20 // CHECK-NEXT:      "range": {
21 // CHECK-NEXT:        "end": {
22 // CHECK-NEXT:          "character": 9,
23 // CHECK-NEXT:          "line": 0
24 // CHECK-NEXT:        },
25 // CHECK-NEXT:        "start": {
26 // CHECK-NEXT:          "character": 6,
27 // CHECK-NEXT:          "line": 0
28 // CHECK-NEXT:        }
29 // CHECK-NEXT:      },
30 // CHECK-NEXT:      "uri": "{{.*}}/foo.td"
31 // CHECK-NEXT:    },
32 // CHECK-NEXT:    {
33 // CHECK-NEXT:      "range": {
34 // CHECK-NEXT:        "end": {
35 // CHECK-NEXT:          "character": 20,
36 // CHECK-NEXT:          "line": 1
37 // CHECK-NEXT:        },
38 // CHECK-NEXT:        "start": {
39 // CHECK-NEXT:          "character": 17,
40 // CHECK-NEXT:          "line": 1
41 // CHECK-NEXT:        }
42 // CHECK-NEXT:      },
43 // CHECK-NEXT:      "uri": "{{.*}}/foo.td"
44 // CHECK-NEXT:    }
45 // CHECK-NEXT:  ]
46 // -----
47 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
48 // -----
49 {"jsonrpc":"2.0","method":"exit"}