X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=container_of%2Ftest%2Frun.c;h=d08b06a667d17dbee81725e579c238a501396956;hp=dab462bc4a5bf1541eddb9267caf252339757f20;hb=1e7eb5df1a634447ae57edf4c82a37f2d77e19ab;hpb=fdfcdafbfa7957b6ca393bb4000fbaad3813a61a diff --git a/container_of/test/run.c b/container_of/test/run.c index dab462bc..d08b06a6 100644 --- a/container_of/test/run.c +++ b/container_of/test/run.c @@ -1,5 +1,5 @@ #include "container_of/container_of.h" -#include "tap/tap.h" +#include "tap.h" struct foo { int a; @@ -12,8 +12,10 @@ int main(int argc, char *argv[]) int *intp = &foo.a; char *charp = &foo.b; - plan_tests(2); + 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(); }