Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Oct 20, 2021
1 parent 069126f commit 37fac37
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ TEST_F(CRcvBufferReadMsg, OnePacketGap)
#if ENABLE_NEW_RCVBUFFER // Expected behavior
EXPECT_FALSE(hasAvailablePackets());
EXPECT_FALSE(rcv_buffer.isRcvDataReady());
#else // Wron behavior (BUG)
#else // Wrong behavior (BUG)
EXPECT_TRUE(hasAvailablePackets());
EXPECT_TRUE(rcv_buffer.isRcvDataReady());
#endif
Expand Down Expand Up @@ -312,8 +312,10 @@ TEST_F(CRcvBufferReadMsg, AddData)
}

// Add packet to the position of oackets already read.
// Can't check, as negative offset is an error not handled by the receiver buffer.
//EXPECT_EQ(addPacket(m_init_seqno), -1);
// Can't check the old buffer, as it does not handle a negative offset.
#if ENABLE_NEW_RCVBUFFER
EXPECT_EQ(addPacket(m_init_seqno), -2);
#endif

// Add packet to a non-empty position.
EXPECT_EQ(addPacket(CSeqNo::incseq(m_init_seqno, ack_pkts)), -1);
Expand Down

0 comments on commit 37fac37

Please sign in to comment.