Fix test issues and a win compile error introduced with r6605.

Also changes the name of a variable which has been hijacked by windef.h (included by windows.h), which forces #define near and #define far upon us. This issue was introduced via the following inclusion chain:
bwe_test_framework_unittest.cc includes
  paced_sender.h
    tick_util.h
      windows.h
        windef.h

And causes EXPECT_NEAR(foo, bar, near); to expand to EXPECT_NEAR(foo, bar,); generating a very confusing compile error.

R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/20849004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6606 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org
2014-07-04 17:00:06 +00:00
parent 875ad49dee
commit bee164a214
2 changed files with 30 additions and 2 deletions

View File

@@ -500,7 +500,7 @@ TEST(BweTestFramework_JitterFilterTest, Jitter1031) {
TestJitterFilter(1031);
}
static void TestReorderFilter(uint32_t reorder_percent, uint32_t near) {
static void TestReorderFilter(uint32_t reorder_percent, uint32_t near_value) {
const uint32_t kPacketCount = 10000;
// Generate packets with 10 ms interval.
@@ -533,7 +533,8 @@ static void TestReorderFilter(uint32_t reorder_percent, uint32_t near) {
// Because reordering is random, we allow a threshold when comparing. The
// maximum distance a packet can be moved is PacketCount - 1.
EXPECT_NEAR(((kPacketCount - 1) * reorder_percent) / 100, distance, near);
EXPECT_NEAR(
((kPacketCount - 1) * reorder_percent) / 100, distance, near_value);
}
TEST(BweTestFramework_ReorderFilterTest, Reorder0) {