Skip to content

Commit

Permalink
Merge pull request #850 from veselypeta/petr/fix-program-cts
Browse files Browse the repository at this point in the history
[UR] Fix program CTS assesion checks
  • Loading branch information
veselypeta authored Sep 6, 2023
2 parents eb061c8 + 845357b commit a3120e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
16 changes: 10 additions & 6 deletions test/conformance/program/urProgramGetBuildInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,21 @@ TEST_P(urProgramGetBuildInfoTest, Success) {
TEST_P(urProgramGetBuildInfoTest, InvalidNullHandleProgram) {
ur_program_build_status_t programBuildStatus =
UR_PROGRAM_BUILD_STATUS_ERROR;
ASSERT_SUCCESS(urProgramGetBuildInfo(
nullptr, device, UR_PROGRAM_BUILD_INFO_STATUS,
sizeof(programBuildStatus), &programBuildStatus, nullptr));
ASSERT_EQ_RESULT(urProgramGetBuildInfo(nullptr, device,
UR_PROGRAM_BUILD_INFO_STATUS,
sizeof(programBuildStatus),
&programBuildStatus, nullptr),
UR_RESULT_ERROR_INVALID_NULL_HANDLE);
}

TEST_P(urProgramGetBuildInfoTest, InvalidNullHandleDevice) {
ur_program_build_status_t programBuildStatus =
UR_PROGRAM_BUILD_STATUS_ERROR;
ASSERT_SUCCESS(urProgramGetBuildInfo(
program, nullptr, UR_PROGRAM_BUILD_INFO_STATUS,
sizeof(programBuildStatus), &programBuildStatus, nullptr));
ASSERT_EQ_RESULT(urProgramGetBuildInfo(program, nullptr,
UR_PROGRAM_BUILD_INFO_STATUS,
sizeof(programBuildStatus),
&programBuildStatus, nullptr),
UR_RESULT_ERROR_INVALID_NULL_HANDLE);
}

TEST_P(urProgramGetBuildInfoTest, InvalidEnumeration) {
Expand Down
5 changes: 3 additions & 2 deletions test/conformance/program/urProgramGetInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ TEST_P(urProgramGetInfoTest, Success) {

TEST_P(urProgramGetInfoTest, InvalidNullHandleProgram) {
uint32_t ref_count = 0;
ASSERT_SUCCESS(urProgramGetInfo(nullptr, UR_PROGRAM_INFO_REFERENCE_COUNT,
sizeof(ref_count), &ref_count, nullptr));
ASSERT_EQ_RESULT(urProgramGetInfo(nullptr, UR_PROGRAM_INFO_REFERENCE_COUNT,
sizeof(ref_count), &ref_count, nullptr),
UR_RESULT_ERROR_INVALID_NULL_HANDLE);
}

TEST_P(urProgramGetInfoTest, InvalidEnumeration) {
Expand Down

0 comments on commit a3120e7

Please sign in to comment.