Skip to content

Commit

Permalink
[tests] Added unittest for SRTO_MAXREXMITBW socket option.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Feb 20, 2024
1 parent 99fa921 commit bed5488
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test_socket_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ const OptionTestEntry g_test_matrix_options[] =
//SRTO_LINGER
{ SRTO_LOSSMAXTTL, "SRTO_LOSSMAXTTL", RestrictionType::POST, sizeof(int), 0, INT32_MAX, 0, 10, {} },
//SRTO_MAXBW
#ifdef ENABLE_MAXREXMITBW
{ SRTO_MAXREXMITBW, "SRTO_MAXREXMITBW", RestrictionType::POST, sizeof(int64_t), -1ll, INT64_MAX, - 1ll, 200000ll, {-2ll}},
#endif
{ SRTO_MESSAGEAPI, "SRTO_MESSAGEAPI", RestrictionType::PRE, sizeof(bool), false, true, true, false, {} },
//SRTO_MININPUTBW
{ SRTO_MINVERSION, "SRTO_MINVERSION", RestrictionType::PRE, sizeof(int), 0, INT32_MAX, 0x010000, 0x010300, {} },
Expand Down Expand Up @@ -234,7 +237,7 @@ template<class ValueType>
void CheckGetSockOpt(const OptionTestEntry& entry, SRTSOCKET sock, const ValueType& value, const char* desc)
{
ValueType opt_val;
int opt_len = 0;
int opt_len = entry.opt_len;
EXPECT_EQ(srt_getsockopt(sock, 0, entry.optid, &opt_val, &opt_len), SRT_SUCCESS)
<< "Getting " << entry.optname << " returned error: " << srt_getlasterror_str();

Expand Down

0 comments on commit bed5488

Please sign in to comment.