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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 EXPECT_FALSE(main_list.GetList(2, NULL)); | 1514 EXPECT_FALSE(main_list.GetList(2, NULL)); |
1515 EXPECT_FALSE(main_list.GetList(3, NULL)); | 1515 EXPECT_FALSE(main_list.GetList(3, NULL)); |
1516 EXPECT_FALSE(main_list.GetList(4, NULL)); | 1516 EXPECT_FALSE(main_list.GetList(4, NULL)); |
1517 EXPECT_FALSE(main_list.GetList(5, NULL)); | 1517 EXPECT_FALSE(main_list.GetList(5, NULL)); |
1518 EXPECT_TRUE(main_list.GetList(6, NULL)); | 1518 EXPECT_TRUE(main_list.GetList(6, NULL)); |
1519 EXPECT_FALSE(main_list.GetList(7, NULL)); | 1519 EXPECT_FALSE(main_list.GetList(7, NULL)); |
1520 } | 1520 } |
1521 | 1521 |
1522 TEST(ValuesTest, SelfSwap) { | 1522 TEST(ValuesTest, SelfSwap) { |
1523 base::Value test(1); | 1523 base::Value test(1); |
1524 std::swap(test, test); | 1524 using namespace std; |
| 1525 swap(test, test); |
1525 EXPECT_TRUE(test.GetInt() == 1); | 1526 EXPECT_TRUE(test.GetInt() == 1); |
1526 } | 1527 } |
1527 | 1528 |
1528 } // namespace base | 1529 } // namespace base |
OLD | NEW |