summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/TextAPI/TextStubV1Tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/TextAPI/TextStubV1Tests.cpp')
-rw-r--r--llvm/unittests/TextAPI/TextStubV1Tests.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/unittests/TextAPI/TextStubV1Tests.cpp b/llvm/unittests/TextAPI/TextStubV1Tests.cpp
index e5d8e42de7b..65e9c042fad 100644
--- a/llvm/unittests/TextAPI/TextStubV1Tests.cpp
+++ b/llvm/unittests/TextAPI/TextStubV1Tests.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 TBDv1Symbols({
+static ExportedSymbol TBDv1Symbols[] = {
{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 TBDv1Symbols({
{SymbolKind::ObjectiveCInstanceVariable, "class1._ivar1", false, false},
{SymbolKind::ObjectiveCInstanceVariable, "class1._ivar2", false, false},
{SymbolKind::ObjectiveCInstanceVariable, "class1._ivar3", false, false},
-});
+};
namespace TBDv1 {
@@ -105,8 +105,9 @@ TEST(TBDv1, ReadFile) {
}
llvm::sort(Exports.begin(), Exports.end());
- EXPECT_EQ(TBDv1Symbols.size(), Exports.size());
- EXPECT_TRUE(std::equal(Exports.begin(), Exports.end(), TBDv1Symbols.begin()));
+ EXPECT_EQ(sizeof(TBDv1Symbols) / sizeof(ExportedSymbol), Exports.size());
+ EXPECT_TRUE(
+ std::equal(Exports.begin(), Exports.end(), std::begin(TBDv1Symbols)));
}
TEST(TBDv1, ReadFile2) {
OpenPOWER on IntegriCloud