Default constructor for RtcpAppHandler.
Whenever this test (RtcpApplicationDefinedPacketsCanBeSentAndReceived) fails
because it's being run on a slower system (such as one running under valgrind),
valgrind reports a lot of undefined-value errors. Initializing the data
makes sure that, while the EXPECT_EQs trigger, they don't cause any errors in
valgrind.
BUG=
R=xians@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1822004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4363 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc b/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc
index 810cb14..370fbaa 100644
--- a/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc
+++ b/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc
@@ -78,6 +78,7 @@
class RtcpAppHandler : public webrtc::VoERTCPObserver {
public:
+ RtcpAppHandler() : length_in_bytes_(0), sub_type_(0), name_(0) {}
void OnApplicationDataReceived(int channel,
unsigned char sub_type,
unsigned int name,
@@ -190,7 +191,7 @@
Sleep(1000);
// Ensure we received the data in the callback.
- EXPECT_EQ(data_length, rtcp_app_handler.length_in_bytes_);
+ ASSERT_EQ(data_length, rtcp_app_handler.length_in_bytes_);
EXPECT_EQ(0, memcmp(data, rtcp_app_handler.data_, data_length));
EXPECT_EQ(data_name, rtcp_app_handler.name_);
EXPECT_EQ(data_subtype, rtcp_app_handler.sub_type_);