From 13e503f68a0ec42807c46aa76540b3eb06450b9d Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Fri, 15 Jun 2018 08:55:00 +0000 Subject: [clangd] Customizable URI schemes for dynamic index. Summary: This allows dynamic index to have consistent URI schemes with the static index which can have customized URI schemes, which would make file proximity scoring based on URIs easier. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47931 llvm-svn: 334809 --- clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp') diff --git a/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp b/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp index 19822b23a0b..531377dbc02 100644 --- a/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp +++ b/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp @@ -372,17 +372,15 @@ TEST_F(SymbolCollectorTest, SymbolRelativeWithFallback) { UnorderedElementsAre(AllOf(QName("Foo"), DeclURI(TestHeaderURI)))); } -#ifndef _WIN32 TEST_F(SymbolCollectorTest, CustomURIScheme) { // Use test URI scheme from URITests.cpp CollectorOpts.URISchemes.insert(CollectorOpts.URISchemes.begin(), "unittest"); - TestHeaderName = testPath("test-root/x.h"); - TestFileName = testPath("test-root/x.cpp"); + TestHeaderName = testPath("x.h"); + TestFileName = testPath("x.cpp"); runSymbolCollector("class Foo {};", /*Main=*/""); - EXPECT_THAT(Symbols, - UnorderedElementsAre(AllOf(QName("Foo"), DeclURI("unittest:x.h")))); + EXPECT_THAT(Symbols, UnorderedElementsAre( + AllOf(QName("Foo"), DeclURI("unittest:///x.h")))); } -#endif TEST_F(SymbolCollectorTest, InvalidURIScheme) { // Use test URI scheme from URITests.cpp -- cgit v1.2.3