Skip to content

Commit

Permalink
[tests] Enabled some CSndLossList::insert tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Jan 18, 2021
1 parent 8b4c8cd commit 42a3bb7
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/test_list.cpp
Expand Up @@ -563,7 +563,7 @@ TEST_F(CSndLossListTest, InsertFullListNoCoalesce)
CheckEmptyArray();
}

TEST_F(CSndLossListTest, DISABLED_InsertFullListNegativeOffset)
TEST_F(CSndLossListTest, InsertFullListNegativeOffset)
{
for (int i = 10000000; i < 10000000 + CSndLossListTest::SIZE; i++)
m_lossList->insert(i, i);
Expand All @@ -581,6 +581,23 @@ TEST_F(CSndLossListTest, DISABLED_InsertFullListNegativeOffset)
CheckEmptyArray();
}

TEST_F(CSndLossListTest, InsertPositiveOffsetTooFar)
{
const int32_t head_seqno = 1000;
EXPECT_EQ(m_lossList->insert(head_seqno, head_seqno), 1);
EXPECT_EQ(m_lossList->getLossLength(), 1);

// The offset of the sequence number being added does not fit
// into the size of the loss list, it must be ignored.
// Normally this situation should not happen.

const int32_t outofbound_seqno = head_seqno + CSndLossListTest::SIZE;
m_lossList->insert(outofbound_seqno, outofbound_seqno);

const int32_t outofbound_seqno2 = head_seqno + 2 * CSndLossListTest::SIZE;
m_lossList->insert(outofbound_seqno2, outofbound_seqno2);
}

/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
TEST_F(CSndLossListTest, InsertNoUpdateElement01)
Expand Down

0 comments on commit 42a3bb7

Please sign in to comment.