X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=container_of%2Ftest%2Frun.c;fp=container_of%2Ftest%2Frun.c;h=0000000000000000000000000000000000000000;hb=650c775ff00cccd03fc84e7789a03c51d9839004;hp=dd57204d88f839bd15bbe16c3177c9871e00d492;hpb=c8acddea39d222312102952e91c32cfe4dd2cea0;p=ccan diff --git a/container_of/test/run.c b/container_of/test/run.c deleted file mode 100644 index dd57204d..00000000 --- a/container_of/test/run.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "container_of/container_of.h" -#include "tap/tap.h" - -struct foo { - int a; - char b; -}; - -int main(int argc, char *argv[]) -{ - struct foo foo = { .a = 1, .b = 2 }; - int *intp = &foo.a; - char *charp = &foo.b; - - plan_tests(4); - ok1(container_of(intp, struct foo, a) == &foo); - ok1(container_of(charp, struct foo, b) == &foo); - ok1(container_of_var(intp, &foo, a) == &foo); - ok1(container_of_var(charp, &foo, b) == &foo); - return exit_status(); -}