Skip to content

Commit

Permalink
[SYCL][E2E] Remove use of deprecated exceptions in USM e2e tests (int…
Browse files Browse the repository at this point in the history
  • Loading branch information
ayylol authored and ianayl committed Jun 13, 2024
1 parent caaa88c commit 77c2a78
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sycl/test-e2e/USM/memcpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void check_on_device(queue q, int *arr) {
[&](handler &cgh) { cgh.memcpy(nullptr, ARR, sizeof(int) * N); }); \
q.wait_and_throw(); \
assert(false && "Expected error from copying to nullptr"); \
} catch (runtime_error e) { \
} catch (exception e) { \
} \
/* Copying to nullptr should throw. */ \
q.submit([&](handler &cgh) { cgh.memcpy(nullptr, ARR, 0); }); \
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/USM/memset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ int main() {
q.submit([&](handler &cgh) { cgh.memset(nullptr, 0, N * sizeof(char)); });
q.wait_and_throw();
assert(false && "Expected error from writing to nullptr");
} catch (runtime_error e) {
} catch (exception e) {
}

// Filling to nullptr is skipped if the number of bytes to fill is 0.
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/USM/pointer_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int main() {
}
try {
D = get_pointer_device(array, ctxt);
} catch (runtime_error) {
} catch (exception) {
free(array);
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/USM/queue_wait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ int main() {
Q.memset(nullptr, 42, Size);
Q.wait_and_throw();
assert(false && "Expected to have an exception throw instead of assert");
} catch (runtime_error e) {
} catch (exception e) {
}
try {
Q.memcpy(nullptr, DevArr, Size);
Q.wait_and_throw();
assert(false && "Expected to have an exception throw instead of assert");
} catch (runtime_error e) {
} catch (exception e) {
}

Q.memset(nullptr, 42, 0);
Expand Down

0 comments on commit 77c2a78

Please sign in to comment.