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

Side by Side Diff: net/quic/quic_bandwidth_test.cc

Issue 971493003: Minimally test a few things to keep them from Scythe. test-only change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Deprecate_flag_quic_limit_time_wait_list_size_87059868
Patch Set: Created 5 years, 9 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 | « no previous file | 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 "net/quic/quic_bandwidth.h" 5 #include "net/quic/quic_bandwidth.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace net { 8 namespace net {
9 namespace test { 9 namespace test {
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 EXPECT_EQ(200u, QuicBandwidth::FromKBytesPerSecond(2000).ToKBytesPerPeriod( 77 EXPECT_EQ(200u, QuicBandwidth::FromKBytesPerSecond(2000).ToKBytesPerPeriod(
78 QuicTime::Delta::FromMilliseconds(100))); 78 QuicTime::Delta::FromMilliseconds(100)));
79 } 79 }
80 80
81 TEST_F(QuicBandwidthTest, TransferTime) { 81 TEST_F(QuicBandwidthTest, TransferTime) {
82 EXPECT_EQ(QuicTime::Delta::FromSeconds(1), 82 EXPECT_EQ(QuicTime::Delta::FromSeconds(1),
83 QuicBandwidth::FromKBytesPerSecond(1).TransferTime(1000)); 83 QuicBandwidth::FromKBytesPerSecond(1).TransferTime(1000));
84 EXPECT_EQ(QuicTime::Delta::Zero(), QuicBandwidth::Zero().TransferTime(1000)); 84 EXPECT_EQ(QuicTime::Delta::Zero(), QuicBandwidth::Zero().TransferTime(1000));
85 } 85 }
86 86
87 TEST_F(QuicBandwidthTest, RelOps) {
88 const QuicBandwidth b1 = QuicBandwidth::FromKBitsPerSecond(1);
89 const QuicBandwidth b2 = QuicBandwidth::FromKBytesPerSecond(2);
90 EXPECT_EQ(b1, b1);
91 EXPECT_NE(b1, b2);
92 EXPECT_LT(b1, b2);
93 EXPECT_GT(b2, b1);
94 EXPECT_LE(b1, b1);
95 EXPECT_LE(b1, b2);
96 EXPECT_GE(b1, b1);
97 EXPECT_GE(b2, b1);
98 }
99
87 } // namespace test 100 } // namespace test
88 } // namespace net 101 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698