Skip to content

Commit

Permalink
Update urProgramGetFunctionPointer test
Browse files Browse the repository at this point in the history
The spec says that implementations may return
`UR_RESULT_ERROR_FUNCTION_ADDRESS_NOT_AVAILABLE` for this function, but
that wasn't handled by this test.
  • Loading branch information
RossBrunton committed Jan 6, 2025
1 parent 46bbad2 commit 5ebe4fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/conformance/program/urProgramGetFunctionPointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ UUR_INSTANTIATE_KERNEL_TEST_SUITE_P(urProgramGetFunctionPointerTest);

TEST_P(urProgramGetFunctionPointerTest, Success) {
void *function_pointer = nullptr;
ASSERT_SUCCESS(urProgramGetFunctionPointer(
device, program, function_name.data(), &function_pointer));
ur_result_t res = urProgramGetFunctionPointer(
device, program, function_name.data(), &function_pointer);
if (res == UR_RESULT_ERROR_FUNCTION_ADDRESS_NOT_AVAILABLE) {
return;
}
ASSERT_SUCCESS(res);
ASSERT_NE(function_pointer, nullptr);
}

Expand Down

0 comments on commit 5ebe4fa

Please sign in to comment.