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

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

Issue 2848203002: Add a platform implementation of QuicTest and QuicTestWithParam (Closed)
Patch Set: net/quic/platform/impl/quic_test_impl.cc Created 3 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
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/core/quic_bandwidth.h" 5 #include "net/quic/core/quic_bandwidth.h"
6 #include "net/quic/core/quic_time.h" 6 #include "net/quic/core/quic_time.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "net/quic/platform/api/quic_test.h"
8 8
9 namespace net { 9 namespace net {
10 namespace test { 10 namespace test {
11 11
12 class QuicBandwidthTest : public ::testing::Test {}; 12 class QuicBandwidthTest : public QuicTest {};
13 13
14 TEST_F(QuicBandwidthTest, FromTo) { 14 TEST_F(QuicBandwidthTest, FromTo) {
15 EXPECT_EQ(QuicBandwidth::FromKBitsPerSecond(1), 15 EXPECT_EQ(QuicBandwidth::FromKBitsPerSecond(1),
16 QuicBandwidth::FromBitsPerSecond(1000)); 16 QuicBandwidth::FromBitsPerSecond(1000));
17 EXPECT_EQ(QuicBandwidth::FromKBytesPerSecond(1), 17 EXPECT_EQ(QuicBandwidth::FromKBytesPerSecond(1),
18 QuicBandwidth::FromBytesPerSecond(1000)); 18 QuicBandwidth::FromBytesPerSecond(1000));
19 EXPECT_EQ(QuicBandwidth::FromBitsPerSecond(8000), 19 EXPECT_EQ(QuicBandwidth::FromBitsPerSecond(8000),
20 QuicBandwidth::FromBytesPerSecond(1000)); 20 QuicBandwidth::FromBytesPerSecond(1000));
21 EXPECT_EQ(QuicBandwidth::FromKBitsPerSecond(8), 21 EXPECT_EQ(QuicBandwidth::FromKBitsPerSecond(8),
22 QuicBandwidth::FromKBytesPerSecond(1)); 22 QuicBandwidth::FromKBytesPerSecond(1));
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 bandwidth = bandwidth * 1000; 114 bandwidth = bandwidth * 1000;
115 EXPECT_EQ("400.00 Mbits/s (50.00 Mbytes/s)", bandwidth.ToDebugValue()); 115 EXPECT_EQ("400.00 Mbits/s (50.00 Mbytes/s)", bandwidth.ToDebugValue());
116 116
117 bandwidth = bandwidth * 1000; 117 bandwidth = bandwidth * 1000;
118 EXPECT_EQ("400.00 Gbits/s (50.00 Gbytes/s)", bandwidth.ToDebugValue()); 118 EXPECT_EQ("400.00 Gbits/s (50.00 Gbytes/s)", bandwidth.ToDebugValue());
119 } 119 }
120 120
121 } // namespace test 121 } // namespace test
122 } // namespace net 122 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_arena_scoped_ptr_test.cc ('k') | net/quic/core/quic_buffered_packet_store_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698