Skip to content

Commit

Permalink
[UR] Fixup minor CTS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
veselypeta committed Aug 31, 2023
1 parent 04bd987 commit 2580e08
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 2580e08

Please sign in to comment.