1 AT_BANNER([struct alignment checker unit tests])
3 m4_define([check_structs], [$top_srcdir/build-aux/check-structs])
4 m4_define([RUN_STRUCT_CHECKER],
5 [AT_SKIP_IF([test $HAVE_PYTHON = no])
8 AT_CHECK_UNQUOTED([$PYTHON check_structs test.h], [$2], [$3], [$4])])
10 AT_SETUP([check struct tail padding])
16 [test.h:3: warning: struct xyz needs 2 bytes of tail padding
20 AT_SETUP([check struct internal alignment])
27 [test.h:3: warning: struct xyzzy member y is 2 bytes short of 4-byte alignment
31 AT_SETUP([check struct declared size])
36 OFP_ASSERT(sizeof(struct wibble) == 12);
39 [test.h:4: warning: struct wibble is 8 bytes long but declared as 12