[mlir][sparse] implement non-permutation MapRef encoding (#69406)
[llvm-project.git] / clang-tools-extra / clangd / test / tweaks-format.test
blob8fe7a112acf7e48b99847ba196d8707aefa25a84
1 # RUN: clangd -lit-test < %s | FileCheck %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
3 ---
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cc","languageId":"cpp","version":1,"text":"int f() { if (true) { return 1; } else {} }"}}}
5 ---
6 {"jsonrpc":"2.0","id":5,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"test:///main.cc"},"range":{"start":{"line":0,"character":11},"end":{"line":0,"character":11}},"context":{"diagnostics":[]}}}
7 ---
8 {"jsonrpc":"2.0","id":6,"method":"workspace/executeCommand","params":{"command":"clangd.applyTweak","arguments":[{"file":"test:///main.cc","selection":{"end":{"character":11,"line":0},"start":{"character":11,"line":0}},"tweakID":"SwapIfBranches"}]}}
9 #      CHECK:    "newText": "\n  ",
10 # CHECK-NEXT:    "range": {
11 # CHECK-NEXT:      "end": {
12 # CHECK-NEXT:        "character": 10,
13 # CHECK-NEXT:        "line": 0
14 # CHECK-NEXT:      },
15 # CHECK-NEXT:      "start": {
16 # CHECK-NEXT:        "character": 9,
17 # CHECK-NEXT:        "line": 0
18 # CHECK-NEXT:      }
19 # CHECK-NEXT:    }
20 # CHECK-NEXT:  },
21 # CHECK-NEXT:  {
22 # CHECK-NEXT:    "newText": "{\n  }",
23 # CHECK-NEXT:    "range": {
24 # CHECK-NEXT:      "end": {
25 # CHECK-NEXT:        "character": 33,
26 # CHECK-NEXT:        "line": 0
27 # CHECK-NEXT:      },
28 # CHECK-NEXT:      "start": {
29 # CHECK-NEXT:        "character": 20,
30 # CHECK-NEXT:        "line": 0
31 # CHECK-NEXT:      }
32 # CHECK-NEXT:    }
33 # CHECK-NEXT:  },
34 # CHECK-NEXT:  {
35 # CHECK-NEXT:    "newText": "{\n    return 1;\n  }\n",
36 # CHECK-NEXT:    "range": {
37 # CHECK-NEXT:      "end": {
38 # CHECK-NEXT:        "character": 42,
39 # CHECK-NEXT:        "line": 0
40 # CHECK-NEXT:      },
41 # CHECK-NEXT:      "start": {
42 # CHECK-NEXT:        "character": 39,
43 # CHECK-NEXT:        "line": 0
44 # CHECK-NEXT:      }
45 # CHECK-NEXT:    }
46 # CHECK-NEXT:  }
47 ---
48 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
49 ---
50 {"jsonrpc":"2.0","method":"exit"}