Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: base/values_unittest.cc

Issue 2811053002: Reland of Use base::flat_map for base::Value dictionary storage. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/values.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 using namespace std; 1524 std::swap(test, test);
1525 swap(test, test);
1526 EXPECT_TRUE(test.GetInt() == 1); 1525 EXPECT_TRUE(test.GetInt() == 1);
1527 } 1526 }
1528 1527
1529 } // namespace base 1528 } // namespace base
OLDNEW
« no previous file with comments | « base/values.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698