From 6e3968f62a1a42401dd19d9a85b5a48199a3a45d Mon Sep 17 00:00:00 2001 From: "henrik.lundin@webrtc.org" Date: Thu, 31 Jan 2013 15:07:30 +0000 Subject: [PATCH] Fix NetEq4 unit tests for VS2012 This merges the changes from r3199. Review URL: https://webrtc-codereview.appspot.com/1078010 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3443 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../modules/audio_coding/neteq4/neteq_unittest.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/webrtc/modules/audio_coding/neteq4/neteq_unittest.cc b/webrtc/modules/audio_coding/neteq4/neteq_unittest.cc index 18f43aa73a..29e2f3f81e 100644 --- a/webrtc/modules/audio_coding/neteq4/neteq_unittest.cc +++ b/webrtc/modules/audio_coding/neteq4/neteq_unittest.cc @@ -375,16 +375,30 @@ void NetEqDecodingTest::PopulateCng(int frame_index, TEST_F(NetEqDecodingTest, TestBitExactness) { const std::string kInputRtpFile = webrtc::test::ProjectRootPath() + "resources/audio_coding/neteq_universal_new.rtp"; +#if defined(_MSC_VER) && (_MSC_VER >= 1700) + // For Visual Studio 2012 and later, we will have to use the generic reference + // file, rather than the windows-specific one. + const std::string kInputRefFile = webrtc::test::ProjectRootPath() + + "resources/audio_coding/neteq_universal_ref.pcm"; +#else const std::string kInputRefFile = webrtc::test::ResourcePath("audio_coding/neteq_universal_ref", "pcm"); +#endif DecodeAndCompare(kInputRtpFile, kInputRefFile); } TEST_F(NetEqDecodingTest, TestNetworkStatistics) { const std::string kInputRtpFile = webrtc::test::ProjectRootPath() + "resources/audio_coding/neteq_universal_new.rtp"; +#if defined(_MSC_VER) && (_MSC_VER >= 1700) + // For Visual Studio 2012 and later, we will have to use the generic reference + // file, rather than the windows-specific one. + const std::string kNetworkStatRefFile = webrtc::test::ProjectRootPath() + + "resources/audio_coding/neteq_network_stats.dat"; +#else const std::string kNetworkStatRefFile = webrtc::test::ResourcePath("audio_coding/neteq_network_stats", "dat"); +#endif const std::string kRtcpStatRefFile = webrtc::test::ResourcePath("audio_coding/neteq_rtcp_stats", "dat"); DecodeAndCheckStats(kInputRtpFile, kNetworkStatRefFile, kRtcpStatRefFile);