[find-all-symbol] Try to fix the failure windows unittest.

llvm-svn: 270199
This commit is contained in:
Haojian Wu 2016-05-20 10:36:53 +00:00
parent ad74117af4
commit 20dec208e9
1 changed files with 7 additions and 1 deletions

View File

@ -50,6 +50,10 @@ public:
return false;
}
const std::vector<SymbolInfo>& getSymbols() const {
return Symbols;
}
private:
std::vector<SymbolInfo> Symbols;
};
@ -125,7 +129,7 @@ public:
return true;
}
private:
protected:
TestSymbolReporter Reporter;
};
@ -410,6 +414,8 @@ TEST_F(FindAllSymbolsTest, MacroTestWithIWYU) {
runFindAllSymbols(Code);
SymbolInfo Symbol =
SymbolInfo("X", SymbolInfo::SymbolKind::Macro, "bar.h", 3, {});
EXPECT_EQ(3, Reporter.getSymbols().size());
EXPECT_EQ("bar.h", Reporter.getSymbols().front().getFilePath());
EXPECT_TRUE(hasSymbol(Symbol));
Symbol = SymbolInfo("Y", SymbolInfo::SymbolKind::Macro, "bar.h", 4, {});