Skip to content

Commit 59154a3

Browse files
haoxian2zibaiwan
authored andcommitted
Added extra check in unit test for NULL ARG as non-memory type
1 parent b7ca0ea commit 59154a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/acl_kernel_test.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,12 @@ MT_TEST(acl_kernel, set_kernel_arg) {
997997
clSetKernelArg(kernel, 4, sizeof(cl_mem),
998998
&src_mem)); // can pass mem object to __constant arg
999999

1000+
// Invalid null arg.
1001+
CHECK_EQUAL(
1002+
CL_INVALID_ARG_VALUE,
1003+
clSetKernelArg(kernel, 1, sizeof(cl_mem),
1004+
nullptr)); // cannot pass NULL ARG as a non-memory type
1005+
10001006
// Check that we can set a pipe argument
10011007
// At the moment we don't do anything with the pipe argument, so we
10021008
// just want to make sure that if we create a pipe and pass it to a

0 commit comments

Comments
 (0)