@@ -90,6 +90,34 @@ struct TestDPCTLQueueMemberFunctions
90
90
91
91
} /* End of anonymous namespace */
92
92
93
+ TEST (TestDPCTLSyclQueueInterface, CheckCreate)
94
+ {
95
+ /* We are testing that we do not crash even when input is NULL. */
96
+ DPCTLSyclQueueRef QRef = nullptr ;
97
+
98
+ EXPECT_NO_FATAL_FAILURE (
99
+ QRef = DPCTLQueue_Create (nullptr , nullptr , nullptr , 0 ));
100
+ ASSERT_TRUE (QRef == nullptr );
101
+ }
102
+
103
+ TEST (TestDPCTLSyclQueueInterface, CheckCreate2)
104
+ {
105
+ /* We are testing that we do not crash even when input is NULL. */
106
+ DPCTLSyclQueueRef QRef = nullptr ;
107
+ DPCTLSyclDeviceSelectorRef DSRef = nullptr ;
108
+ DPCTLSyclDeviceRef DRef = nullptr ;
109
+
110
+ EXPECT_NO_FATAL_FAILURE (DSRef = DPCTLDefaultSelector_Create ());
111
+ EXPECT_NO_FATAL_FAILURE (DRef = DPCTLDevice_CreateFromSelector (DSRef));
112
+ EXPECT_NO_FATAL_FAILURE (DPCTLDeviceSelector_Delete (DSRef));
113
+
114
+ EXPECT_NO_FATAL_FAILURE (QRef =
115
+ DPCTLQueue_Create (nullptr , DRef, nullptr , 0 ));
116
+ ASSERT_TRUE (QRef == nullptr );
117
+
118
+ EXPECT_NO_FATAL_FAILURE (DPCTLDevice_Delete (DRef));
119
+ }
120
+
93
121
TEST (TestDPCTLSyclQueueInterface, CheckCreateForDevice)
94
122
{
95
123
/* We are testing that we do not crash even when input is NULL. */
0 commit comments