@@ -102,7 +102,7 @@ INSTANTIATE_TEST_CASE_P(
102102 clCreateBufferInValidFlagsTests,
103103 testing::ValuesIn (inValidFlags));
104104
105- TEST_F (clCreateBufferTests, returnsSuccess ) {
105+ TEST_F (clCreateBufferTests, GivenValidParametersWhenCreatingBufferThenSuccessIsReturned ) {
106106 unsigned char *pHostMem = nullptr ;
107107 cl_mem_flags flags = CL_MEM_USE_HOST_PTR;
108108 static const unsigned int bufferSize = 16 ;
@@ -122,7 +122,7 @@ TEST_F(clCreateBufferTests, returnsSuccess) {
122122 delete[] pHostMem;
123123}
124124
125- TEST_F (clCreateBufferTests, nullContextReturnsError ) {
125+ TEST_F (clCreateBufferTests, GivenNullContextWhenCreatingBufferThenInvalidContextErrorIsReturned ) {
126126 unsigned char *pHostMem = nullptr ;
127127 cl_mem_flags flags = 0 ;
128128 static const unsigned int bufferSize = 16 ;
@@ -131,38 +131,38 @@ TEST_F(clCreateBufferTests, nullContextReturnsError) {
131131 ASSERT_EQ (CL_INVALID_CONTEXT, retVal);
132132}
133133
134- TEST_F (clCreateBufferTests, zeroSizeReturnsError ) {
134+ TEST_F (clCreateBufferTests, GivenBufferSizeZeroWhenCreatingBufferThenInvalidBufferSizeErrorIsReturned ) {
135135 uint8_t hostData = 0 ;
136136 clCreateBuffer (pContext, CL_MEM_USE_HOST_PTR, 0 , &hostData, &retVal);
137137 ASSERT_EQ (CL_INVALID_BUFFER_SIZE, retVal);
138138}
139139
140- TEST_F (clCreateBufferTests, wrongHostData ) {
140+ TEST_F (clCreateBufferTests, GivenInvalidHostPointerWhenCreatingBufferThenInvalidHostPointerErrorIsReturned ) {
141141 uint32_t hostData = 0 ;
142142 cl_mem_flags flags = 0 ;
143143 clCreateBuffer (pContext, flags, sizeof (uint32_t ), &hostData, &retVal);
144144 ASSERT_EQ (CL_INVALID_HOST_PTR, retVal);
145145}
146146
147- TEST_F (clCreateBufferTests, wrongHostFlags1 ) {
147+ TEST_F (clCreateBufferTests, GivenNullHostPointerAndMemCopyHostPtrFlagWhenCreatingBufferThenInvalidHostPointerErrorIsReturned ) {
148148 cl_mem_flags flags = CL_MEM_COPY_HOST_PTR;
149149 clCreateBuffer (pContext, flags, sizeof (uint32_t ), nullptr , &retVal);
150150 ASSERT_EQ (CL_INVALID_HOST_PTR, retVal);
151151}
152152
153- TEST_F (clCreateBufferTests, wrongHostFlags2 ) {
153+ TEST_F (clCreateBufferTests, GivenNullHostPointerAndMemUseHostPtrFlagWhenCreatingBufferThenInvalidHostPointerErrorIsReturned ) {
154154 cl_mem_flags flags = CL_MEM_USE_HOST_PTR;
155155 clCreateBuffer (pContext, flags, sizeof (uint32_t ), nullptr , &retVal);
156156 ASSERT_EQ (CL_INVALID_HOST_PTR, retVal);
157157}
158158
159- TEST_F (clCreateBufferTests, wrongFlags ) {
159+ TEST_F (clCreateBufferTests, GivenMemWriteOnlyFlagAndMemReadWriteFlagWhenCreatingBufferThenInvalidValueErrorIsReturned ) {
160160 cl_mem_flags flags = CL_MEM_WRITE_ONLY | CL_MEM_READ_WRITE;
161161 clCreateBuffer (pContext, flags, 16 , nullptr , &retVal);
162162 ASSERT_EQ (CL_INVALID_VALUE, retVal);
163163}
164164
165- TEST_F (clCreateBufferTests, noRet ) {
165+ TEST_F (clCreateBufferTests, GivenNullHostPointerAndMemCopyHostPtrFlagWhenCreatingBufferThenNullIsReturned ) {
166166 unsigned char *pHostMem = nullptr ;
167167 cl_mem_flags flags = CL_MEM_USE_HOST_PTR;
168168 static const unsigned int bufferSize = 16 ;
@@ -183,7 +183,7 @@ TEST_F(clCreateBufferTests, noRet) {
183183
184184using clCreateBufferTestsWithRestrictions = api_test_using_aligned_memory_manager;
185185
186- TEST_F (clCreateBufferTestsWithRestrictions, givenMemoryManagerRestrictionsWhenMinIsLesserThanHostPtrThenUseZeroCopy ) {
186+ TEST_F (clCreateBufferTestsWithRestrictions, GivenMemoryManagerRestrictionsWhenMinIsLessThanHostPtrThenUseZeroCopy ) {
187187 std::unique_ptr<unsigned char []> hostMem (nullptr );
188188 unsigned char *destMem = nullptr ;
189189 cl_mem_flags flags = CL_MEM_USE_HOST_PTR;
@@ -214,7 +214,7 @@ TEST_F(clCreateBufferTestsWithRestrictions, givenMemoryManagerRestrictionsWhenMi
214214 EXPECT_EQ (CL_SUCCESS, retVal);
215215}
216216
217- TEST_F (clCreateBufferTestsWithRestrictions, givenMemoryManagerRestrictionsWhenMinIsLesserThanHostPtrThenCreateCopy ) {
217+ TEST_F (clCreateBufferTestsWithRestrictions, GivenMemoryManagerRestrictionsWhenMinIsLessThanHostPtrThenCreateCopy ) {
218218 std::unique_ptr<unsigned char []> hostMem (nullptr );
219219 unsigned char *destMem = nullptr ;
220220 cl_mem_flags flags = CL_MEM_USE_HOST_PTR;
0 commit comments