Skip to content

Commit 01e6bc2

Browse files
Merge pull request #379 from IntelPython/cleanup/tests
Cleanup/tests
2 parents ccd2d03 + b3ac22e commit 01e6bc2

12 files changed

+185
-90
lines changed

dpctl-capi/tests/test_sycl_context_interface.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ struct TestDPCTLContextInterface : public ::testing::TestWithParam<const char *>
6969
}
7070
};
7171

72-
TEST_P(TestDPCTLContextInterface, Chk_Create)
72+
TEST_P(TestDPCTLContextInterface, ChkCreate)
7373
{
7474
DPCTLSyclContextRef CRef = nullptr;
7575
EXPECT_NO_FATAL_FAILURE(CRef = DPCTLContext_Create(DRef, nullptr, 0));
7676
ASSERT_TRUE(CRef);
7777
EXPECT_NO_FATAL_FAILURE(DPCTLContext_Delete(CRef));
7878
}
7979

80-
TEST_P(TestDPCTLContextInterface, Chk_CreateWithDevices)
80+
TEST_P(TestDPCTLContextInterface, ChkCreateWithDevices)
8181
{
8282
size_t nCUs = 0;
8383
DPCTLSyclContextRef CRef = nullptr;
@@ -107,7 +107,7 @@ TEST_P(TestDPCTLContextInterface, Chk_CreateWithDevices)
107107
EXPECT_NO_FATAL_FAILURE(DPCTLContext_Delete(CRef));
108108
}
109109

110-
TEST_P(TestDPCTLContextInterface, Chk_CreateWithDevices_GetDevices)
110+
TEST_P(TestDPCTLContextInterface, ChkCreateWithDevicesGetDevices)
111111
{
112112
size_t nCUs = 0;
113113
DPCTLSyclContextRef CRef = nullptr;
@@ -146,7 +146,7 @@ TEST_P(TestDPCTLContextInterface, Chk_CreateWithDevices_GetDevices)
146146
EXPECT_NO_FATAL_FAILURE(DPCTLDeviceVector_Delete(Res_DVRef));
147147
}
148148

149-
TEST_P(TestDPCTLContextInterface, Chk_GetDevices)
149+
TEST_P(TestDPCTLContextInterface, ChkGetDevices)
150150
{
151151
DPCTLSyclContextRef CRef = nullptr;
152152
DPCTLDeviceVectorRef DVRef = nullptr;
@@ -159,7 +159,7 @@ TEST_P(TestDPCTLContextInterface, Chk_GetDevices)
159159
EXPECT_NO_FATAL_FAILURE(DPCTLDeviceVector_Delete(DVRef));
160160
}
161161

162-
TEST_P(TestDPCTLContextInterface, Chk_AreEq)
162+
TEST_P(TestDPCTLContextInterface, ChkAreEq)
163163
{
164164
DPCTLSyclContextRef CRef1 = nullptr, CRef2 = nullptr, CRef3 = nullptr;
165165
bool are_eq = true, are_not_eq = false;
@@ -183,7 +183,7 @@ TEST_P(TestDPCTLContextInterface, Chk_AreEq)
183183
EXPECT_NO_FATAL_FAILURE(DPCTLContext_Delete(CRef3));
184184
}
185185

186-
TEST_P(TestDPCTLContextInterface, Chk_IsHost)
186+
TEST_P(TestDPCTLContextInterface, ChkIsHost)
187187
{
188188
DPCTLSyclContextRef CRef = nullptr;
189189
bool is_host_device = false, is_host_context = false;
@@ -198,7 +198,7 @@ TEST_P(TestDPCTLContextInterface, Chk_IsHost)
198198
EXPECT_NO_FATAL_FAILURE(DPCTLContext_Delete(CRef));
199199
}
200200

201-
TEST_P(TestDPCTLContextInterface, Chk_GetBackend)
201+
TEST_P(TestDPCTLContextInterface, ChkGetBackend)
202202
{
203203
DPCTLSyclContextRef CRef = nullptr;
204204
DPCTLSyclBackendType context_backend = DPCTL_UNKNOWN_BACKEND,

dpctl-capi/tests/test_sycl_device_aspects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ struct TestDPCTLSyclDeviceInterfaceAspects
152152
}
153153
};
154154

155-
TEST_P(TestDPCTLSyclDeviceInterfaceAspects, Chk_HasAspect)
155+
TEST_P(TestDPCTLSyclDeviceInterfaceAspects, ChkHasAspect)
156156
{
157157
bool actual = false;
158158
auto dpctlAspect = DPCTL_StrToAspectType(GetParam().second.first);

dpctl-capi/tests/test_sycl_device_interface.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ struct TestDPCTLSyclDeviceInterface
6363
}
6464
};
6565

66-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_Copy)
66+
TEST_P(TestDPCTLSyclDeviceInterface, ChkCopy)
6767
{
6868
DPCTLSyclDeviceRef Copied_DRef = nullptr;
6969
EXPECT_NO_FATAL_FAILURE(Copied_DRef = DPCTLDevice_Copy(DRef));
7070
EXPECT_TRUE(bool(Copied_DRef));
7171
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_Delete(Copied_DRef));
7272
}
7373

74-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetBackend)
74+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetBackend)
7575
{
7676
DPCTLSyclBackendType BTy = DPCTLSyclBackendType::DPCTL_UNKNOWN_BACKEND;
7777
EXPECT_NO_FATAL_FAILURE(BTy = DPCTLDevice_GetBackend(DRef));
@@ -91,61 +91,61 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetBackend)
9191
}());
9292
}
9393

94-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetDeviceType)
94+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetDeviceType)
9595
{
9696
DPCTLSyclDeviceType DTy = DPCTLSyclDeviceType::DPCTL_UNKNOWN_DEVICE;
9797
EXPECT_NO_FATAL_FAILURE(DTy = DPCTLDevice_GetDeviceType(DRef));
9898
EXPECT_TRUE(DTy != DPCTLSyclDeviceType::DPCTL_UNKNOWN_DEVICE);
9999
EXPECT_TRUE(DTy != DPCTLSyclDeviceType::DPCTL_ALL);
100100
}
101101

102-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetDriverInfo)
102+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetDriverInfo)
103103
{
104104
const char *DriverInfo = nullptr;
105105
EXPECT_NO_FATAL_FAILURE(DriverInfo = DPCTLDevice_GetDriverInfo(DRef));
106106
EXPECT_TRUE(DriverInfo != nullptr);
107107
EXPECT_NO_FATAL_FAILURE(DPCTLCString_Delete(DriverInfo));
108108
}
109109

110-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetName)
110+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetName)
111111
{
112112
const char *Name = nullptr;
113113
EXPECT_NO_FATAL_FAILURE(Name = DPCTLDevice_GetName(DRef));
114114
EXPECT_TRUE(Name != nullptr);
115115
EXPECT_NO_FATAL_FAILURE(DPCTLCString_Delete(Name));
116116
}
117117

118-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetVendorName)
118+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetVendorName)
119119
{
120120
const char *VendorName = nullptr;
121121
EXPECT_NO_FATAL_FAILURE(VendorName = DPCTLDevice_GetVendorName(DRef));
122122
EXPECT_TRUE(VendorName != nullptr);
123123
EXPECT_NO_FATAL_FAILURE(DPCTLCString_Delete(VendorName));
124124
}
125125

126-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxComputeUnits)
126+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxComputeUnits)
127127
{
128128
size_t n = 0;
129129
EXPECT_NO_FATAL_FAILURE(n = DPCTLDevice_GetMaxComputeUnits(DRef));
130130
EXPECT_TRUE(n > 0);
131131
}
132132

133-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWorkItemDims)
133+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWorkItemDims)
134134
{
135135
size_t n = 0;
136136
EXPECT_NO_FATAL_FAILURE(n = DPCTLDevice_GetMaxWorkItemDims(DRef));
137137
EXPECT_TRUE(n > 0);
138138
}
139139

140-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWorkItemSizes)
140+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWorkItemSizes)
141141
{
142142
size_t *sizes = nullptr;
143143
EXPECT_NO_FATAL_FAILURE(sizes = DPCTLDevice_GetMaxWorkItemSizes(DRef));
144144
EXPECT_TRUE(sizes != nullptr);
145145
EXPECT_NO_FATAL_FAILURE(DPCTLSize_t_Array_Delete(sizes));
146146
}
147147

148-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWorkGroupSize)
148+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWorkGroupSize)
149149
{
150150
size_t n = 0;
151151
EXPECT_NO_FATAL_FAILURE(n = DPCTLDevice_GetMaxWorkGroupSize(DRef));
@@ -155,7 +155,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWorkGroupSize)
155155
EXPECT_TRUE(n > 0);
156156
}
157157

158-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxNumSubGroups)
158+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxNumSubGroups)
159159
{
160160
size_t n = 0;
161161
EXPECT_NO_FATAL_FAILURE(n = DPCTLDevice_GetMaxNumSubGroups(DRef));
@@ -165,35 +165,35 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxNumSubGroups)
165165
EXPECT_TRUE(n > 0);
166166
}
167167

168-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPlatform)
168+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPlatform)
169169
{
170170
DPCTLSyclPlatformRef PRef = nullptr;
171171
EXPECT_NO_FATAL_FAILURE(PRef = DPCTLDevice_GetPlatform(DRef));
172172
ASSERT_TRUE(PRef);
173173
EXPECT_NO_FATAL_FAILURE(DPCTLPlatform_Delete(PRef));
174174
}
175175

176-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_IsAccelerator)
176+
TEST_P(TestDPCTLSyclDeviceInterface, ChkIsAccelerator)
177177
{
178178
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_IsAccelerator(DRef));
179179
}
180180

181-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_IsCPU)
181+
TEST_P(TestDPCTLSyclDeviceInterface, ChkIsCPU)
182182
{
183183
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_IsCPU(DRef));
184184
}
185185

186-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_IsGPU)
186+
TEST_P(TestDPCTLSyclDeviceInterface, ChkIsGPU)
187187
{
188188
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_IsGPU(DRef));
189189
}
190190

191-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_IsHost)
191+
TEST_P(TestDPCTLSyclDeviceInterface, ChkIsHost)
192192
{
193193
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_IsHost(DRef));
194194
}
195195

196-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetSubGroupIndependentForwardProgress)
196+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetSubGroupIndependentForwardProgress)
197197
{
198198
bool sub_group_progress = 0;
199199
EXPECT_NO_FATAL_FAILURE(
@@ -205,47 +205,47 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetSubGroupIndependentForwardProgress)
205205
EXPECT_TRUE(get_sub_group_progress == sub_group_progress);
206206
}
207207

208-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthChar)
208+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthChar)
209209
{
210210
size_t vector_width_char = 0;
211211
EXPECT_NO_FATAL_FAILURE(vector_width_char =
212212
DPCTLDevice_GetPreferredVectorWidthChar(DRef));
213213
EXPECT_TRUE(vector_width_char != 0);
214214
}
215215

216-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthShort)
216+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthShort)
217217
{
218218
size_t vector_width_short = 0;
219219
EXPECT_NO_FATAL_FAILURE(vector_width_short =
220220
DPCTLDevice_GetPreferredVectorWidthShort(DRef));
221221
EXPECT_TRUE(vector_width_short != 0);
222222
}
223223

224-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthInt)
224+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthInt)
225225
{
226226
size_t vector_width_int = 0;
227227
EXPECT_NO_FATAL_FAILURE(vector_width_int =
228228
DPCTLDevice_GetPreferredVectorWidthInt(DRef));
229229
EXPECT_TRUE(vector_width_int != 0);
230230
}
231231

232-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthLong)
232+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthLong)
233233
{
234234
size_t vector_width_long = 0;
235235
EXPECT_NO_FATAL_FAILURE(vector_width_long =
236236
DPCTLDevice_GetPreferredVectorWidthLong(DRef));
237237
EXPECT_TRUE(vector_width_long != 0);
238238
}
239239

240-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthFloat)
240+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthFloat)
241241
{
242242
size_t vector_width_float = 0;
243243
EXPECT_NO_FATAL_FAILURE(vector_width_float =
244244
DPCTLDevice_GetPreferredVectorWidthFloat(DRef));
245245
EXPECT_TRUE(vector_width_float != 0);
246246
}
247247

