File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ struct TestDPCTLGetDevices : public ::testing::TestWithParam<int>
9393 EXPECT_NO_FATAL_FAILURE (DV = DPCTLDeviceMgr_GetDevices (GetParam ()));
9494 EXPECT_TRUE (DV != nullptr );
9595 EXPECT_NO_FATAL_FAILURE (nDevices = DPCTLDeviceVector_Size (DV));
96+ EXPECT_TRUE (nDevices == DPCTLDeviceMgr_GetNumDevices (GetParam ()));
9697 }
9798
9899 void SetUp ()
@@ -206,3 +207,26 @@ INSTANTIATE_TEST_SUITE_P(
206207 DPCTLSyclDeviceType::DPCTL_ACCELERATOR,
207208 DPCTLSyclDeviceType::DPCTL_GPU,
208209 DPCTLSyclDeviceType::DPCTL_CPU));
210+
211+ struct TestDPCTLDeviceMgrNullReference : public ::testing::Test
212+ {
213+ DPCTLSyclDeviceRef nullDRef = nullptr ;
214+ };
215+
216+ TEST_F (TestDPCTLDeviceMgrNullReference, ChkPrintDeviceInfo)
217+ {
218+ EXPECT_NO_FATAL_FAILURE (DPCTLDeviceMgr_PrintDeviceInfo (nullDRef));
219+ }
220+
221+ TEST_F (TestDPCTLDeviceMgrNullReference, ChkGetRelativeId)
222+ {
223+ EXPECT_NO_FATAL_FAILURE (DPCTLDeviceMgr_GetRelativeId (nullDRef));
224+ }
225+
226+ TEST_F (TestDPCTLDeviceMgrNullReference, ChkGetPositionInDevices)
227+ {
228+ int mask = DPCTLSyclDeviceType::DPCTL_ALL |
229+ DPCTLSyclBackendType::DPCTL_ALL_BACKENDS;
230+ EXPECT_NO_FATAL_FAILURE (
231+ DPCTLDeviceMgr_GetPositionInDevices (nullDRef, mask));
232+ }
You can’t perform that action at this time.
0 commit comments