提交 a2b3ddd6 authored 作者: José Luis Millán's avatar José Luis Millán

Tests: add RTCP RTPFB TLLEI tests

上级 998c5da3
......@@ -79,7 +79,7 @@ namespace RTC { namespace RTCP
inline
uint16_t TlleiItem::GetLostPacketBitmask()
{
return (uint16_t)ntohs(this->header->lost_packet_bitmask);
return this->header->lost_packet_bitmask;
}
}}
......
......@@ -9,6 +9,7 @@
#include "RTC/RTCP/Bye.h"
#include "RTC/RTCP/FeedbackRtpNack.h"
#include "RTC/RTCP/FeedbackRtpTmmb.h"
#include "RTC/RTCP/FeedbackRtpTllei.h"
#include "Logger.h"
#include <string>
......@@ -360,6 +361,8 @@ FCTMF_SUITE_BGN(test_rtcp)
fct_chk_eq_int(item->GetPacketId(), packetId);
fct_chk_eq_int(item->GetLostPacketBitmask(), lostPacketBitmask);
delete item;
}
FCT_TEST_END()
......@@ -414,5 +417,26 @@ FCTMF_SUITE_BGN(test_rtcp)
delete item;
}
FCT_TEST_END()
FCT_TEST_BGN(parse_rtpfb_tllei_item)
{
uint8_t buffer[] =
{
0x00, 0x01, 0x02, 0x00
};
uint16_t packetId = 1;
uint16_t lostPacketBitmask = 2;
TlleiItem* item = TlleiItem::Parse(buffer, sizeof(buffer));
fct_req(item != nullptr);
fct_chk_eq_int(item->GetPacketId(), packetId);
fct_chk_eq_int(item->GetLostPacketBitmask(), lostPacketBitmask);
delete item;
}
FCT_TEST_END()
}
FCTMF_SUITE_END();
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论