Author: d0k Date: Tue Apr 24 11:40:44 2018 New Revision: 330754 URL: http://llvm.org/viewvc/llvm-project?rev=330754&view=rev Log: [clangd] Commit a heinous crime to make test hermetic and not depend on the standard library being around.
Added: clang-tools-extra/trunk/test/clangd/Inputs/ clang-tools-extra/trunk/test/clangd/Inputs/sstream.h Modified: clang-tools-extra/trunk/test/clangd/symbols.test Added: clang-tools-extra/trunk/test/clangd/Inputs/sstream.h URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clangd/Inputs/sstream.h?rev=330754&view=auto ============================================================================== --- clang-tools-extra/trunk/test/clangd/Inputs/sstream.h (added) +++ clang-tools-extra/trunk/test/clangd/Inputs/sstream.h Tue Apr 24 11:40:44 2018 @@ -0,0 +1,3 @@ +namespace std { +class basic_ostringstream {}; +} Modified: clang-tools-extra/trunk/test/clangd/symbols.test URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clangd/symbols.test?rev=330754&r1=330753&r2=330754&view=diff ============================================================================== --- clang-tools-extra/trunk/test/clangd/symbols.test (original) +++ clang-tools-extra/trunk/test/clangd/symbols.test Tue Apr 24 11:40:44 2018 @@ -1,7 +1,7 @@ -# RUN: clangd -lit-test < %s | FileCheck %s +# RUN: env CPATH=%S/Inputs clangd -lit-test < %s | FileCheck %s {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{"workspace":{"symbol":{"symbolKind":{"valueSet": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}}}},"trace":"off"}} --- -{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"#include <sstream>\nvoid foo(); int main() { foo(); }\n"}}} +{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"#include <sstream.h>\nvoid foo(); int main() { foo(); }\n"}}} --- {"jsonrpc":"2.0","id":1,"method":"workspace/symbol","params":{"query":"std::basic_ostringstream"}} # CHECK: "id": 1, @@ -21,7 +21,7 @@ # CHECK-NEXT: "line": {{.*}} # CHECK-NEXT: } # CHECK-NEXT: }, -# CHECK-NEXT: "uri": "file://{{.*}}/sstream" +# CHECK-NEXT: "uri": "file://{{.*}}/sstream.h" # CHECK-NEXT: }, # CHECK-NEXT: "name": "basic_ostringstream" # CHECK-NEXT: } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits