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:
parent
64e2cbf184
commit
a3f30143b7
@ -78,6 +78,7 @@ void TestRtpObserver::OnIncomingSSRCChanged(int channel,
|
|||||||
|
|
||||||
class RtcpAppHandler : public webrtc::VoERTCPObserver {
|
class RtcpAppHandler : public webrtc::VoERTCPObserver {
|
||||||
public:
|
public:
|
||||||
|
RtcpAppHandler() : length_in_bytes_(0), sub_type_(0), name_(0) {}
|
||||||
void OnApplicationDataReceived(int channel,
|
void OnApplicationDataReceived(int channel,
|
||||||
unsigned char sub_type,
|
unsigned char sub_type,
|
||||||
unsigned int name,
|
unsigned int name,
|
||||||
@ -190,7 +191,7 @@ TEST_F(RtpRtcpTest, RtcpApplicationDefinedPacketsCanBeSentAndReceived) {
|
|||||||
Sleep(1000);
|
Sleep(1000);
|
||||||
|
|
||||||
// Ensure we received the data in the callback.
|
// 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(0, memcmp(data, rtcp_app_handler.data_, data_length));
|
||||||
EXPECT_EQ(data_name, rtcp_app_handler.name_);
|
EXPECT_EQ(data_name, rtcp_app_handler.name_);
|
||||||
EXPECT_EQ(data_subtype, rtcp_app_handler.sub_type_);
|
EXPECT_EQ(data_subtype, rtcp_app_handler.sub_type_);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user