Skip to content

Commit 6db55f6

Browse files
committed
NULL unit test
1 parent 1e97b44 commit 6db55f6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

agent/tests/test_memcached.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ static void test_create_datastore_instance(void) {
8080
.port_path_or_id = "6379",
8181
}),
8282
nr_php_memcached_create_datastore_instance("host.name", 6379));
83+
84+
assert_datastore_instance_equals_destroy(
85+
"NULL socket",
86+
&((nr_datastore_instance_t){
87+
.host = system_host_name,
88+
.database_name = "unknown",
89+
.port_path_or_id = "unknown",
90+
}),
91+
nr_php_memcached_create_datastore_instance(NULL, 0));
8392
}
8493

8594
void test_main(void* p NRUNUSED) {

0 commit comments

Comments
 (0)