From 5d1c6f884180d8782cc1d1f01789b1f5e69fe632 Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Thu, 29 Nov 2018 01:55:57 +0000 Subject: [TextAPI] TBD Reader/Writer (bot fixes) Trying if switching from a vector to an array will appeas the bots. llvm-svn: 347824 --- llvm/unittests/TextAPI/TextStubV2Tests.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'llvm/unittests/TextAPI/TextStubV2Tests.cpp') diff --git a/llvm/unittests/TextAPI/TextStubV2Tests.cpp b/llvm/unittests/TextAPI/TextStubV2Tests.cpp index acce4256615..79d6cac8938 100644 --- a/llvm/unittests/TextAPI/TextStubV2Tests.cpp +++ b/llvm/unittests/TextAPI/TextStubV2Tests.cpp @@ -23,7 +23,7 @@ inline bool operator<(const ExportedSymbol &lhs, const ExportedSymbol &rhs) { return std::get<1>(lhs) < std::get<1>(rhs); } -static ExportedSymbolSeq TBDv2Symbols({ +static ExportedSymbol TBDv2Symbols[] = { {SymbolKind::GlobalSymbol, "$ld$hide$os9.0$_sym1", false, false}, {SymbolKind::GlobalSymbol, "_sym1", false, false}, {SymbolKind::GlobalSymbol, "_sym2", false, false}, @@ -42,7 +42,7 @@ static ExportedSymbolSeq TBDv2Symbols({ {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar1", false, false}, {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar2", false, false}, {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar3", false, false}, -}); +}; namespace TBDv2 { @@ -107,8 +107,9 @@ TEST(TBDv2, ReadFile) { } llvm::sort(Exports.begin(), Exports.end()); - EXPECT_EQ(TBDv2Symbols.size(), Exports.size()); - EXPECT_TRUE(std::equal(Exports.begin(), Exports.end(), TBDv2Symbols.begin())); + EXPECT_EQ(sizeof(TBDv2Symbols) / sizeof(ExportedSymbol), Exports.size()); + EXPECT_TRUE( + std::equal(Exports.begin(), Exports.end(), std::begin(TBDv2Symbols))); } TEST(TBDv2, ReadFile2) { -- cgit v1.2.3