From ecbad4c823adfbce2577ec3a30bcfdccd7e6da6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Tue, 6 Aug 2024 18:38:21 +0200 Subject: [PATCH] add more tests replacing https://github.com/versatica/mediasoup/pull/1439 --- worker/test/src/RTC/TestSeqManager.cpp | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/worker/test/src/RTC/TestSeqManager.cpp b/worker/test/src/RTC/TestSeqManager.cpp index 1b90581128..9ae42b7ddd 100644 --- a/worker/test/src/RTC/TestSeqManager.cpp +++ b/worker/test/src/RTC/TestSeqManager.cpp @@ -176,6 +176,21 @@ SCENARIO("SeqManager", "[rtc][SeqMananger]") validate(seqManager2, inputs); } + SECTION("receive out of order numbers with a big jump") + { + // clang-format off + std::vector> inputs = + { + { 4, 4, false, false }, + { 3, 3, false, false }, + { 65535, 65535, false, false }, + }; + // clang-format on + + SeqManager seqManager; + validate(seqManager, inputs); + } + SECTION("receive mixed numbers with a big jump, drop before jump") { // clang-format off @@ -848,6 +863,21 @@ SCENARIO("SeqManager", "[rtc][SeqMananger]") validate(seqManager2, inputs2); } + SECTION("receive out of order numbers with a big jump (with initial output)") + { + // clang-format off + std::vector> inputs = + { + { 4, 1004, false, false }, + { 3, 1003, false, false }, + { 65535, 999, false, false }, + }; + // clang-format on + + SeqManager seqManager(/*initialOutput*/ 1000u); + validate(seqManager, inputs); + } + SECTION("receive mixed numbers with a big jump, drop before jump (with initial output)") { // clang-format off