aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/ADT/ArrayRefTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ADT/ArrayRefTest.cpp')
-rw-r--r--unittests/ADT/ArrayRefTest.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/unittests/ADT/ArrayRefTest.cpp b/unittests/ADT/ArrayRefTest.cpp
index 70f8208..6955036 100644
--- a/unittests/ADT/ArrayRefTest.cpp
+++ b/unittests/ADT/ArrayRefTest.cpp
@@ -57,24 +57,24 @@ TEST(ArrayRefTest, DropBack) {
TEST(ArrayRefTest, Equals) {
static const int A1[] = {1, 2, 3, 4, 5, 6, 7, 8};
ArrayRef<int> AR1(A1);
- EXPECT_TRUE(AR1.equals(1, 2, 3, 4, 5, 6, 7, 8));
- EXPECT_FALSE(AR1.equals(8, 1, 2, 4, 5, 6, 6, 7));
- EXPECT_FALSE(AR1.equals(2, 4, 5, 6, 6, 7, 8, 1));
- EXPECT_FALSE(AR1.equals(0, 1, 2, 4, 5, 6, 6, 7));
- EXPECT_FALSE(AR1.equals(1, 2, 42, 4, 5, 6, 7, 8));
- EXPECT_FALSE(AR1.equals(42, 2, 3, 4, 5, 6, 7, 8));
- EXPECT_FALSE(AR1.equals(1, 2, 3, 4, 5, 6, 7, 42));
- EXPECT_FALSE(AR1.equals(1, 2, 3, 4, 5, 6, 7));
- EXPECT_FALSE(AR1.equals(1, 2, 3, 4, 5, 6, 7, 8, 9));
+ EXPECT_TRUE(AR1.equals({1, 2, 3, 4, 5, 6, 7, 8}));
+ EXPECT_FALSE(AR1.equals({8, 1, 2, 4, 5, 6, 6, 7}));
+ EXPECT_FALSE(AR1.equals({2, 4, 5, 6, 6, 7, 8, 1}));
+ EXPECT_FALSE(AR1.equals({0, 1, 2, 4, 5, 6, 6, 7}));
+ EXPECT_FALSE(AR1.equals({1, 2, 42, 4, 5, 6, 7, 8}));
+ EXPECT_FALSE(AR1.equals({42, 2, 3, 4, 5, 6, 7, 8}));
+ EXPECT_FALSE(AR1.equals({1, 2, 3, 4, 5, 6, 7, 42}));
+ EXPECT_FALSE(AR1.equals({1, 2, 3, 4, 5, 6, 7}));
+ EXPECT_FALSE(AR1.equals({1, 2, 3, 4, 5, 6, 7, 8, 9}));
ArrayRef<int> AR1a = AR1.drop_back();
- EXPECT_TRUE(AR1a.equals(1, 2, 3, 4, 5, 6, 7));
- EXPECT_FALSE(AR1a.equals(1, 2, 3, 4, 5, 6, 7, 8));
+ EXPECT_TRUE(AR1a.equals({1, 2, 3, 4, 5, 6, 7}));
+ EXPECT_FALSE(AR1a.equals({1, 2, 3, 4, 5, 6, 7, 8}));
ArrayRef<int> AR1b = AR1a.slice(2, 4);
- EXPECT_TRUE(AR1b.equals(3, 4, 5, 6));
- EXPECT_FALSE(AR1b.equals(2, 3, 4, 5, 6));
- EXPECT_FALSE(AR1b.equals(3, 4, 5, 6, 7));
+ EXPECT_TRUE(AR1b.equals({3, 4, 5, 6}));
+ EXPECT_FALSE(AR1b.equals({2, 3, 4, 5, 6}));
+ EXPECT_FALSE(AR1b.equals({3, 4, 5, 6, 7}));
}
TEST(ArrayRefTest, EmptyEquals) {