Skip to content

[TESTS] Add a macro that will verify API calls that can return -1 and set up an error #3247

@ethouris

Description

@ethouris

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions