From: Bartosz Golaszewski Date: Wed, 15 Mar 2023 20:29:35 +0000 (+0100) Subject: tests: extend the test case for gpiod_request_config_set_consumer() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4d72b11f05341e109f5898d8da12484171a1f1db;p=qemu-gpiodev%2Flibgpiod.git tests: extend the test case for gpiod_request_config_set_consumer() Also check that passing a NULL consumer string works as expected. Signed-off-by: Bartosz Golaszewski --- diff --git a/tests/tests-request-config.c b/tests/tests-request-config.c index 71fccde..d3c679a 100644 --- a/tests/tests-request-config.c +++ b/tests/tests-request-config.c @@ -29,6 +29,9 @@ GPIOD_TEST_CASE(set_consumer) gpiod_request_config_set_consumer(config, "foobar"); g_assert_cmpstr(gpiod_request_config_get_consumer(config), ==, "foobar"); + + gpiod_request_config_set_consumer(config, NULL); + g_assert_null(gpiod_request_config_get_consumer(config)); } GPIOD_TEST_CASE(set_event_buffer_size)