Skip to content

Commit

Permalink
add more tests replacing #1439
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Aug 6, 2024
1 parent 6b40894 commit ecbad4c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions worker/test/src/RTC/TestSeqManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TestSeqManagerInput<uint16_t>> inputs =
{
{ 4, 4, false, false },
{ 3, 3, false, false },
{ 65535, 65535, false, false },
};
// clang-format on

SeqManager<uint16_t> seqManager;
validate(seqManager, inputs);
}

SECTION("receive mixed numbers with a big jump, drop before jump")
{
// clang-format off
Expand Down Expand Up @@ -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<TestSeqManagerInput<uint16_t>> inputs =
{
{ 4, 1004, false, false },
{ 3, 1003, false, false },
{ 65535, 999, false, false },
};
// clang-format on

SeqManager<uint16_t> seqManager(/*initialOutput*/ 1000u);
validate(seqManager, inputs);
}

SECTION("receive mixed numbers with a big jump, drop before jump (with initial output)")
{
// clang-format off
Expand Down

0 comments on commit ecbad4c

Please sign in to comment.