Skip to content
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
14 changes: 7 additions & 7 deletions dpctl-capi/tests/test_sycl_context_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ struct TestDPCTLContextInterface : public ::testing::TestWithParam<const char *>
}
};

TEST_P(TestDPCTLContextInterface, Chk_Create)
TEST_P(TestDPCTLContextInterface, ChkCreate)
{
DPCTLSyclContextRef CRef = nullptr;
EXPECT_NO_FATAL_FAILURE(CRef = DPCTLContext_Create(DRef, nullptr, 0));
ASSERT_TRUE(CRef);
EXPECT_NO_FATAL_FAILURE(DPCTLContext_Delete(CRef));
}

TEST_P(TestDPCTLContextInterface, Chk_CreateWithDevices)
TEST_P(TestDPCTLContextInterface, ChkCreateWithDevices)
{
size_t nCUs = 0;
DPCTLSyclContextRef CRef = nullptr;
Expand Down Expand Up @@ -107,7 +107,7 @@ TEST_P(TestDPCTLContextInterface, Chk_CreateWithDevices)
EXPECT_NO_FATAL_FAILURE(DPCTLContext_Delete(CRef));
}

TEST_P(TestDPCTLContextInterface, Chk_CreateWithDevices_GetDevices)
TEST_P(TestDPCTLContextInterface, ChkCreateWithDevicesGetDevices)
{
size_t nCUs = 0;
DPCTLSyclContextRef CRef = nullptr;
Expand Down Expand Up @@ -146,7 +146,7 @@ TEST_P(TestDPCTLContextInterface, Chk_CreateWithDevices_GetDevices)
EXPECT_NO_FATAL_FAILURE(DPCTLDeviceVector_Delete(Res_DVRef));
}

TEST_P(TestDPCTLContextInterface, Chk_GetDevices)
TEST_P(TestDPCTLContextInterface, ChkGetDevices)
{
DPCTLSyclContextRef CRef = nullptr;
DPCTLDeviceVectorRef DVRef = nullptr;
Expand All @@ -159,7 +159,7 @@ TEST_P(TestDPCTLContextInterface, Chk_GetDevices)
EXPECT_NO_FATAL_FAILURE(DPCTLDeviceVector_Delete(DVRef));
}

TEST_P(TestDPCTLContextInterface, Chk_AreEq)
TEST_P(TestDPCTLContextInterface, ChkAreEq)
{
DPCTLSyclContextRef CRef1 = nullptr, CRef2 = nullptr, CRef3 = nullptr;
bool are_eq = true, are_not_eq = false;
Expand All @@ -183,7 +183,7 @@ TEST_P(TestDPCTLContextInterface, Chk_AreEq)
EXPECT_NO_FATAL_FAILURE(DPCTLContext_Delete(CRef3));
}

TEST_P(TestDPCTLContextInterface, Chk_IsHost)
TEST_P(TestDPCTLContextInterface, ChkIsHost)
{
DPCTLSyclContextRef CRef = nullptr;
bool is_host_device = false, is_host_context = false;
Expand All @@ -198,7 +198,7 @@ TEST_P(TestDPCTLContextInterface, Chk_IsHost)
EXPECT_NO_FATAL_FAILURE(DPCTLContext_Delete(CRef));
}

TEST_P(TestDPCTLContextInterface, Chk_GetBackend)
TEST_P(TestDPCTLContextInterface, ChkGetBackend)
{
DPCTLSyclContextRef CRef = nullptr;
DPCTLSyclBackendType context_backend = DPCTL_UNKNOWN_BACKEND,
Expand Down
2 changes: 1 addition & 1 deletion dpctl-capi/tests/test_sycl_device_aspects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct TestDPCTLSyclDeviceInterfaceAspects
}
};

TEST_P(TestDPCTLSyclDeviceInterfaceAspects, Chk_HasAspect)
TEST_P(TestDPCTLSyclDeviceInterfaceAspects, ChkHasAspect)
{
bool actual = false;
auto dpctlAspect = DPCTL_StrToAspectType(GetParam().second.first);
Expand Down
66 changes: 33 additions & 33 deletions dpctl-capi/tests/test_sycl_device_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ struct TestDPCTLSyclDeviceInterface
}
};

