aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2017-12-27 13:19:21 +0100
committerMarco Bubke <marco.bubke@qt.io>2018-01-10 12:38:39 +0000
commite94d88c172a8bb3e4a3a92aceea1d5873c80657f (patch)
treebbd8776d2bba61c968e5ae19ce88c293edd7e50b /tests
parent6454e336e54bd2feb54a5ff23e0469ef58eb0dda (diff)
Clang: Cleanup symbol indexer test
Change-Id: I1cfa70d092d27949e0cf9466b190afbc40c1a591 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/unittest/symbolindexer-test.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/unit/unittest/symbolindexer-test.cpp b/tests/unit/unittest/symbolindexer-test.cpp
index 8940442ce4..09088ec637 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));
-}
}
-