OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "public/platform/WebVector.h" | 5 #include "public/platform/WebVector.h" |
6 | 6 |
| 7 #include "platform/wtf/StdLibExtras.h" |
| 8 #include "platform/wtf/Vector.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "wtf/StdLibExtras.h" | |
9 #include "wtf/Vector.h" | |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 TEST(WebVectorTest, Iterators) { | 13 TEST(WebVectorTest, Iterators) { |
14 Vector<int> input; | 14 Vector<int> input; |
15 for (int i = 0; i < 5; ++i) | 15 for (int i = 0; i < 5; ++i) |
16 input.push_back(i); | 16 input.push_back(i); |
17 | 17 |
18 WebVector<int> web_vector(input); | 18 WebVector<int> web_vector(input); |
19 const WebVector<int>& const_web_vector = web_vector; | 19 const WebVector<int>& const_web_vector = web_vector; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 EXPECT_EQ(input[i], vector[i]); | 118 EXPECT_EQ(input[i], vector[i]); |
119 | 119 |
120 WebVector<int> assigned; | 120 WebVector<int> assigned; |
121 assigned = input; | 121 assigned = input; |
122 ASSERT_EQ(input.size(), assigned.size()); | 122 ASSERT_EQ(input.size(), assigned.size()); |
123 for (size_t i = 0; i < assigned.size(); ++i) | 123 for (size_t i = 0; i < assigned.size(); ++i) |
124 EXPECT_EQ(input[i], assigned[i]); | 124 EXPECT_EQ(input[i], assigned[i]); |
125 } | 125 } |
126 | 126 |
127 } // namespace blink | 127 } // namespace blink |
OLD | NEW |