test_array.h 415 B

1234567891011121314151617
  1. #include <setjmp.h>
  2. #include <stdarg.h>
  3. #include <stddef.h>
  4. #include <stdio.h>
  5. #include <google/cmockery.h>
  6. #include <ds.h>
  7. void test_array_generally(void **state)
  8. {
  9. ds_array_t* arr = ds_array_new(0, NULL);
  10. assert_true(arr != NULL);
  11. assert_true(ds_array_size(arr) == DS_DEF_ARRAY_SIZE);
  12. ds_array_destroy(arr);
  13. assert_true(arr != NULL); // in face arr is freed, should never use again.
  14. }