1 // Copyright (c) Microsoft. All rights reserved. 2 // Licensed under the MIT license. See LICENSE file in the project root for 3 // full license information. 4 5 #include <windows.h> 6 #include "seh.h" 7 8 #define faill() 9 #define startest() 10 #define finish() 11 12 char test[] = "SEH0033.c"; 13 int perfect; 14 15 int main() { 16 ULONG Index1; 17 LONG Counter; 18 19 startest(); 20 21 Counter = 0; 22 23 for (Index1 = 0; Index1 < 10; Index1 += 1) { 24 try { 25 try { 26 if ((Index1 & 0x1) == 0) { 27 continue; 28 } else { 29 /* add 1 to counter is Index1 is odd */ 30 Counter += 1; 31 } 32 } 33 finally { 34 /* add 2 to counter always */ 35 Counter += 2; 36 } 37 endtry 38 /* addd 3 to connter if Index1 is odd */ 39 Counter += 3; 40 } 41 finally { 42 /* add 4 to counter always */ 43 Counter += 4; 44 } 45 endtry 46 /* add 5 to counter if index1 is odd */ 47 Counter += 5; 48 } 49 50 if (Counter != 105) { 51 printf("TEST 33 FAILED. Counter = %d\n\r", Counter); 52 return -1; 53 } 54 55 return 0; 56 } 57