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

Side by Side Diff: net/quic/congestion_control/quic_max_sized_map_test.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/logging.h" 5 #include "base/logging.h"
6 #include "net/quic/congestion_control/quic_max_sized_map.h" 6 #include "net/quic/congestion_control/quic_max_sized_map.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace net { 9 namespace net {
10 namespace test { 10 namespace test {
11 11
12 class QuicMaxSizedMapTest : public ::testing::Test { 12 class QuicMaxSizedMapTest : public ::testing::Test {};
13 };
14 13
15 TEST_F(QuicMaxSizedMapTest, Basic) { 14 TEST_F(QuicMaxSizedMapTest, Basic) {
16 QuicMaxSizedMap<int, int> test_map(100); 15 QuicMaxSizedMap<int, int> test_map(100);
17 EXPECT_EQ(100u, test_map.MaxSize()); 16 EXPECT_EQ(100u, test_map.MaxSize());
18 EXPECT_EQ(0u, test_map.Size()); 17 EXPECT_EQ(0u, test_map.Size());
19 test_map.Insert(1, 2); 18 test_map.Insert(1, 2);
20 test_map.Insert(1, 3); 19 test_map.Insert(1, 3);
21 EXPECT_EQ(100u, test_map.MaxSize()); 20 EXPECT_EQ(100u, test_map.MaxSize());
22 EXPECT_EQ(2u, test_map.Size()); 21 EXPECT_EQ(2u, test_map.Size());
23 test_map.RemoveAll(); 22 test_map.RemoveAll();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 QuicMaxSizedMap<int, int>::ConstIterator it = test_map.Begin(); 56 QuicMaxSizedMap<int, int>::ConstIterator it = test_map.Begin();
58 for (int i = 0; i < 10; ++i, ++it) { 57 for (int i = 0; i < 10; ++i, ++it) {
59 EXPECT_TRUE(it != test_map.End()); 58 EXPECT_TRUE(it != test_map.End());
60 EXPECT_EQ(i, it->first); 59 EXPECT_EQ(i, it->first);
61 EXPECT_EQ(i, it->second); 60 EXPECT_EQ(i, it->second);
62 } 61 }
63 } 62 }
64 63
65 } // namespace test 64 } // namespace test
66 } // namespace net 65 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698