Add a kind of macro that would expand into checking if the API call has succeeded and in case of failure it will also display the results of srt_getlasterror().
Then use this macro instead of simple EXPECT_NE with -1/SRT_ERROR in every case in every test source where the API function was called. Such as:
EXPECT_SUCCEED(srt_connect(caller, sa.get(), sa.size()));
to expand into:
EXPECT_NE(srt_connect(caller, sa.get(), sa.size()), SRT_ERROR) << ">>>*** SRT ERROR: " << srt_getlasterror_str();