248-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthDouble)
248+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthDouble)
249249
{
250250
size_t vector_width_double = 0;
251251
EXPECT_NO_FATAL_FAILURE(
@@ -260,7 +260,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthDouble)
260260
}
261261
}
262262

263-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthHalf)
263+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthHalf)
264264
{
265265
size_t vector_width_half = 0;
266266
EXPECT_NO_FATAL_FAILURE(vector_width_half =
@@ -275,7 +275,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthHalf)
275275
}
276276
}
277277

278-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxReadImageArgs)
278+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxReadImageArgs)
279279
{
280280
size_t max_read_image_args = 0;
281281
EXPECT_NO_FATAL_FAILURE(max_read_image_args =
@@ -286,7 +286,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxReadImageArgs)
286286
EXPECT_TRUE(max_read_image_args >= min_val);
287287
}
288288

289-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWriteImageArgs)
289+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWriteImageArgs)
290290
{
291291
size_t max_write_image_args = 0;
292292
EXPECT_NO_FATAL_FAILURE(max_write_image_args =
@@ -297,7 +297,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWriteImageArgs)
297297
EXPECT_TRUE(max_write_image_args >= min_val);
298298
}
299299

300-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage2dMaxWidth)
300+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetImage2dMaxWidth)
301301
{
302302
size_t image_2d_max_width = 0;
303303
EXPECT_NO_FATAL_FAILURE(image_2d_max_width =
@@ -308,7 +308,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage2dMaxWidth)
308308
EXPECT_TRUE(image_2d_max_width >= min_val);
309309
}
310310

311-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage2dMaxHeight)
311+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetImage2dMaxHeight)
312312
{
313313
size_t image_2d_max_height = 0;
314314
EXPECT_NO_FATAL_FAILURE(image_2d_max_height =
@@ -319,7 +319,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage2dMaxHeight)
319319
EXPECT_TRUE(image_2d_max_height >= min_val);
320320
}
321321

322-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxWidth)
322+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetImage3dMaxWidth)
323323
{
324324
size_t image_3d_max_width = 0;
325325
EXPECT_NO_FATAL_FAILURE(image_3d_max_width =
@@ -330,7 +330,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxWidth)
330330
EXPECT_TRUE(image_3d_max_width >= min_val);
331331
}
332332

333-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxHeight)
333+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetImage3dMaxHeight)
334334
{
335335
size_t image_3d_max_height = 0;
336336
EXPECT_NO_FATAL_FAILURE(image_3d_max_height =
@@ -341,7 +341,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxHeight)
341341
EXPECT_TRUE(image_3d_max_height >= min_val);
342342
}
343343

344-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxDepth)
344+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetImage3dMaxDepth)
345345
{
346346
size_t image_3d_max_depth = 0;
347347
EXPECT_NO_FATAL_FAILURE(image_3d_max_depth =
@@ -352,14 +352,14 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxDepth)
352352
EXPECT_TRUE(image_3d_max_depth >= min_val);
353353
}
354354

355-
TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetParentDevice)
355+
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetParentDevice)
356356
{
357357
DPCTLSyclDeviceRef pDRef = nullptr;
358358
EXPECT_NO_FATAL_FAILURE(pDRef = DPCTLDevice_GetParentDevice(DRef));
359359
EXPECT_TRUE(pDRef == nullptr);
360360
}
361361

362-
INSTANTIATE_TEST_SUITE_P(DPCTLDevice_Fns,
362+
INSTANTIATE_TEST_SUITE_P(DPCTLDeviceFns,
363363
TestDPCTLSyclDeviceInterface,
364364
::testing::Values("opencl",
365365
"opencl:gpu",

dpctl-capi/tests/test_sycl_device_invalid_filters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct TestUnsupportedFilters : public ::testing::TestWithParam<const char *>
5353
}
5454
};
5555

56-
TEST_P(TestUnsupportedFilters, Chk_DPCTLDevice_CreateFromSelector)
56+
TEST_P(TestUnsupportedFilters, ChkDPCTLDeviceCreateFromSelector)
5757
{
5858
DPCTLSyclDeviceRef DRef = nullptr;
5959
EXPECT_NO_FATAL_FAILURE(DRef = DPCTLDevice_CreateFromSelector(DSRef));

0 commit comments

Comments
 (0)