207
|
1 // RUN: mlir-lsp-server -lit-test < %s | FileCheck -strict-whitespace %s
|
|
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"mlir","capabilities":{},"trace":"off"}}
|
|
3 // -----
|
|
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
|
|
5 "uri":"test:///foo.mlir",
|
|
6 "languageId":"mlir",
|
|
7 "version":1,
|
|
8 "text":"func ()"
|
|
9 }}}
|
|
10 // CHECK: "method": "textDocument/publishDiagnostics",
|
|
11 // CHECK-NEXT: "params": {
|
|
12 // CHECK-NEXT: "diagnostics": [
|
|
13 // CHECK-NEXT: {
|
|
14 // CHECK-NEXT: "category": "Parse Error",
|
|
15 // CHECK-NEXT: "message": "custom op 'func' expected valid '@'-identifier for symbol name",
|
|
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: "severity": 1,
|
|
27 // CHECK-NEXT: "source": "mlir"
|
|
28 // CHECK-NEXT: }
|
|
29 // CHECK-NEXT: ],
|
|
30 // CHECK-NEXT: "uri": "test:///foo.mlir",
|
|
31 // CHECK-NEXT: "version": 1
|
|
32 // CHECK-NEXT: }
|
|
33 // -----
|
|
34 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
|
|
35 // -----
|
|
36 {"jsonrpc":"2.0","method":"exit"}
|