[mlir][py] Enable loading only specified dialects during creation. (#121421)
[llvm-project.git] / mlir / test / tblgen-lsp-server / diagnostics.test
blob792acb6e382d00ec30405d73c828733e5cf9fa62
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<>;"
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": "Unknown token when expecting a type",
16 // CHECK-NEXT:         "range": {
17 // CHECK-NEXT:           "end": {
18 // CHECK-NEXT:             "character": 11,
19 // CHECK-NEXT:             "line": 0
20 // CHECK-NEXT:           },
21 // CHECK-NEXT:           "start": {
22 // CHECK-NEXT:             "character": 10,
23 // CHECK-NEXT:             "line": 0
24 // CHECK-NEXT:           }
25 // CHECK-NEXT:         },
26 // CHECK-NEXT:         "severity": 1,
27 // CHECK-NEXT:         "source": "tablegen"
28 // CHECK-NEXT:       }
29 // CHECK-NEXT:     ],
30 // CHECK-NEXT:     "uri": "test:///foo.td",
31 // CHECK-NEXT:     "version": 1
32 // CHECK-NEXT:   }
33 // -----
34 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
35 // -----
36 {"jsonrpc":"2.0","method":"exit"}