19 update_null(
void **state) {
31 str = strdup(
"hello");
37 update_same(
void **state) {
41 str = strdup(
"hello");
44 assert_ptr_equal(saved, str);
49 update_different(
void **state) {
52 str = strdup(
"hello");
54 assert_string_equal(str,
"world");
59 main(
int argc,
char **argv)
61 const struct CMUnitTest tests[] = {
62 cmocka_unit_test(update_null),
63 cmocka_unit_test(update_same),
64 cmocka_unit_test(update_different),
67 cmocka_set_message_output(CM_OUTPUT_TAP);
68 return cmocka_run_group_tests(tests, NULL, NULL);
void pcmk__str_update(char **str, const char *value)
int main(int argc, char **argv)