Files
app-ethereum/tests/unit/tests/demo.c
Coline 16ddb1e67d feat: TU demo .c
fix: TU demo

fix: TU demo
2022-07-20 15:53:50 +02:00

18 lines
455 B
C

#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
int local_strchr_demo(char *string, char ch);
static void null_test_success(void **state) {
assert_int_equal(local_strchr_demo("salut", 'c'), -1);
assert_int_equal(local_strchr_demo("av", 'a'), 0);
}
int main(void) {
const struct CMUnitTest tests[] = {
cmocka_unit_test(null_test_success),
};
return cmocka_run_group_tests(tests, NULL, NULL);
}