summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/TextAPI
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@ributzka.de>2018-11-29 01:55:57 +0000
committerJuergen Ributzka <juergen@ributzka.de>2018-11-29 01:55:57 +0000
commit5d1c6f884180d8782cc1d1f01789b1f5e69fe632 (patch)
tree63640bd652dd7fea73d0c69838ceaa380fdd4b2a /llvm/unittests/TextAPI
parent7353a90b117252a4765c40017666b4c6502e786c (diff)
downloadbcm5719-llvm-5d1c6f884180d8782cc1d1f01789b1f5e69fe632.tar.gz
bcm5719-llvm-5d1c6f884180d8782cc1d1f01789b1f5e69fe632.zip
[TextAPI] TBD Reader/Writer (bot fixes)
Trying if switching from a vector to an array will appeas the bots. llvm-svn: 347824
Diffstat (limited to 'llvm/unittests/TextAPI')
-rw-r--r--llvm/unittests/TextAPI/TextStubV1Tests.cpp9
-rw-r--r--llvm/unittests/TextAPI/TextStubV2Tests.cpp9
2 files changed, 10 insertions, 8 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) {
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) {
OpenPOWER on IntegriCloud