Skip to content

Commit b766024

Browse files
mkrainiukbb-sycl
authored andcommitted
[SYCL] Update tests with changes in device selector exception message (intel#1295)
1 parent 004dc3e commit b766024

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

SYCL/Basic/diagnostics/device-check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ int main() {
3333
if (std::string(E.what()).find("SYCL_DEVICE_TYPE is not recognized. Must "
3434
"be GPU, CPU, ACC or HOST.") ==
3535
std::string::npos &&
36-
std::string(E.what()).find("No device of requested type available.") ==
36+
std::string(E.what()).find("No device of requested type") ==
3737
std::string::npos) {
3838
std::cout << "Test failed: received error is incorrect." << std::endl;
3939
return 1;

SYCL/Config/select_device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ int main() {
350350
const auto &plt = dev.get_platform();
351351
} catch (sycl::runtime_error &E) {
352352
const std::string expectedMsg(
353-
"No device of requested type available");
353+
"No device of requested type 'info::device_type::gpu' available");
354354
const std::string gotMessage(E.what());
355355
if (gotMessage.find(expectedMsg) != std::string::npos) {
356356
passed = true;
@@ -422,7 +422,7 @@ int main() {
422422
const auto &plt = dev.get_platform();
423423
} catch (sycl::runtime_error &E) {
424424
const std::string expectedMsg(
425-
"No device of requested type available");
425+
"No device of requested type 'info::device_type::gpu' available");
426426
const std::string gotMessage(E.what());
427427
if (gotMessage.find(expectedMsg) != std::string::npos) {
428428
passed = true;

0 commit comments

Comments
 (0)