aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/transport
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-10-18 13:05:41 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-10-18 13:05:41 -0700
commit5e64d3161e1a6337edc2a153ab9d402db35a0848 (patch)
tree0cb06e2e84ce4e6362ae18af61c974b66bc9f8df /test/core/transport
parentf83b6ce151333bec0442191a88a8b58aad0a2ce7 (diff)
Fix compilation
Diffstat (limited to 'test/core/transport')
-rw-r--r--test/core/transport/bdp_estimator_test.cc20
1 files changed, 5 insertions, 15 deletions
diff --git a/test/core/transport/bdp_estimator_test.cc b/test/core/transport/bdp_estimator_test.cc
index a944762a88..2c4fc4588b 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;
}
}