llvm-project/clang-tools-extra/clangd/test/memory_tree.test

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

86 lines
3.3 KiB
Plaintext
Raw Normal View History

# RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
---
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"void func() {}"}}}
---
{"jsonrpc":"2.0","id":1,"method":"$/memoryUsage","params":{}}
# CHECK: "id": 1,
# CHECK-NEXT: "jsonrpc": "2.0",
# CHECK-NEXT: "result": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}},
# CHECK-NEXT: "clangd_server": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}},
# CHECK-NEXT: "dynamic_index": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}},
# CHECK-NEXT: "main_file": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}},
# CHECK-NEXT: "index": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}}
# CHECK-NEXT: },
# CHECK-NEXT: "slabs": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}},
# CHECK-NEXT: "test:///main.cpp": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}},
# CHECK-NEXT: "references": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}}
# CHECK-NEXT: },
# CHECK-NEXT: "relations": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}}
# CHECK-NEXT: },
# CHECK-NEXT: "symbols": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}}
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: },
# CHECK-NEXT: "preamble": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}},
# CHECK-NEXT: "index": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}}
# CHECK-NEXT: },
# CHECK-NEXT: "slabs": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}}
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: },
# CHECK-NEXT: "tuscheduler": {
# CHECK-NEXT: "{{.*}}main.cpp": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}},
# CHECK-NEXT: "ast": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}}
# CHECK-NEXT: },
# CHECK-NEXT: "preamble": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}}
# CHECK-NEXT: }
# CHECK-NEXT: },
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}},
# CHECK-NEXT: "header_includer_cache": {
# CHECK-NEXT: "_self": {{[0-9]+}},
# CHECK-NEXT: "_total": {{[0-9]+}}
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: }
---
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
---
{"jsonrpc":"2.0","method":"exit"}