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

Side by Side Diff: base/containers/small_map_unittest.cc

Issue 16667019: Rename base/hash_tables to base/containers/hash_tables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « base/containers/small_map.h ('k') | base/debug/trace_event_impl.h » ('j') | 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/containers/small_map.h" 5 #include "base/containers/small_map.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <functional> 10 #include <functional>
11 #include <map> 11 #include <map>
12 12
13 #include "base/containers/hash_tables.h"
13 #include "base/logging.h" 14 #include "base/logging.h"
14 #include "base/hash_tables.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace base { 17 namespace base {
18 18
19 TEST(SmallMap, General) { 19 TEST(SmallMap, General) {
20 SmallMap<hash_map<int, int> > m; 20 SmallMap<hash_map<int, int> > m;
21 21
22 EXPECT_TRUE(m.empty()); 22 EXPECT_TRUE(m.empty());
23 23
24 m[0] = 5; 24 m[0] = 5;
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 EXPECT_EQ(4u, m.size()); 483 EXPECT_EQ(4u, m.size());
484 EXPECT_EQ(0u, m.count(-1)); 484 EXPECT_EQ(0u, m.count(-1));
485 485
486 m[5] = 5; 486 m[5] = 5;
487 EXPECT_EQ(6u, m.size()); 487 EXPECT_EQ(6u, m.size());
488 // Our functor adds an extra item when we convert to a map. 488 // Our functor adds an extra item when we convert to a map.
489 EXPECT_EQ(1u, m.count(-1)); 489 EXPECT_EQ(1u, m.count(-1));
490 } 490 }
491 491
492 } // namespace base 492 } // namespace base
OLDNEW
« no previous file with comments | « base/containers/small_map.h ('k') | base/debug/trace_event_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698