From fc9b903fbe946dd89eab3189766c9d75bd565985 Mon Sep 17 00:00:00 2001 From: "henrik.lundin@webrtc.org" Date: Tue, 29 Nov 2011 15:38:27 +0000 Subject: [PATCH] Enable NetEQ statistics unit testing Adding test target NetEqDecodingTest::TestNetworkStatistics. Update neteq_unittest to get files from resources folder. Update DEPS file to get resources revision 2. Review URL: http://webrtc-codereview.appspot.com/291013 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1050 4adac7df-926f-26a2-2b94-8c16560cd09d --- DEPS | 2 +- .../audio_coding/neteq/webrtc_neteq_unittest.cc | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index 34985734c5..2895c4c53c 100644 --- a/DEPS +++ b/DEPS @@ -14,7 +14,7 @@ vars = { # External resources like video and audio files used for testing purposes. # Downloaded on demand when needed. - "webrtc_resources_revision": "1", + "webrtc_resources_revision": "2", } # NOTE: Prefer revision numbers to tags for svn deps. diff --git a/src/modules/audio_coding/neteq/webrtc_neteq_unittest.cc b/src/modules/audio_coding/neteq/webrtc_neteq_unittest.cc index 45f5b9613b..b3a83d2500 100644 --- a/src/modules/audio_coding/neteq/webrtc_neteq_unittest.cc +++ b/src/modules/audio_coding/neteq/webrtc_neteq_unittest.cc @@ -335,13 +335,21 @@ void NetEqDecodingTest::DecodeAndCheckStats(const std::string &rtp_file, #if defined(WEBRTC_LINUX) && defined(WEBRTC_ARCH_64_BITS) TEST_F(NetEqDecodingTest, TestBitExactness) { const std::string kInputRtpFile = webrtc::test::ProjectRootPath() + - "test/data/audio_coding/universal.rtp"; + "resources/neteq_universal.rtp"; const std::string kInputRefFile = webrtc::test::ProjectRootPath() + - "test/data/audio_coding/universal_ref.pcm"; + "resources/neteq_universal_ref_linux_64.pcm"; DecodeAndCompare(kInputRtpFile, kInputRefFile); } #endif // defined(WEBRTC_LINUX) && defined(WEBRTC_ARCH_64_BITS) -//TODO(hlundin): Add test target NetEqDecodingTest::TestNetworkStatistics. +TEST_F(NetEqDecodingTest, TestNetworkStatistics) { + const std::string kInputRtpFile = webrtc::test::ProjectRootPath() + + "resources/neteq_universal.rtp"; + const std::string kNetworkStatRefFile = webrtc::test::ProjectRootPath() + + "resources/neteq_network_stats.dat"; + const std::string kRtcpStatRefFile = webrtc::test::ProjectRootPath() + + "resources/neteq_rtcp_stats.dat"; + DecodeAndCheckStats(kInputRtpFile, kNetworkStatRefFile, kRtcpStatRefFile); +} } // namespace