util: Add a getter for the smoothed RTT value
Refs: #4892
Change-Id: Ic2efc6f80058cbdd0bdbe9a4047856d75b54d04e
diff --git a/tests/unit/util/rtt-estimator.t.cpp b/tests/unit/util/rtt-estimator.t.cpp
index 01fe4f8..59041e4 100644
--- a/tests/unit/util/rtt-estimator.t.cpp
+++ b/tests/unit/util/rtt-estimator.t.cpp
@@ -92,14 +92,14 @@
rttEstimator.addMeasurement(Millis(100), 1);
- BOOST_CHECK_CLOSE(rttEstimator.m_sRtt.count(), 450.0, 0.001);
+ BOOST_CHECK_CLOSE(rttEstimator.getSmoothedRtt().count(), 450.0, 0.001);
BOOST_CHECK_CLOSE(rttEstimator.m_rttVar.count(), 175.0, 0.001);
BOOST_CHECK_CLOSE(rttEstimator.getEstimatedRto().count(), 1150.0, 0.001);
// expected samples larger than 1
rttEstimator.addMeasurement(Millis(100), 5);
- BOOST_CHECK_CLOSE(rttEstimator.m_sRtt.count(), 441.25, 0.001);
+ BOOST_CHECK_CLOSE(rttEstimator.getSmoothedRtt().count(), 441.25, 0.001);
BOOST_CHECK_CLOSE(rttEstimator.m_rttVar.count(), 183.75, 0.001);
BOOST_CHECK_CLOSE(rttEstimator.getEstimatedRto().count(), 1176.25, 0.001);
@@ -110,7 +110,7 @@
// check if minRto works
rttEstimator.addMeasurement(Millis(100), 1);
- BOOST_CHECK_CLOSE(rttEstimator.m_sRtt.count(), 100.0, 0.001);
+ BOOST_CHECK_CLOSE(rttEstimator.getSmoothedRtt().count(), 100.0, 0.001);
BOOST_CHECK_CLOSE(rttEstimator.m_rttVar.count(), 22.5, 0.001);
BOOST_CHECK_CLOSE(rttEstimator.getEstimatedRto().count(), 200.0, 0.001);
@@ -121,7 +121,7 @@
// check if maxRto works
rttEstimator.addMeasurement(Millis(100), 1);
- BOOST_CHECK_CLOSE(rttEstimator.m_sRtt.count(), 1762.5, 0.001);
+ BOOST_CHECK_CLOSE(rttEstimator.getSmoothedRtt().count(), 1762.5, 0.001);
BOOST_CHECK_CLOSE(rttEstimator.m_rttVar.count(), 775.0, 0.001);
BOOST_CHECK_CLOSE(rttEstimator.getEstimatedRto().count(), 4000.0, 0.001);
}