Adds scalar division to DataRate.
Bug: webrtc:9709 Change-Id: I73eac1d2f27bd0f30a7b1ca075009a6aece08b03 Reviewed-on: https://webrtc-review.googlesource.com/c/110786 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25680}
This commit is contained in:
committed by
Commit Bot
parent
8ef57932b1
commit
b5f82011ba
@ -130,6 +130,9 @@ TEST(DataRateTest, MathOperations) {
|
||||
|
||||
EXPECT_EQ(rate_a / rate_b, static_cast<double>(kValueA) / kValueB);
|
||||
|
||||
EXPECT_EQ((rate_a / 10).bps(), kValueA / 10);
|
||||
EXPECT_NEAR((rate_a / 0.5).bps(), kValueA * 2, 1);
|
||||
|
||||
DataRate mutable_rate = DataRate::bps(kValueA);
|
||||
mutable_rate += rate_b;
|
||||
EXPECT_EQ(mutable_rate.bps(), kValueA + kValueB);
|
||||
|
||||
Reference in New Issue
Block a user