OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/values.h" | 5 #include "base/values.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 #include <memory> | 10 #include <memory> |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1376 EXPECT_FALSE(main_list.GetList(0, NULL)); | 1376 EXPECT_FALSE(main_list.GetList(0, NULL)); |
1377 EXPECT_FALSE(main_list.GetList(1, NULL)); | 1377 EXPECT_FALSE(main_list.GetList(1, NULL)); |
1378 EXPECT_FALSE(main_list.GetList(2, NULL)); | 1378 EXPECT_FALSE(main_list.GetList(2, NULL)); |
1379 EXPECT_FALSE(main_list.GetList(3, NULL)); | 1379 EXPECT_FALSE(main_list.GetList(3, NULL)); |
1380 EXPECT_FALSE(main_list.GetList(4, NULL)); | 1380 EXPECT_FALSE(main_list.GetList(4, NULL)); |
1381 EXPECT_FALSE(main_list.GetList(5, NULL)); | 1381 EXPECT_FALSE(main_list.GetList(5, NULL)); |
1382 EXPECT_TRUE(main_list.GetList(6, NULL)); | 1382 EXPECT_TRUE(main_list.GetList(6, NULL)); |
1383 EXPECT_FALSE(main_list.GetList(7, NULL)); | 1383 EXPECT_FALSE(main_list.GetList(7, NULL)); |
1384 } | 1384 } |
1385 | 1385 |
| 1386 TEST(ValuesTest, SelfSwap) { |
| 1387 base::Value test(1); |
| 1388 std::swap(test, test); |
| 1389 EXPECT_TRUE(test.GetInt() == 1); |
| 1390 } |
| 1391 |
1386 } // namespace base | 1392 } // namespace base |
OLD | NEW |