Skip to content

Commit

Permalink
Merge pull request #197 from braddr/test-fixes
Browse files Browse the repository at this point in the history
Add more checking to sdtor test56 which would have caught bug 6241
  • Loading branch information
WalterBright committed Jul 3, 2011
2 parents b38a370 + f37c8a2 commit 9e1a78a
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions test/runnable/sdtor.d
Expand Up @@ -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);
}

/**********************************/
Expand Down

0 comments on commit 9e1a78a

Please sign in to comment.