Skip to content

Commit

Permalink
Merge pull request #835 from veselypeta/petr/fixup-cts
Browse files Browse the repository at this point in the history
[UR] Fixup minor CTS issues
  • Loading branch information
veselypeta committed Sep 1, 2023
2 parents a8e4955 + 2580e08 commit 4ce5cdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions test/conformance/event/urEventSetCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,21 @@ using urEventSetCallbackNegativeTest = uur::event::urEventTest;
void emptyCallback(ur_event_handle_t hEvent, ur_execution_info_t execStatus,
void *pUserData) {}

TEST_P(urEventSetCallbackNegativeTest, InvalidNullHandle) {

TEST_P(urEventSetCallbackNegativeTest, InvalidNullHandleEvent) {
ASSERT_EQ_RESULT(
urEventSetCallback(
nullptr,
ur_execution_info_t::UR_EXECUTION_INFO_EXECUTION_INFO_QUEUED,
emptyCallback, nullptr),
UR_RESULT_ERROR_INVALID_NULL_HANDLE);
}

TEST_P(urEventSetCallbackNegativeTest, InvalidNullPointerCallback) {
ASSERT_EQ_RESULT(
urEventSetCallback(
event, ur_execution_info_t::UR_EXECUTION_INFO_EXECUTION_INFO_QUEUED,
nullptr, nullptr),
UR_RESULT_ERROR_INVALID_NULL_HANDLE);
UR_RESULT_ERROR_INVALID_NULL_POINTER);
}

TEST_P(urEventSetCallbackNegativeTest, InvalidEnumeration) {
Expand Down
4 changes: 2 additions & 2 deletions test/conformance/memory/urMemGetInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ TEST_P(urMemGetInfoTest, InvalidNullPointerParamValue) {
size_t mem_size = 0;
ASSERT_EQ_RESULT(urMemGetInfo(buffer, UR_MEM_INFO_SIZE, sizeof(mem_size),
nullptr, nullptr),
UR_RESULT_ERROR_INVALID_SIZE);
UR_RESULT_ERROR_INVALID_NULL_POINTER);
}

TEST_P(urMemGetInfoTest, InvalidNullPointerPropSizeRet) {
ASSERT_EQ_RESULT(
urMemGetInfo(buffer, UR_MEM_INFO_SIZE, 0, nullptr, nullptr),
UR_RESULT_ERROR_INVALID_SIZE);
UR_RESULT_ERROR_INVALID_NULL_POINTER);
}

0 comments on commit 4ce5cdd

Please sign in to comment.