@@ -57,8 +57,8 @@ bool has_devices ()
5757}
5858
5959void
60- common_test_body (size_t nbytes, const DPPLSyclUSMRef Ptr,
61- const DPPLSyclQueueRef Q, const char *expected)
60+ common_test_body (size_t nbytes, const DPPLSyclUSMRef Ptr,
61+ const DPPLSyclQueueRef Q, const char *expected)
6262{
6363 auto Ctx = DPPLQueue_GetContext (Q);
6464
@@ -69,9 +69,11 @@ common_test_body(size_t nbytes, const DPPLSyclUSMRef Ptr,
6969 auto QueueDev = DPPLQueue_GetDevice (Q);
7070 EXPECT_TRUE (DPPLDevice_AreEq (Dev, QueueDev));
7171
72- DPPLQueue_Prefetch (Q, Ptr, nbytes);
72+ EXPECT_NO_FATAL_FAILURE (DPPLQueue_Prefetch (Q, Ptr, nbytes));
73+
7374 DPPLDevice_Delete (QueueDev);
7475 DPPLDevice_Delete (Dev);
76+ DPPLContext_Delete (Ctx);
7577}
7678
7779} // end of namespace
@@ -86,7 +88,7 @@ struct TestDPPLSyclUSMInterface : public ::testing::Test
8688 { }
8789};
8890
89- TEST_F (TestDPPLSyclUSMInterface, MallocShared)
91+ TEST_F (TestDPPLSyclUSMInterface, MallocShared)
9092{
9193 if (!has_devices ())
9294 GTEST_SKIP_ (" Skipping: No Sycl Devices.\n " );
@@ -102,7 +104,7 @@ TEST_F(TestDPPLSyclUSMInterface, MallocShared)
102104 DPPLQueue_Delete (Q);
103105}
104106
105- TEST_F (TestDPPLSyclUSMInterface, MallocDevice)
107+ TEST_F (TestDPPLSyclUSMInterface, MallocDevice)
106108{
107109 if (!has_devices ())
108110 GTEST_SKIP_ (" Skipping: No Sycl Devices.\n " );
@@ -118,7 +120,7 @@ TEST_F(TestDPPLSyclUSMInterface, MallocDevice)
118120 DPPLQueue_Delete (Q);
119121}
120122
121- TEST_F (TestDPPLSyclUSMInterface, MallocHost)
123+ TEST_F (TestDPPLSyclUSMInterface, MallocHost)
122124{
123125 if (!has_devices ())
124126 GTEST_SKIP_ (" Skipping: No Sycl Devices.\n " );
@@ -134,7 +136,7 @@ TEST_F(TestDPPLSyclUSMInterface, MallocHost)
134136 DPPLQueue_Delete (Q);
135137}
136138
137- TEST_F (TestDPPLSyclUSMInterface, AlignedAllocShared)
139+ TEST_F (TestDPPLSyclUSMInterface, AlignedAllocShared)
138140{
139141 if (!has_devices ())
140142 GTEST_SKIP_ (" Skipping: No Sycl Devices.\n " );
@@ -150,7 +152,7 @@ TEST_F(TestDPPLSyclUSMInterface, AlignedAllocShared)
150152 DPPLQueue_Delete (Q);
151153}
152154
153- TEST_F (TestDPPLSyclUSMInterface, AlignedAllocDevice)
155+ TEST_F (TestDPPLSyclUSMInterface, AlignedAllocDevice)
154156{
155157 if (!has_devices ())
156158 GTEST_SKIP_ (" Skipping: No Sycl Devices.\n " );
@@ -166,7 +168,7 @@ TEST_F(TestDPPLSyclUSMInterface, AlignedAllocDevice)
166168 DPPLQueue_Delete (Q);
167169}
168170
169- TEST_F (TestDPPLSyclUSMInterface, AlignedAllocHost)
171+ TEST_F (TestDPPLSyclUSMInterface, AlignedAllocHost)
170172{
171173 if (!has_devices ())
172174 GTEST_SKIP_ (" Skipping: No Sycl Devices.\n " );
0 commit comments