From f37c8a2a18602561fe18c2433175edd5b325f0e1 Mon Sep 17 00:00:00 2001 From: Brad Roberts Date: Sat, 2 Jul 2011 22:16:50 -0700 Subject: [PATCH] Add more checking to sdtor test56 which would have caught bug 6241 --- test/runnable/sdtor.d | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/test/runnable/sdtor.d b/test/runnable/sdtor.d index 3fa862d3945e..436596e26fdf 100644 --- a/test/runnable/sdtor.d +++ b/test/runnable/sdtor.d @@ -1461,17 +1461,22 @@ int foo56() void test56() { - int i; - try - { - i = S56(1).x + foo56() + 1; - } - catch (Throwable o) - { - printf("caught\n"); - } - printf("i = %d\n", i); - assert(i == 0); + int i; + int j; + try + { + j |= 1; + i = S56(1).x + foo56() + 1; + j |= 2; + } + catch (Throwable o) + { + printf("caught\n"); + j |= 4; + } + printf("i = %d, j = %d\n", i, j); + assert(i == 0); + assert(j == 5); } /**********************************/