#include <algorithm>
#include <map>
#include <memory>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
#include "absl/strings/str_cat.h"
#include "quiche/quic/core/congestion_control/rtt_stats.h"
#include "quiche/quic/core/congestion_control/send_algorithm_interface.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/core/quic_utils.h"
#include "quiche/quic/platform/api/quic_logging.h"
#include "quiche/quic/platform/api/quic_test.h"
#include "quiche/quic/test_tools/mock_clock.h"
#include "quiche/quic/test_tools/quic_config_peer.h"
#include "quiche/quic/test_tools/quic_connection_peer.h"
#include "quiche/quic/test_tools/quic_sent_packet_manager_peer.h"
#include "quiche/quic/test_tools/quic_test_utils.h"
#include "quiche/quic/test_tools/simulator/quic_endpoint.h"
#include "quiche/quic/test_tools/simulator/simulator.h"
#include "quiche/quic/test_tools/simulator/switch.h"
namespace quic {
namespace test {
namespace {
const uint32_t kInitialCongestionWindowPackets = …;
const QuicBandwidth kLocalLinkBandwidth = …;
const QuicTime::Delta kLocalPropagationDelay = …;
const QuicBandwidth kTestLinkWiredBandwidth = …;
const QuicTime::Delta kTestLinkWiredPropagationDelay = …;
const QuicTime::Delta kTestWiredTransferTime = …;
const QuicTime::Delta kTestWiredRtt = …;
const QuicByteCount kTestWiredBdp = …;
const QuicBandwidth kTestLinkLowBdpBandwidth = …;
const QuicTime::Delta kTestLinkLowBdpPropagationDelay = …;
const QuicByteCount kTestPolicerQueue = …;
const QuicTime::Delta kTestSatellitePropagationDelay = …;
const QuicBandwidth kTestLink2GBandwidth = …;
const QuicBandwidth kTestLink3GBandwidth = …;
const QuicByteCount kCellularQueue = …;
const QuicTime::Delta kTestCellularPropagationDelay = …;
const QuicTime::Delta kTestLinkSmallRTTDelay = …;
struct TestParams { … };
std::string TestParamToString(
const testing::TestParamInfo<TestParams>& params) { … }
std::vector<TestParams> GetTestParams() { … }
}
class SendAlgorithmTest : public QuicTestWithParam<TestParams> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(SendAlgorithmTest, SimpleWiredNetworkTransfer) { … }
TEST_P(SendAlgorithmTest, LowBdpPolicedNetworkTransfer) { … }
TEST_P(SendAlgorithmTest, AppLimitedBurstsOverWiredNetwork) { … }
TEST_P(SendAlgorithmTest, SatelliteNetworkTransfer) { … }
TEST_P(SendAlgorithmTest, 2GNetworkTransfer) { … }
TEST_P(SendAlgorithmTest, 3GNetworkTransfer) { … }
TEST_P(SendAlgorithmTest, LowRTTTransfer) { … }
}
}