X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftcon%2Ftest%2Frun-wrap.c;fp=ccan%2Ftcon%2Ftest%2Frun-wrap.c;h=0d5cfef61fc018aa4001cb125cfa585bac9d1515;hb=43992de4769085b3aba0fd9c167a85ad14e771d2;hp=0000000000000000000000000000000000000000;hpb=fced03d35c9fdf132f4405114f8d507716da1842;p=ccan diff --git a/ccan/tcon/test/run-wrap.c b/ccan/tcon/test/run-wrap.c new file mode 100644 index 00000000..0d5cfef6 --- /dev/null +++ b/ccan/tcon/test/run-wrap.c @@ -0,0 +1,18 @@ +#include +#include +#include + +typedef TCON_WRAP(int, char *canary) canaried_int; + +int main(int argc, char *argv[]) +{ + canaried_int ci = TCON_WRAP_INIT(0); + + plan_tests(2); + + ok1(*tcon_unwrap(&ci) == 0); + *tcon_unwrap(&ci) = 17; + ok1(*tcon_unwrap(&ci) == 17); + + return exit_status(); +}