From 5e64d3161e1a6337edc2a153ab9d402db35a0848 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Oct 2017 13:05:41 -0700 Subject: [PATCH] Fix compilation --- test/core/transport/bdp_estimator_test.cc | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/test/core/transport/bdp_estimator_test.cc b/test/core/transport/bdp_estimator_test.cc index a944762a881..2c4fc4588b0 100644 --- a/test/core/transport/bdp_estimator_test.cc +++ b/test/core/transport/bdp_estimator_test.cc @@ -51,8 +51,7 @@ TEST(BdpEstimatorTest, NoOp) { BdpEstimator est("test"); } TEST(BdpEstimatorTest, EstimateBdpNoSamples) { BdpEstimator est("test"); - int64_t estimate; - est.EstimateBdp(&estimate); + est.EstimateBdp(); } namespace { @@ -80,16 +79,14 @@ void AddSample(BdpEstimator *estimator, int64_t sample) { TEST(BdpEstimatorTest, GetEstimate1Sample) { BdpEstimator est("test"); AddSample(&est, 100); - int64_t estimate; - est.EstimateBdp(&estimate); + est.EstimateBdp(); } TEST(BdpEstimatorTest, GetEstimate2Samples) { BdpEstimator est("test"); AddSample(&est, 100); AddSample(&est, 100); - int64_t estimate; - est.EstimateBdp(&estimate); + est.EstimateBdp(); } TEST(BdpEstimatorTest, GetEstimate3Samples) { @@ -97,17 +94,10 @@ TEST(BdpEstimatorTest, GetEstimate3Samples) { AddSample(&est, 100); AddSample(&est, 100); AddSample(&est, 100); - int64_t estimate; - est.EstimateBdp(&estimate); + est.EstimateBdp(); } namespace { -static int64_t GetEstimate(const BdpEstimator &estimator) { - int64_t out; - EXPECT_TRUE(estimator.EstimateBdp(&out)); - return out; -} - int64_t NextPow2(int64_t v) { v--; v |= v >> 1; @@ -134,7 +124,7 @@ TEST_P(BdpEstimatorRandomTest, GetEstimateRandomValues) { if (sample > max) max = sample; AddSample(&est, sample); if (i >= 3) { - EXPECT_LE(GetEstimate(est), GPR_MAX(65536, 2 * NextPow2(max))) + EXPECT_LE(est.EstimateBdp(), GPR_MAX(65536, 2 * NextPow2(max))) << " min:" << min << " max:" << max << " sample:" << sample; } }