stddef.c 336 B

12345678910111213141516171819202122232425
  1. #include <stddef.h>
  2. #include "test.h"
  3. struct s {
  4. char a;
  5. char b;
  6. };
  7. ptrdiff_t test_ptrdiff;
  8. size_t test_size;
  9. wchar_t test_wchar;
  10. void test_stddef_h(void)
  11. {
  12. static struct s the_s;
  13. testing_header("stddef.h");
  14. test_true(NULL == 0);
  15. test_int_equals(offsetof(struct s, b), (char*)&(the_s.b) - (char*)&the_s);
  16. testing_end();
  17. }