Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions offload/unittests/OffloadAPI/common/Fixtures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,16 @@
} while (0)
#endif

// TODO: rework this so the EXPECTED/ACTUAL results are readable
#ifndef ASSERT_ERROR
#define ASSERT_ERROR(EXPECTED, ACTUAL) \
do { \
ol_result_t Res = ACTUAL; \
ASSERT_TRUE(Res && (Res->Code == EXPECTED)); \
if (!Res) \
GTEST_FAIL() << #ACTUAL " succeeded when we expected it to fail"; \
if (Res->Code != EXPECTED) \
GTEST_FAIL() << #ACTUAL " was expected to return " \
<< #EXPECTED " but instead returned " << Res->Code << ": " \
<< Res->Details; \
} while (0)
#endif

Expand Down
Loading