sway/test/common/list/list.c

21 lines
484 B
C
Raw Normal View History

2016-06-17 11:38:32 +00:00
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include "tests.h"
#include "list.h"
2016-06-19 15:25:58 +00:00
static void test_create_list(void **state) {
memory_behavior(WRAPPER_INVOKE_CMOCKA);
2016-06-17 11:38:32 +00:00
list_t *list = create_list();
2016-06-19 15:25:58 +00:00
assert_int_equal(list->length, 0);
list_free(list);
2016-06-17 11:38:32 +00:00
}
2016-06-19 15:25:58 +00:00
int main(int argc, char **argv) {
2016-06-17 11:38:32 +00:00
const struct CMUnitTest tests[] = {
2016-06-19 15:25:58 +00:00
cmocka_unit_test(test_create_list),
2016-06-17 11:38:32 +00:00
};
2016-06-19 15:25:58 +00:00
return cmocka_run_group_tests(tests, reset_mem_wrappers, NULL);
2016-06-17 11:38:32 +00:00
}