|
|
@@ -0,0 +1,69 @@ |
|
|
# RUN: clangd -run-synchronously < %s | FileCheck %s |
|
|
# It is absolutely vital that this file has CRLF line endings. |
|
|
# |
|
|
Content-Length: 125 |
|
|
|
|
|
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}} |
|
|
|
|
|
Content-Length: 208 |
|
|
|
|
|
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///main.cpp","languageId":"cpp","version":1,"text":"#include <vector>\nint main() {\n std::vector<int> v;\n v.\n}\n"}}} |
|
|
|
|
|
Content-Length: 148 |
|
|
|
|
|
{"jsonrpc":"2.0","id":1,"method":"textDocument/completion","params":{"textDocument":{"uri":"file:///main.cpp"},"position":{"line":3,"character":4}}} |
|
|
# The order of results returned by ASTUnit CodeComplete seems to be |
|
|
# nondeterministic, so we check regardless of order. |
|
|
# |
|
|
# CHECK: {"jsonrpc":"2.0","id":1,"result":[ |
|
|
# CHECK-DAG: {"label":"_M_allocate"} |
|
|
# CHECK-DAG: {"label":"_M_allocate_and_copy"} |
|
|
# CHECK-DAG: {"label":"_M_assign_aux"} |
|
|
# CHECK-DAG: {"label":"_M_assign_dispatch"} |
|
|
# CHECK-DAG: {"label":"_M_check_len"} |
|
|
# CHECK-DAG: {"label":"_M_create_storage" |
|
|
# CHECK-DAG: {"label":"_M_deallocate"} |
|
|
# CHECK-DAG: {"label":"_M_erase_at_end"} |
|
|
# CHECK-DAG: {"label":"_M_fill_assign"} |
|
|
# CHECK-DAG: {"label":"_M_fill_initialize"} |
|
|
# CHECK-DAG: {"label":"_M_fill_insert"} |
|
|
# CHECK-DAG: {"label":"_M_get_Tp_allocator"} |
|
|
# CHECK-DAG: {"label":"_M_impl"} |
|
|
# CHECK-DAG: {"label":"_M_initialize_dispatch"} |
|
|
# CHECK-DAG: {"label":"_M_insert_aux"} |
|
|
# CHECK-DAG: {"label":"_M_insert_dispatch"} |
|
|
# CHECK-DAG: {"label":"_M_range_check"} |
|
|
# CHECK-DAG: {"label":"_M_range_initialize"} |
|
|
# CHECK-DAG: {"label":"_M_range_insert"} |
|
|
# CHECK-DAG: {"label":"_Vector_base"} |
|
|
# CHECK-DAG: {"label":"assign"} |
|
|
# CHECK-DAG: {"label":"at"} |
|
|
# CHECK-DAG: {"label":"back"} |
|
|
# CHECK-DAG: {"label":"begin"} |
|
|
# CHECK-DAG: {"label":"capacity"} |
|
|
# CHECK-DAG: {"label":"clear"} |
|
|
# CHECK-DAG: {"label":"data"} |
|
|
# CHECK-DAG: {"label":"empty"} |
|
|
# CHECK-DAG: {"label":"end"} |
|
|
# CHECK-DAG: {"label":"erase"} |
|
|
# CHECK-DAG: {"label":"front"} |
|
|
# CHECK-DAG: {"label":"get_allocator"} |
|
|
# CHECK-DAG: {"label":"insert"} |
|
|
# CHECK-DAG: {"label":"max_size"} |
|
|
# CHECK-DAG: {"label":"operator="} |
|
|
# CHECK-DAG: {"label":"operator[]"} |
|
|
# CHECK-DAG: {"label":"pop_back"} |
|
|
# CHECK-DAG: {"label":"push_back"} |
|
|
# CHECK-DAG: {"label":"rbegin"} |
|
|
# CHECK-DAG: {"label":"rend"} |
|
|
# CHECK-DAG: {"label":"reserve"} |
|
|
# CHECK-DAG: {"label":"resize"} |
|
|
# CHECK-DAG: {"label":"size"} |
|
|
# CHECK-DAG: {"label":"swap"} |
|
|
# CHECK-DAG: {"label":"vector"} |
|
|
# CHECK-DAG: {"label":"~_Vector_base"} |
|
|
# CHECK-DAG: {"label":"~vector"} |
|
|
# CHECK: ]} |
|
|
Content-Length: 44 |
|
|
|
|
|
{"jsonrpc":"2.0","id":3,"method":"shutdown"} |