@@ -48,15 +48,15 @@ TEST(ParseAllowListTests, CheckUnsupportedKeyNameIsHandledInSingleDeviceDesc) {
48
48
sycl::detail::AllowListParsedT ActualValue = sycl::detail::parseAllowList (
49
49
" BackendName:level_zero,SomeUnsupportedKey:gpu" );
50
50
throw std::logic_error (" sycl::runtime_error didn't throw" );
51
- } catch (sycl::runtime_error const &e) {
51
+ } catch (sycl::exception const &e) {
52
52
EXPECT_EQ (
53
53
std::string (" Unrecognized key in SYCL_DEVICE_ALLOWLIST. For "
54
54
" details, please refer to "
55
55
" https://github.com/intel/llvm/blob/sycl/sycl/doc/"
56
56
" EnvironmentVariables.md -30 (PI_ERROR_INVALID_VALUE)" ),
57
57
e.what ());
58
58
} catch (...) {
59
- FAIL () << " Expected sycl::runtime_error " ;
59
+ FAIL () << " Expected sycl::exception " ;
60
60
}
61
61
}
62
62
@@ -67,15 +67,15 @@ TEST(
67
67
sycl::detail::AllowListParsedT ActualValue = sycl::detail::parseAllowList (
68
68
" DriverVersion:{{value}}|SomeUnsupportedKey:gpu" );
69
69
throw std::logic_error (" sycl::runtime_error didn't throw" );
70
- } catch (sycl::runtime_error const &e) {
70
+ } catch (sycl::exception const &e) {
71
71
EXPECT_EQ (
72
72
std::string (" Unrecognized key in SYCL_DEVICE_ALLOWLIST. For "
73
73
" details, please refer to "
74
74
" https://github.com/intel/llvm/blob/sycl/sycl/doc/"
75
75
" EnvironmentVariables.md -30 (PI_ERROR_INVALID_VALUE)" ),
76
76
e.what ());
77
77
} catch (...) {
78
- FAIL () << " Expected sycl::runtime_error " ;
78
+ FAIL () << " Expected sycl::exception " ;
79
79
}
80
80
}
81
81
@@ -86,15 +86,15 @@ TEST(
86
86
sycl::detail::AllowListParsedT ActualValue = sycl::detail::parseAllowList (
87
87
" BackendName:level_zero|SomeUnsupportedKey:gpu" );
88
88
throw std::logic_error (" sycl::runtime_error didn't throw" );
89
- } catch (sycl::runtime_error const &e) {
89
+ } catch (sycl::exception const &e) {
90
90
EXPECT_EQ (
91
91
std::string (" Unrecognized key in SYCL_DEVICE_ALLOWLIST. For "
92
92
" details, please refer to "
93
93
" https://github.com/intel/llvm/blob/sycl/sycl/doc/"
94
94
" EnvironmentVariables.md -30 (PI_ERROR_INVALID_VALUE)" ),
95
95
e.what ());
96
96
} catch (...) {
97
- FAIL () << " Expected sycl::runtime_error " ;
97
+ FAIL () << " Expected sycl::exception " ;
98
98
}
99
99
}
100
100
@@ -104,15 +104,15 @@ TEST(ParseAllowListTests,
104
104
sycl::detail::AllowListParsedT ActualValue = sycl::detail::parseAllowList (
105
105
" DriverVersion:{{value1}}|SomeUnsupportedKey:{{value2}}" );
106
106
throw std::logic_error (" sycl::runtime_error didn't throw" );
107
- } catch (sycl::runtime_error const &e) {
107
+ } catch (sycl::exception const &e) {
108
108
EXPECT_EQ (
109
109
std::string (" Unrecognized key in SYCL_DEVICE_ALLOWLIST. For "
110
110
" details, please refer to "
111
111
" https://github.com/intel/llvm/blob/sycl/sycl/doc/"
112
112
" EnvironmentVariables.md -30 (PI_ERROR_INVALID_VALUE)" ),
113
113
e.what ());
114
114
} catch (...) {
115
- FAIL () << " Expected sycl::runtime_error " ;
115
+ FAIL () << " Expected sycl::exception " ;
116
116
}
117
117
}
118
118
@@ -131,14 +131,14 @@ TEST(ParseAllowListTests, CheckMissingOpenDoubleCurlyBracesAreHandled) {
131
131
try {
132
132
sycl::detail::AllowListParsedT ActualValue = sycl::detail::parseAllowList (
133
133
" DeviceName:regex1}},DriverVersion:{{regex1|regex2}}" );
134
- throw std::logic_error (" sycl::runtime_error didn't throw" );
135
- } catch (sycl::runtime_error const &e) {
134
+ throw std::logic_error (" sycl::exception didn't throw" );
135
+ } catch (sycl::exception const &e) {
136
136
EXPECT_EQ (std::string (" Key DeviceName of SYCL_DEVICE_ALLOWLIST "
137
137
" should have value which starts with {{ -30 "
138
138
" (PI_ERROR_INVALID_VALUE)" ),
139
139
e.what ());
140
140
} catch (...) {
141
- FAIL () << " Expected sycl::runtime_error " ;
141
+ FAIL () << " Expected sycl::exception " ;
142
142
}
143
143
}
144
144
@@ -147,13 +147,13 @@ TEST(ParseAllowListTests, CheckMissingClosedDoubleCurlyBracesAreHandled) {
147
147
sycl::detail::AllowListParsedT ActualValue = sycl::detail::parseAllowList (
148
148
" DeviceName:{{regex1}},DriverVersion:{{regex1|regex2" );
149
149
throw std::logic_error (" sycl::runtime_error didn't throw" );
150
- } catch (sycl::runtime_error const &e) {
150
+ } catch (sycl::exception const &e) {
151
151
EXPECT_EQ (std::string (" Key DriverVersion of SYCL_DEVICE_ALLOWLIST "
152
152
" should have value which ends with }} -30 "
153
153
" (PI_ERROR_INVALID_VALUE)" ),
154
154
e.what ());
155
155
} catch (...) {
156
- FAIL () << " Expected sycl::runtime_error " ;
156
+ FAIL () << " Expected sycl::exception " ;
157
157
}
158
158
}
159
159
@@ -195,15 +195,15 @@ TEST(ParseAllowListTests, CheckIncorrectBackendNameValueIsHandled) {
195
195
sycl::detail::AllowListParsedT ActualValue =
196
196
sycl::detail::parseAllowList (" BackendName:blablabla" );
197
197
throw std::logic_error (" sycl::runtime_error didn't throw" );
198
- } catch (sycl::runtime_error const &e) {
198
+ } catch (sycl::exception const &e) {
199
199
EXPECT_EQ (
200
200
std::string (" Value blablabla for key BackendName is not valid in "
201
201
" SYCL_DEVICE_ALLOWLIST. For details, please refer to "
202
202
" https://github.com/intel/llvm/blob/sycl/sycl/doc/"
203
203
" EnvironmentVariables.md -30 (PI_ERROR_INVALID_VALUE)" ),
204
204
e.what ());
205
205
} catch (...) {
206
- FAIL () << " Expected sycl::runtime_error " ;
206
+ FAIL () << " Expected sycl::exception " ;
207
207
}
208
208
}
209
209
@@ -212,15 +212,15 @@ TEST(ParseAllowListTests, CheckIncorrectDeviceTypeValueIsHandled) {
212
212
sycl::detail::AllowListParsedT ActualValue =
213
213
sycl::detail::parseAllowList (" DeviceType:blablabla" );
214
214
throw std::logic_error (" sycl::runtime_error didn't throw" );
215
- } catch (sycl::runtime_error const &e) {
215
+ } catch (sycl::exception const &e) {
216
216
EXPECT_EQ (
217
217
std::string (" Value blablabla for key DeviceType is not valid in "
218
218
" SYCL_DEVICE_ALLOWLIST. For details, please refer to "
219
219
" https://github.com/intel/llvm/blob/sycl/sycl/doc/"
220
220
" EnvironmentVariables.md -30 (PI_ERROR_INVALID_VALUE)" ),
221
221
e.what ());
222
222
} catch (...) {
223
- FAIL () << " Expected sycl::runtime_error " ;
223
+ FAIL () << " Expected sycl::exception " ;
224
224
}
225
225
}
226
226
@@ -229,7 +229,7 @@ TEST(ParseAllowListTests, CheckIncorrectDeviceVendorIdValueIsHandled) {
229
229
sycl::detail::AllowListParsedT ActualValue =
230
230
sycl::detail::parseAllowList (" DeviceVendorId:blablabla" );
231
231
throw std::logic_error (" sycl::runtime_error didn't throw" );
232
- } catch (sycl::runtime_error const &e) {
232
+ } catch (sycl::exception const &e) {
233
233
EXPECT_EQ (
234
234
std::string (" Value blablabla for key DeviceVendorId is not valid in "
235
235
" SYCL_DEVICE_ALLOWLIST. It should have the hex format. For "
@@ -238,7 +238,7 @@ TEST(ParseAllowListTests, CheckIncorrectDeviceVendorIdValueIsHandled) {
238
238
" EnvironmentVariables.md -30 (PI_ERROR_INVALID_VALUE)" ),
239
239
e.what ());
240
240
} catch (...) {
241
- FAIL () << " Expected sycl::runtime_error " ;
241
+ FAIL () << " Expected sycl::exception " ;
242
242
}
243
243
}
244
244
@@ -261,15 +261,15 @@ TEST(ParseAllowListTests, CheckExceptionIsThrownForValueWOColonDelim) {
261
261
sycl::detail::AllowListParsedT ActualValue =
262
262
sycl::detail::parseAllowList (" SomeValueWOColonDelimiter" );
263
263
throw std::logic_error (" sycl::runtime_error didn't throw" );
264
- } catch (sycl::runtime_error const &e) {
264
+ } catch (sycl::exception const &e) {
265
265
EXPECT_EQ (
266
266
std::string (" SYCL_DEVICE_ALLOWLIST has incorrect format. For "
267
267
" details, please refer to "
268
268
" https://github.com/intel/llvm/blob/sycl/sycl/"
269
269
" doc/EnvironmentVariables.md -30 (PI_ERROR_INVALID_VALUE)" ),
270
270
e.what ());
271
271
} catch (...) {
272
- FAIL () << " Expected sycl::runtime_error " ;
272
+ FAIL () << " Expected sycl::exception " ;
273
273
}
274
274
}
275
275
0 commit comments