Skip to content

Commit 5ebe4fa

Browse files
committed
Update urProgramGetFunctionPointer test
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.
1 parent 46bbad2 commit 5ebe4fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/conformance/program/urProgramGetFunctionPointer.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ UUR_INSTANTIATE_KERNEL_TEST_SUITE_P(urProgramGetFunctionPointerTest);
2121

2222
TEST_P(urProgramGetFunctionPointerTest, Success) {
2323
void *function_pointer = nullptr;
24-
ASSERT_SUCCESS(urProgramGetFunctionPointer(
25-
device, program, function_name.data(), &function_pointer));
24+
ur_result_t res = urProgramGetFunctionPointer(
25+
device, program, function_name.data(), &function_pointer);
26+
if (res == UR_RESULT_ERROR_FUNCTION_ADDRESS_NOT_AVAILABLE) {
27+
return;
28+
}
29+
ASSERT_SUCCESS(res);
2630
ASSERT_NE(function_pointer, nullptr);
2731
}
2832

0 commit comments

Comments
 (0)