annotate mlir/test/mlir-lsp-server/diagnostics.test @ 227:21e6aa2e49ef

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 19 Jul 2021 06:57:16 +0900
parents 2e18cbf3894f
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 // RUN: mlir-lsp-server -lit-test < %s | FileCheck -strict-whitespace %s
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"mlir","capabilities":{},"trace":"off"}}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // -----
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 "uri":"test:///foo.mlir",
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 "languageId":"mlir",
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 "version":1,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 "text":"func ()"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 }}}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 // CHECK: "method": "textDocument/publishDiagnostics",
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 // CHECK-NEXT: "params": {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 // CHECK-NEXT: "diagnostics": [
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 // CHECK-NEXT: {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 // CHECK-NEXT: "category": "Parse Error",
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 // CHECK-NEXT: "message": "custom op 'func' expected valid '@'-identifier for symbol name",
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 // CHECK-NEXT: "range": {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 // CHECK-NEXT: "end": {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 // CHECK-NEXT: "character": 7,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 // CHECK-NEXT: "line": 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 // CHECK-NEXT: },
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 // CHECK-NEXT: "start": {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 // CHECK-NEXT: "character": 6,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 // CHECK-NEXT: "line": 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 // CHECK-NEXT: }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 // CHECK-NEXT: },
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 // CHECK-NEXT: "severity": 1,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 // CHECK-NEXT: "source": "mlir"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 // CHECK-NEXT: }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 // CHECK-NEXT: ],
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 // CHECK-NEXT: "uri": "test:///foo.mlir",
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 // CHECK-NEXT: "version": 1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 // CHECK-NEXT: }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 // -----
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 // -----
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 {"jsonrpc":"2.0","method":"exit"}