Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] update tests with changes in device selector exception message #1295

Merged
merged 1 commit into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SYCL/Basic/diagnostics/device-check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main() {
if (std::string(E.what()).find("SYCL_DEVICE_TYPE is not recognized. Must "
"be GPU, CPU, ACC or HOST.") ==
std::string::npos &&
std::string(E.what()).find("No device of requested type available.") ==
std::string(E.what()).find("No device of requested type") ==
std::string::npos) {
std::cout << "Test failed: received error is incorrect." << std::endl;
return 1;
Expand Down
4 changes: 2 additions & 2 deletions SYCL/Config/select_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ int main() {
const auto &plt = dev.get_platform();
} catch (sycl::runtime_error &E) {
const std::string expectedMsg(
"No device of requested type available");
"No device of requested type 'info::device_type::gpu' available");
const std::string gotMessage(E.what());
if (gotMessage.find(expectedMsg) != std::string::npos) {
passed = true;
Expand Down Expand Up @@ -422,7 +422,7 @@ int main() {
const auto &plt = dev.get_platform();
} catch (sycl::runtime_error &E) {
const std::string expectedMsg(
"No device of requested type available");
"No device of requested type 'info::device_type::gpu' available");
const std::string gotMessage(E.what());
if (gotMessage.find(expectedMsg) != std::string::npos) {
passed = true;
Expand Down