Unverified 提交 0a67781e authored 作者: José Luis Millán's avatar José Luis Millán 提交者: GitHub

tests: normalize hexadecimal data representation (#945)

* tests: normalize hexadecimal data representation

Each byte is represented as 0x%02x separated with comma and space within
each other.

* Update CHANGELOG
上级 60f8200f
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
* `ActiveSpeakerObserver`: Fix 'dominantspeaker' event by having a single `Producer` as argument rather than an array with a single `Producer` into it (PR #941). * `ActiveSpeakerObserver`: Fix 'dominantspeaker' event by having a single `Producer` as argument rather than an array with a single `Producer` into it (PR #941).
* `ActiveSpeakerObserver`: Fix memory leak (PR #942). * `ActiveSpeakerObserver`: Fix memory leak (PR #942).
* Fix some libwebrtc issues (PR #944). * Fix some libwebrtc issues (PR #944).
* Tests: Normalize hexadecimal data representation (PR #945).
* Update NPM deps. * Update NPM deps.
......
...@@ -12,7 +12,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]") ...@@ -12,7 +12,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]")
// clang-format off // clang-format off
uint8_t originalBuffer[] = uint8_t originalBuffer[] =
{ {
0x67,0x42,0xc0,0x33 0x67, 0x42, 0xc0, 0x33
}; };
// clang-format on // clang-format on
...@@ -40,7 +40,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]") ...@@ -40,7 +40,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]")
// clang-format off // clang-format off
uint8_t originalBuffer[] = uint8_t originalBuffer[] =
{ {
0x68,0xce,0x01,0xa8 0x68, 0xce, 0x01, 0xa8
}; };
// clang-format on // clang-format on
...@@ -68,7 +68,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]") ...@@ -68,7 +68,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]")
// clang-format off // clang-format off
uint8_t originalBuffer[] = uint8_t originalBuffer[] =
{ {
0x81,0xe0,0x00,0x4e 0x81, 0xe0, 0x00, 0x4e
}; };
// clang-format on // clang-format on
...@@ -96,7 +96,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]") ...@@ -96,7 +96,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]")
// clang-format off // clang-format off
uint8_t originalBuffer[] = uint8_t originalBuffer[] =
{ {
0x85,0xb8,0x00,0x04 0x85, 0xb8, 0x00, 0x04
}; };
// clang-format on // clang-format on
...@@ -124,7 +124,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]") ...@@ -124,7 +124,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]")
// clang-format off // clang-format off
uint8_t originalBuffer[] = uint8_t originalBuffer[] =
{ {
0x6e,0x80,0x90,0x20 0x6e, 0x80, 0x90, 0x20
}; };
// clang-format on // clang-format on
...@@ -154,7 +154,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]") ...@@ -154,7 +154,7 @@ SCENARIO("parse H264_SVC payload descriptor", "[codecs][h264_svc]")
// clang-format off // clang-format off
uint8_t originalBuffer[] = uint8_t originalBuffer[] =
{ {
0x74,0x80,0x90,0x20 0x74, 0x80, 0x90, 0x20
}; };
// clang-format on // clang-format on
......
...@@ -16,8 +16,7 @@ namespace TestFeedbackPsTstn ...@@ -16,8 +16,7 @@ namespace TestFeedbackPsTstn
0xfa, 0x17, 0xfa, 0x17, // Sender SSRC: 0xfa17fa17 0xfa, 0x17, 0xfa, 0x17, // Sender SSRC: 0xfa17fa17
0x00, 0x00, 0x00, 0x00, // Media source SSRC: 0x00000000 0x00, 0x00, 0x00, 0x00, // Media source SSRC: 0x00000000
0x02, 0xd0, 0x37, 0x02, // SSRC: 0x02d03702 0x02, 0xd0, 0x37, 0x02, // SSRC: 0x02d03702
0x08, // Seq: 8 0x08, 0x00, 0x00, 0x01 // Seq: 8, Reserved, Index: 1
0x00, 0x00, 0x01 // Reserved, Index: 1
}; };
// clang-format on // clang-format on
......
...@@ -15,7 +15,7 @@ namespace TestFeedbackRtpTllei ...@@ -15,7 +15,7 @@ namespace TestFeedbackRtpTllei
0x87, 0xcd, 0x00, 0x03, // Type: 205 (Generic RTP Feedback), Count: 7 (TLLEI) Length: 3 0x87, 0xcd, 0x00, 0x03, // Type: 205 (Generic RTP Feedback), Count: 7 (TLLEI) Length: 3
0x00, 0x00, 0x00, 0x01, // Sender SSRC: 0x00000001 0x00, 0x00, 0x00, 0x01, // Sender SSRC: 0x00000001
0x03, 0x30, 0xbd, 0xee, // Media source SSRC: 0x0330bdee 0x03, 0x30, 0xbd, 0xee, // Media source SSRC: 0x0330bdee
0x00, 0x01, 0b10101010, 0b01010101 0x00, 0x01, 0xaa, 0x55
}; };
// clang-format on // clang-format on
......
...@@ -111,9 +111,9 @@ private: ...@@ -111,9 +111,9 @@ private:
// clang-format off // clang-format off
uint8_t rtpBuffer[] = uint8_t rtpBuffer[] =
{ {
0b10000000, 0b01111011, 0b01010010, 0b00001110, 0x80, 0x7b, 0x52, 0x0e,
0b01011011, 0b01101011, 0b11001010, 0b10110101, 0x5b, 0x6b, 0xca, 0xb5,
0, 0, 0, 2 0x00, 0x00, 0x00, 0x02
}; };
// clang-format on // clang-format on
......
...@@ -172,9 +172,9 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -172,9 +172,9 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
// clang-format off // clang-format off
uint8_t buffer[] = uint8_t buffer[] =
{ {
0b10000000, 0b00000001, 0, 8, 0x80, 0x01, 0x00, 0x08,
0, 0, 0, 4, 0x00, 0x00, 0x00, 0x04,
0, 0, 0, 5 0x00, 0x00, 0x00, 0x05
}; };
// clang-format on // clang-format on
...@@ -200,13 +200,13 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -200,13 +200,13 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
// clang-format off // clang-format off
uint8_t buffer[] = uint8_t buffer[] =
{ {
0b10010000, 0b00000001, 0, 8, 0x90, 0x01, 0x00, 0x08,
0, 0, 0, 4, 0x00, 0x00, 0x00, 0x04,
0, 0, 0, 5, 0x00, 0x00, 0x00, 0x05,
0xBE, 0xDE, 0, 3, // Header Extension 0xbe, 0xde, 0x00, 0x03, // Header Extension
0b00010000, 0xFF, 0b00100001, 0xFF, 0x10, 0xff, 0x21, 0xff,
0xFF, 0, 0, 0b00110011, 0xff, 0x00, 0x00, 0x33,
0xFF, 0xFF, 0xFF, 0xFF 0xff, 0xff, 0xff, 0xff
}; };
// clang-format on // clang-format on
...@@ -241,14 +241,14 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -241,14 +241,14 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
// clang-format off // clang-format off
uint8_t buffer[] = uint8_t buffer[] =
{ {
0b10010000, 0b00000001, 0, 8, 0x90, 0x01, 0x00, 0x08,
0, 0, 0, 4, 0x00, 0x00, 0x00, 0x04,
0, 0, 0, 5, 0x00, 0x00, 0x00, 0x05,
0b00010000, 0, 0, 4, // Header Extension 0x10, 0x00, 0x00, 0x04, // Header Extension
0, 0, 1, 0, 0x00, 0x00, 0x01, 0x00,
2, 1, 0x42, 0, 0x02, 0x01, 0x42, 0x00,
3, 2, 0x11, 0x22, 0x03, 0x02, 0x11, 0x22,
0, 0, 4, 0 0x00, 0x00, 0x04, 0x00
}; };
// clang-format on // clang-format on
...@@ -307,14 +307,14 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -307,14 +307,14 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
// clang-format off // clang-format off
uint8_t buffer[] = uint8_t buffer[] =
{ {
0b10010000, 0b00000001, 0, 8, 0x90, 0x01, 0x00, 0x08,
0, 0, 0, 4, 0x00, 0x00, 0x00, 0x04,
0, 0, 0, 5, 0x00, 0x00, 0x00, 0x05,
0b00010000, 0, 0, 3, // Header Extension 0x10, 0x00, 0x00, 0x03, // Header Extension
1, 0, 2, 1, 0x01, 0x00, 0x02, 0x01,
0xFF, 0, 3, 4, 0xff, 0x00, 0x03, 0x04,
0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff,
0x11, 0x11, 0x11, 0x11 // Payload 0x11, 0x11, 0x11, 0x11 // payload
}; };
// clang-format on // clang-format on
...@@ -378,13 +378,13 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -378,13 +378,13 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
// clang-format off // clang-format off
uint8_t buffer[] = uint8_t buffer[] =
{ {
0b10110000, 0b00000001, 0, 8, 0xb0, 0x01, 0x00, 0x08,
0, 0, 0, 4, 0x00, 0x00, 0x00, 0x04,
0, 0, 0, 5, 0x00, 0x00, 0x00, 0x05,
0xBE, 0xDE, 0, 3, // Header Extension 0xbe, 0xde, 0x00, 0x03, // Header Extension
0b00010000, 0xFF, 0b00100001, 0xFF, 0x10, 0xff, 0x21, 0xff,
0xFF, 0, 0, 0b00110011, 0xff, 0x00, 0x00, 0x33,
0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff,
0x00, 0x01, 0x02, 0x03, // Payload 0x00, 0x01, 0x02, 0x03, // Payload
0x04, 0x05, 0x06, 0x07, 0x04, 0x05, 0x06, 0x07,
0x00, 0x00, 0x00, 0x04, // 4 padding bytes 0x00, 0x00, 0x00, 0x04, // 4 padding bytes
...@@ -489,12 +489,12 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -489,12 +489,12 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
// clang-format off // clang-format off
uint8_t buffer[] = uint8_t buffer[] =
{ {
0b10100000, 0b00000001, 0, 8, 0xa0, 0x01, 0x00, 0x08,
0, 0, 0, 4, 0x00, 0x00, 0x00, 0x04,
0, 0, 0, 5, 0x00, 0x00, 0x00, 0x05,
0x11, 0x22, 0x33, 0x44, // Payload 0x11, 0x22, 0x33, 0x44, // Payload
0x55, 0x66, 0x77, 0x88, 0x55, 0x66, 0x77, 0x88,
0x99, 0xAA, 0xBB, 0xCC, 0x99, 0xaa, 0xbb, 0xcc,
0x00, 0x00, 0x00, 0x04, // 4 padding bytes 0x00, 0x00, 0x00, 0x04, // 4 padding bytes
// Extra buffer // Extra buffer
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -653,12 +653,12 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -653,12 +653,12 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
// clang-format off // clang-format off
uint8_t buffer[] = uint8_t buffer[] =
{ {
0b10100000, 0b00000001, 0, 8, 0xa0, 0x01, 0x00, 0x08,
0, 0, 0, 4, 0x00, 0x00, 0x00, 0x04,
0, 0, 0, 5, 0x00, 0x00, 0x00, 0x05,
0x11, 0x22, 0x33, 0x44, // Payload 0x11, 0x22, 0x33, 0x44, // Payload
0x55, 0x66, 0x77, 0x88, 0x55, 0x66, 0x77, 0x88,
0x99, 0xAA, 0xBB, 0xCC, 0x99, 0xaa, 0xbb, 0xcc,
0x00, 0x00, 0x00, 0x04, // 4 padding bytes 0x00, 0x00, 0x00, 0x04, // 4 padding bytes
// Extra buffer // Extra buffer
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -798,12 +798,12 @@ SCENARIO("parse RTP packets", "[parser][rtp]") ...@@ -798,12 +798,12 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
// clang-format off // clang-format off
uint8_t buffer[] = uint8_t buffer[] =
{ {
0b10010000, 0b00000001, 0, 8, 0x90, 0x01, 0x00, 0x08,
0, 0, 0, 4, 0x00, 0x00, 0x00, 0x04,
0, 0, 0, 5, 0x00, 0x00, 0x00, 0x05,
0xBE, 0xDE, 0, 1, // Header Extension 0xbe, 0xde, 0x00, 0x01, // Header Extension
0b00110010, 0b10101011, 1, 5, 0x32, 0xab, 0x01, 0x05,
1, 2, 3, 4 0x01, 0x02, 0x03, 0x04
}; };
// clang-format on // clang-format on
......
...@@ -119,9 +119,9 @@ SCENARIO("receive RTP packets and trigger NACK", "[rtp][rtpstream]") ...@@ -119,9 +119,9 @@ SCENARIO("receive RTP packets and trigger NACK", "[rtp][rtpstream]")
// clang-format off // clang-format off
uint8_t buffer[] = uint8_t buffer[] =
{ {
0b10000000, 0b00000001, 0, 1, 0x80, 0x01, 0x00, 0x01,
0, 0, 0, 4, 0x00, 0x00, 0x00, 0x04,
0, 0, 0, 5 0x00, 0x00, 0x00, 0x05
}; };
// clang-format on // clang-format on
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论