提交 ba00bff2 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Cosmetic change in test "helpers.hpp"

上级 f07f1d1a
...@@ -19,7 +19,7 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -19,7 +19,7 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
uint8_t extenLen; uint8_t extenLen;
uint8_t* extenValue; uint8_t* extenValue;
if (!Helpers::ReadBinaryFile("data/packet1.raw", buffer, &len)) if (!helpers::readBinaryFile("data/packet1.raw", buffer, &len))
FAIL("cannot open file"); FAIL("cannot open file");
RtpPacket* packet = RtpPacket::Parse(buffer, len); RtpPacket* packet = RtpPacket::Parse(buffer, len);
...@@ -64,7 +64,7 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -64,7 +64,7 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
{ {
size_t len; size_t len;
if (!Helpers::ReadBinaryFile("data/packet2.raw", buffer, &len)) if (!helpers::readBinaryFile("data/packet2.raw", buffer, &len))
FAIL("cannot open file"); FAIL("cannot open file");
RtpPacket* packet = RtpPacket::Parse(buffer, len); RtpPacket* packet = RtpPacket::Parse(buffer, len);
...@@ -95,7 +95,7 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -95,7 +95,7 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
uint8_t volume; uint8_t volume;
uint32_t absSendTime; uint32_t absSendTime;
if (!Helpers::ReadBinaryFile("data/packet3.raw", buffer, &len)) if (!helpers::readBinaryFile("data/packet3.raw", buffer, &len))
FAIL("cannot open file"); FAIL("cannot open file");
RtpPacket* packet = RtpPacket::Parse(buffer, len); RtpPacket* packet = RtpPacket::Parse(buffer, len);
......
#include "common.hpp" #include "common.hpp"
#include "catch.hpp" #include "catch.hpp"
#include "helpers.hpp"
#include "RTC/RtpPacket.hpp" #include "RTC/RtpPacket.hpp"
#include "RTC/RtpStream.hpp" #include "RTC/RtpStream.hpp"
#include "RTC/RtpStreamRecv.hpp" #include "RTC/RtpStreamRecv.hpp"
......
...@@ -5,10 +5,9 @@ ...@@ -5,10 +5,9 @@
#include <string> #include <string>
#include <fstream> #include <fstream>
class Helpers namespace helpers
{ {
public: inline bool readBinaryFile(const char* file, uint8_t* buffer, size_t* len)
static bool ReadBinaryFile(const char* file, uint8_t* buffer, size_t* len)
{ {
std::string filePath = "test/" + std::string(file); std::string filePath = "test/" + std::string(file);
...@@ -23,6 +22,6 @@ public: ...@@ -23,6 +22,6 @@ public:
return true; return true;
} }
}; }
#endif #endif
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论