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@4363 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2013-07-17 14:25:45 +00:00
parent 64e2cbf184
commit a3f30143b7

View File

@ -78,6 +78,7 @@ void TestRtpObserver::OnIncomingSSRCChanged(int channel,
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 @@ TEST_F(RtpRtcpTest, RtcpApplicationDefinedPacketsCanBeSentAndReceived) {
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_);