[clangd] Cut input-mirror.test down to size. NFC
authorSam McCall <sam.mccall@gmail.com>
Tue, 6 Feb 2018 10:51:22 +0000 (10:51 +0000)
committerSam McCall <sam.mccall@gmail.com>
Tue, 6 Feb 2018 10:51:22 +0000 (10:51 +0000)
llvm-svn: 324334

clang-tools-extra/test/clangd/input-mirror.test

index de6424c..88409c4 100644 (file)
@@ -6,152 +6,9 @@
 Content-Length: 125\r
 \r
 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}\r
-\r
 Content-Length: 172\r
 \r
 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"int main() {\nint a;\na;\n}\n"}}}\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":2,"character":0}}}\r
-# Go to local variable\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":2,"character":1}}}\r
-# Go to local variable, end of token\r
-\r
-Content-Length: 214\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":2},"contentChanges":[{"text":"struct Foo {\nint x;\n};\nint main() {\n  Foo bar = { x : 1 };\n}\n"}]}}\r
-\r
-Content-Length: 149\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":4,"character":14}}}\r
-# Go to field, GNU old-style field designator \r
-\r
-Content-Length: 215\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":3},"contentChanges":[{"text":"struct Foo {\nint x;\n};\nint main() {\n  Foo baz = { .x = 2 };\n}\n"}]}}\r
-\r
-Content-Length: 149\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":4,"character":15}}}\r
-# Go to field, field designator \r
-\r
-Content-Length: 187\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":4},"contentChanges":[{"text":"int main() {\n   main();\n   return 0;\n}"}]}}\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":1,"character":3}}}\r
-# Go to function declaration, function call \r
-\r
-Content-Length: 208\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":5},"contentChanges":[{"text":"struct Foo {\n};\nint main() {\n   Foo bar;\n   return 0;\n}\n"}]}}\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":3,"character":3}}}\r
-# Go to struct declaration, new struct instance \r
-\r
-Content-Length: 231\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":5},"contentChanges":[{"text":"namespace n1 {\nstruct Foo {\n};\n}\nint main() {\n   n1::Foo bar;\n   return 0;\n}\n"}]}}\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":5,"character":4}}}\r
-# Go to struct declaration, new struct instance, qualified name \r
-\r
-Content-Length: 215\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":6},"contentChanges":[{"text":"struct Foo {\n  int x;\n};\nint main() {\n   Foo bar;\n   bar.x;\n}\n"}]}}\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":5,"character":7}}}\r
-# Go to field declaration, field reference \r
-\r
-Content-Length: 220\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":7},"contentChanges":[{"text":"struct Foo {\n  void x();\n};\nint main() {\n   Foo bar;\n   bar.x();\n}\n"}]}}\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":5,"character":7}}}\r
-# Go to method declaration, method call \r
-\r
-Content-Length: 240\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":7},"contentChanges":[{"text":"struct Foo {\n};\ntypedef Foo TypedefFoo;\nint main() {\n   TypedefFoo bar;\n   return 0;\n}\n"}]}}\r
-\r
-Content-Length: 149\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":4,"character":10}}}\r
-# Go to typedef \r
-\r
-Content-Length: 254\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":7},"contentChanges":[{"text":"template <typename MyTemplateParam>\nvoid foo() {\n MyTemplateParam a;\n}\nint main() {\n   return 0;\n}\n"}]}}\r
-\r
-Content-Length: 149\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":2,"character":13}}}\r
-# Go to template type parameter. Fails until clangIndex is modified to handle those.\r
-# no-CHECK: {"jsonrpc":"2.0","id":1,"result":[{"uri": "test:///main.cpp", "range": {"start": {"line": 0, "character": 10}, "end": {"line": 0, "character": 34}}}]}\r
-\r
-Content-Length: 256\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":7},"contentChanges":[{"text":"namespace ns {\nstruct Foo {\nstatic void bar() {}\n};\n}\nint main() {\n   ns::Foo::bar();\n   return 0;\n}\n"}]}}\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":6,"character":4}}}\r
-# Go to namespace, static method call \r
-\r
-Content-Length: 265\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":7},"contentChanges":[{"text":"namespace ns {\nstruct Foo {\n  int field;\n  Foo(int param) : field(param) {}\n};\n}\nint main() {\n   return 0;\n}\n"}]}}\r
-\r
-Content-Length: 149\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":3,"character":21}}}\r
-# Go to field, member initializer \r
-\r
-Content-Length: 204\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":7},"contentChanges":[{"text":"#define MY_MACRO 0\nint main() {\n  return MY_MACRO;\n}\n"}]}}\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":2,"character":9}}}\r
-# Go to macro.\r
-\r
-Content-Length: 217\r
-\r
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":7},"contentChanges":[{"text":"#define FOO 1\nint a = FOO;\n#define FOO 2\nint b = FOO;\n#undef FOO\n"}]}}\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":1,"character":8}}}\r
-# Go to macro, re-defined later\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":3,"character":8}}}\r
-# Go to macro, undefined later\r
-\r
-Content-Length: 148\r
-\r
-{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":4,"character":7}}}\r
-# Go to macro, being undefined\r
-\r
 Content-Length: 44\r
 \r
 {"jsonrpc":"2.0","id":3,"method":"shutdown"}\r
-Content-Length: 33\r
-\r
-{"jsonrpc":"2.0":"method":"exit"}\r