Chromium Code Reviews| Index: webrtc/base/array_view_unittest.cc |
| diff --git a/webrtc/base/array_view_unittest.cc b/webrtc/base/array_view_unittest.cc |
| index 0d1bff03d11de11ec3efccf91502b9d4d0ad6416..316a2d58dc2579bd107a5e41c42943b5923f2468 100644 |
| --- a/webrtc/base/array_view_unittest.cc |
| +++ b/webrtc/base/array_view_unittest.cc |
| @@ -214,4 +214,19 @@ TEST(ArrayViewTest, TestIteration) { |
| } |
| } |
| +TEST(ArrayViewTest, TestEmpty) { |
| + EXPECT_TRUE(ArrayView<int>().empty()); |
| + const int a[] = {1, 2, 3}; |
| + EXPECT_FALSE(ArrayView<const int>(a).empty()); |
| +} |
| + |
| +TEST(ArrayViewTest, TestCompare) { |
|
hlundin-webrtc
2015/11/05 15:22:28
Is it conceivable to have two ArrayViews with the
kwiberg-webrtc
2015/11/05 19:00:07
Yes, that's of course entirely possible. Will add
|
| + int a[] = {1, 2, 3}; |
| + int b[] = {1, 2, 3}; |
| + EXPECT_EQ(ArrayView<int>(a), ArrayView<int>(a)); |
| + EXPECT_EQ(ArrayView<int>(), ArrayView<int>()); |
| + EXPECT_NE(ArrayView<int>(a), ArrayView<int>(b)); |
| + EXPECT_NE(ArrayView<int>(a), ArrayView<int>()); |
| +} |
| + |
| } // namespace rtc |