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

Unified Diff: net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
diff --git a/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc b/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
index 5681003a04d18dd891991bcc72e2125f3a5275b2..48f290ce0fe46e417ecc3477587f96b5f60ff2e6 100644
--- a/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
@@ -25,8 +25,8 @@ namespace test {
// TODO(ianswett): A number of theses tests were written with the assumption of
// an initial CWND of 10. They have carefully calculated values which should be
// updated to be based on kInitialCongestionWindowInsecure.
-const uint32 kInitialCongestionWindowPackets = 10;
-const uint32 kDefaultWindowTCP =
+const uint32_t kInitialCongestionWindowPackets = 10;
+const uint32_t kDefaultWindowTCP =
kInitialCongestionWindowPackets * kDefaultTCPMSS;
const float kRenoBeta = 0.7f; // Reno backoff factor.
@@ -371,8 +371,8 @@ TEST_F(TcpCubicBytesSenderTest, RTOCongestionWindowNoRetransmission) {
}
TEST_F(TcpCubicBytesSenderTest, RetransmissionDelay) {
- const int64 kRttMs = 10;
- const int64 kDeviationMs = 3;
+ const int64_t kRttMs = 10;
+ const int64_t kDeviationMs = 3;
EXPECT_EQ(QuicTime::Delta::Zero(), sender_->RetransmissionDelay());
sender_->rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(kRttMs),
@@ -399,10 +399,10 @@ TEST_F(TcpCubicBytesSenderTest, RetransmissionDelay) {
EXPECT_NEAR(kRttMs, sender_->rtt_stats_.smoothed_rtt().ToMilliseconds(), 1);
EXPECT_NEAR(expected_delay.ToMilliseconds(),
sender_->RetransmissionDelay().ToMilliseconds(), 1);
- EXPECT_EQ(
- static_cast<int64>(sender_->GetCongestionWindow() * kNumMicrosPerSecond /
- sender_->rtt_stats_.smoothed_rtt().ToMicroseconds()),
- sender_->BandwidthEstimate().ToBytesPerSecond());
+ EXPECT_EQ(static_cast<int64_t>(
+ sender_->GetCongestionWindow() * kNumMicrosPerSecond /
+ sender_->rtt_stats_.smoothed_rtt().ToMicroseconds()),
+ sender_->BandwidthEstimate().ToBytesPerSecond());
}
TEST_F(TcpCubicBytesSenderTest, TcpCubicResetEpochOnQuiescence) {
@@ -571,7 +571,7 @@ TEST_F(TcpCubicBytesSenderTest, 1ConnectionCongestionAvoidanceAtEndOfRecovery) {
EXPECT_FALSE(sender_->InRecovery());
// Out of recovery now. Congestion window should not grow during RTT.
- for (uint64 i = 0; i < expected_send_window / kDefaultTCPMSS - 2; i += 2) {
+ for (uint64_t i = 0; i < expected_send_window / kDefaultTCPMSS - 2; i += 2) {
// Send our full send window.
SendAvailableSendWindow();
AckNPackets(2);
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_bytes_sender.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698