X-Git-Url: https://git.distorted.org.uk/~mdw/finally/blobdiff_plain/d58b8198f8f6153090e4adcbab2ecc5370f758cd..refs/heads/master:/finally-test.c diff --git a/finally-test.c b/finally-test.c index e95f16b..d33ff70 100644 --- a/finally-test.c +++ b/finally-test.c @@ -36,6 +36,7 @@ #include +#define FINALLY_TOLERATE_BUG_CAPTURE_COPIES 1 #include "finally.h" #include "finally-test.h" @@ -59,6 +60,7 @@ static int test_ordering(void) return (3); } +#ifndef FINALLY_BUG_CAPTURE_COPIES static int test_capture(void) { int n = -1; FINALLY({ STEP(n); }); @@ -66,6 +68,7 @@ static int test_capture(void) STEP(0); n = 1; return (2); } +#endif static int test_internal_block(void) { @@ -146,7 +149,11 @@ int main(void) RUNTEST(softball); RUNTEST(ordering); RUNTEST(local_xfer); +#ifndef FINALLY_BUG_CAPTURE_COPIES RUNTEST(capture); +#else + SKIPTEST(capture, "selected flavour captures copies"); +#endif RUNTEST(internal_block); #if defined(HAVE_FEXCEPTIONS) RUNTEST(try_catch);