TEST_P(TestDPCTLSyclDeviceInterface, Chk_Copy)
TEST_P(TestDPCTLSyclDeviceInterface, ChkCopy)
{
DPCTLSyclDeviceRef Copied_DRef = nullptr;
EXPECT_NO_FATAL_FAILURE(Copied_DRef = DPCTLDevice_Copy(DRef));
EXPECT_TRUE(bool(Copied_DRef));
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_Delete(Copied_DRef));
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetBackend)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetBackend)
{
DPCTLSyclBackendType BTy = DPCTLSyclBackendType::DPCTL_UNKNOWN_BACKEND;
EXPECT_NO_FATAL_FAILURE(BTy = DPCTLDevice_GetBackend(DRef));
Expand All @@ -91,61 +91,61 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetBackend)
}());
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetDeviceType)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetDeviceType)
{
DPCTLSyclDeviceType DTy = DPCTLSyclDeviceType::DPCTL_UNKNOWN_DEVICE;
EXPECT_NO_FATAL_FAILURE(DTy = DPCTLDevice_GetDeviceType(DRef));
EXPECT_TRUE(DTy != DPCTLSyclDeviceType::DPCTL_UNKNOWN_DEVICE);
EXPECT_TRUE(DTy != DPCTLSyclDeviceType::DPCTL_ALL);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetDriverInfo)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetDriverInfo)
{
const char *DriverInfo = nullptr;
EXPECT_NO_FATAL_FAILURE(DriverInfo = DPCTLDevice_GetDriverInfo(DRef));
EXPECT_TRUE(DriverInfo != nullptr);
EXPECT_NO_FATAL_FAILURE(DPCTLCString_Delete(DriverInfo));
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetName)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetName)
{
const char *Name = nullptr;
EXPECT_NO_FATAL_FAILURE(Name = DPCTLDevice_GetName(DRef));
EXPECT_TRUE(Name != nullptr);
EXPECT_NO_FATAL_FAILURE(DPCTLCString_Delete(Name));
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetVendorName)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetVendorName)
{
const char *VendorName = nullptr;
EXPECT_NO_FATAL_FAILURE(VendorName = DPCTLDevice_GetVendorName(DRef));
EXPECT_TRUE(VendorName != nullptr);
EXPECT_NO_FATAL_FAILURE(DPCTLCString_Delete(VendorName));
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxComputeUnits)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxComputeUnits)
{
size_t n = 0;
EXPECT_NO_FATAL_FAILURE(n = DPCTLDevice_GetMaxComputeUnits(DRef));
EXPECT_TRUE(n > 0);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWorkItemDims)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWorkItemDims)
{
size_t n = 0;
EXPECT_NO_FATAL_FAILURE(n = DPCTLDevice_GetMaxWorkItemDims(DRef));
EXPECT_TRUE(n > 0);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWorkItemSizes)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWorkItemSizes)
{
size_t *sizes = nullptr;
EXPECT_NO_FATAL_FAILURE(sizes = DPCTLDevice_GetMaxWorkItemSizes(DRef));
EXPECT_TRUE(sizes != nullptr);
EXPECT_NO_FATAL_FAILURE(DPCTLSize_t_Array_Delete(sizes));
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWorkGroupSize)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWorkGroupSize)
{
size_t n = 0;
EXPECT_NO_FATAL_FAILURE(n = DPCTLDevice_GetMaxWorkGroupSize(DRef));
Expand All @@ -155,7 +155,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWorkGroupSize)
EXPECT_TRUE(n > 0);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxNumSubGroups)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxNumSubGroups)
{
size_t n = 0;
EXPECT_NO_FATAL_FAILURE(n = DPCTLDevice_GetMaxNumSubGroups(DRef));
Expand All @@ -165,35 +165,35 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxNumSubGroups)
EXPECT_TRUE(n > 0);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPlatform)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPlatform)
{
DPCTLSyclPlatformRef PRef = nullptr;
EXPECT_NO_FATAL_FAILURE(PRef = DPCTLDevice_GetPlatform(DRef));
ASSERT_TRUE(PRef);
EXPECT_NO_FATAL_FAILURE(DPCTLPlatform_Delete(PRef));
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_IsAccelerator)
TEST_P(TestDPCTLSyclDeviceInterface, ChkIsAccelerator)
{
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_IsAccelerator(DRef));
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_IsCPU)
TEST_P(TestDPCTLSyclDeviceInterface, ChkIsCPU)
{
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_IsCPU(DRef));
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_IsGPU)
TEST_P(TestDPCTLSyclDeviceInterface, ChkIsGPU)
{
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_IsGPU(DRef));
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_IsHost)
TEST_P(TestDPCTLSyclDeviceInterface, ChkIsHost)
{
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_IsHost(DRef));
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetSubGroupIndependentForwardProgress)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetSubGroupIndependentForwardProgress)
{
bool sub_group_progress = 0;
EXPECT_NO_FATAL_FAILURE(
Expand All @@ -205,47 +205,47 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetSubGroupIndependentForwardProgress)
EXPECT_TRUE(get_sub_group_progress == sub_group_progress);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthChar)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthChar)
{
size_t vector_width_char = 0;
EXPECT_NO_FATAL_FAILURE(vector_width_char =
DPCTLDevice_GetPreferredVectorWidthChar(DRef));
EXPECT_TRUE(vector_width_char != 0);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthShort)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthShort)
{
size_t vector_width_short = 0;
EXPECT_NO_FATAL_FAILURE(vector_width_short =
DPCTLDevice_GetPreferredVectorWidthShort(DRef));
EXPECT_TRUE(vector_width_short != 0);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthInt)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthInt)
{
size_t vector_width_int = 0;
EXPECT_NO_FATAL_FAILURE(vector_width_int =
DPCTLDevice_GetPreferredVectorWidthInt(DRef));
EXPECT_TRUE(vector_width_int != 0);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthLong)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthLong)
{
size_t vector_width_long = 0;
EXPECT_NO_FATAL_FAILURE(vector_width_long =
DPCTLDevice_GetPreferredVectorWidthLong(DRef));
EXPECT_TRUE(vector_width_long != 0);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthFloat)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthFloat)
{
size_t vector_width_float = 0;
EXPECT_NO_FATAL_FAILURE(vector_width_float =
DPCTLDevice_GetPreferredVectorWidthFloat(DRef));
EXPECT_TRUE(vector_width_float != 0);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthDouble)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthDouble)
{
size_t vector_width_double = 0;
EXPECT_NO_FATAL_FAILURE(
Expand All @@ -260,7 +260,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthDouble)
}
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthHalf)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetPreferredVectorWidthHalf)
{
size_t vector_width_half = 0;
EXPECT_NO_FATAL_FAILURE(vector_width_half =
Expand All @@ -275,7 +275,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetPreferredVectorWidthHalf)
}
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxReadImageArgs)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxReadImageArgs)
{
size_t max_read_image_args = 0;
EXPECT_NO_FATAL_FAILURE(max_read_image_args =
Expand All @@ -286,7 +286,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxReadImageArgs)
EXPECT_TRUE(max_read_image_args >= min_val);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWriteImageArgs)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWriteImageArgs)
{
size_t max_write_image_args = 0;
EXPECT_NO_FATAL_FAILURE(max_write_image_args =
Expand All @@ -297,7 +297,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetMaxWriteImageArgs)
EXPECT_TRUE(max_write_image_args >= min_val);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage2dMaxWidth)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetImage2dMaxWidth)
{
size_t image_2d_max_width = 0;
EXPECT_NO_FATAL_FAILURE(image_2d_max_width =
Expand All @@ -308,7 +308,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage2dMaxWidth)
EXPECT_TRUE(image_2d_max_width >= min_val);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage2dMaxHeight)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetImage2dMaxHeight)
{
size_t image_2d_max_height = 0;
EXPECT_NO_FATAL_FAILURE(image_2d_max_height =
Expand All @@ -319,7 +319,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage2dMaxHeight)
EXPECT_TRUE(image_2d_max_height >= min_val);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxWidth)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetImage3dMaxWidth)
{
size_t image_3d_max_width = 0;
EXPECT_NO_FATAL_FAILURE(image_3d_max_width =
Expand All @@ -330,7 +330,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxWidth)
EXPECT_TRUE(image_3d_max_width >= min_val);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxHeight)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetImage3dMaxHeight)
{
size_t image_3d_max_height = 0;
EXPECT_NO_FATAL_FAILURE(image_3d_max_height =
Expand All @@ -341,7 +341,7 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxHeight)
EXPECT_TRUE(image_3d_max_height >= min_val);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxDepth)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetImage3dMaxDepth)
{
size_t image_3d_max_depth = 0;
EXPECT_NO_FATAL_FAILURE(image_3d_max_depth =
Expand All @@ -352,14 +352,14 @@ TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetImage3dMaxDepth)
EXPECT_TRUE(image_3d_max_depth >= min_val);
}

TEST_P(TestDPCTLSyclDeviceInterface, Chk_GetParentDevice)
TEST_P(TestDPCTLSyclDeviceInterface, ChkGetParentDevice)
{
DPCTLSyclDeviceRef pDRef = nullptr;
EXPECT_NO_FATAL_FAILURE(pDRef = DPCTLDevice_GetParentDevice(DRef));
EXPECT_TRUE(pDRef == nullptr);
}

INSTANTIATE_TEST_SUITE_P(DPCTLDevice_Fns,
INSTANTIATE_TEST_SUITE_P(DPCTLDeviceFns,
TestDPCTLSyclDeviceInterface,
::testing::Values("opencl",
"opencl:gpu",
Expand Down
2 changes: 1 addition & 1 deletion dpctl-capi/tests/test_sycl_device_invalid_filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct TestUnsupportedFilters : public ::testing::TestWithParam<const char *>
}
};

TEST_P(TestUnsupportedFilters, Chk_DPCTLDevice_CreateFromSelector)
TEST_P(TestUnsupportedFilters, ChkDPCTLDeviceCreateFromSelector)
{
DPCTLSyclDeviceRef DRef = nullptr;
EXPECT_NO_FATAL_FAILURE(DRef = DPCTLDevice_CreateFromSelector(DSRef));
Expand Down
Loading