Fix BWE unit test build issue
git-svn-id: http://webrtc.googlecode.com/svn/trunk@762 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
61f07c3184
commit
5b15cfc6dd
@ -33,13 +33,13 @@ TEST_F(BitRateStatsTest, TestStrictMode)
|
||||
{
|
||||
WebRtc_Word64 nowMs = 0;
|
||||
// Should be initialized to 0.
|
||||
EXPECT_EQ(0, bitRate.BitRate(nowMs));
|
||||
EXPECT_EQ(0u, bitRate.BitRate(nowMs));
|
||||
bitRate.Update(1500, nowMs);
|
||||
// Expecting 12 kbps given a 1000 window with one 1500 bytes packet.
|
||||
EXPECT_EQ(12000, bitRate.BitRate(nowMs));
|
||||
EXPECT_EQ(12000u, bitRate.BitRate(nowMs));
|
||||
bitRate.Init();
|
||||
// Expecting 0 after init.
|
||||
EXPECT_EQ(0, bitRate.BitRate(nowMs));
|
||||
EXPECT_EQ(0u, bitRate.BitRate(nowMs));
|
||||
for (int i = 0; i < 100000; ++i)
|
||||
{
|
||||
if (nowMs % 10 == 0)
|
||||
@ -47,13 +47,13 @@ TEST_F(BitRateStatsTest, TestStrictMode)
|
||||
// Approximately 1200 kbps expected. Not exact since when packets
|
||||
// are removed we will jump 10 ms to the next packet.
|
||||
if (nowMs > 0 && nowMs % 2000 == 0)
|
||||
EXPECT_NEAR(1200000, bitRate.BitRate(nowMs), 6000);
|
||||
EXPECT_NEAR(1200000u, bitRate.BitRate(nowMs), 6000u);
|
||||
nowMs += 1;
|
||||
}
|
||||
nowMs += 2000;
|
||||
// The window is 2 seconds. If nothing has been received for that time
|
||||
// the estimate should be 0.
|
||||
EXPECT_EQ(0, bitRate.BitRate(nowMs));
|
||||
EXPECT_EQ(0u, bitRate.BitRate(nowMs));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user