From e94d88c172a8bb3e4a3a92aceea1d5873c80657f Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 27 Dec 2017 13:19:21 +0100 Subject: [PATCH] Clang: Cleanup symbol indexer test Change-Id: I1cfa70d092d27949e0cf9466b190afbc40c1a591 Reviewed-by: Ivan Donchevskii --- tests/unit/unittest/symbolindexer-test.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/unit/unittest/symbolindexer-test.cpp b/tests/unit/unittest/symbolindexer-test.cpp index 8940442ce4f..09088ec637e 100644 --- a/tests/unit/unittest/symbolindexer-test.cpp +++ b/tests/unit/unittest/symbolindexer-test.cpp @@ -57,7 +57,11 @@ using ClangBackEnd::SymbolType; class SymbolIndexer : public testing::Test { protected: - void SetUp(); + void SetUp() + { + ON_CALL(mockCollector, symbols()).WillByDefault(ReturnRef(symbolEntries)); + ON_CALL(mockCollector, sourceLocations()).WillByDefault(ReturnRef(sourceLocations)); + } protected: PathString main1Path = TESTDATA_DIR "/includecollector_main3.cpp"; @@ -163,11 +167,5 @@ TEST_F(SymbolIndexer, UpdateProjectPartsCallsInOrder) indexer.updateProjectParts({projectPart1}, Utils::clone(unsaved)); } -void SymbolIndexer::SetUp() -{ - ON_CALL(mockCollector, symbols()).WillByDefault(ReturnRef(symbolEntries)); - ON_CALL(mockCollector, sourceLocations()).WillByDefault(ReturnRef(sourceLocations)); -} } -