ReactOS  0.4.15-dev-5112-g22d8c0f
seh0049.c
Go to the documentation of this file.
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 char test[] = "SEH0049.c";
9 
10 int main() {
11  ULONG Index1;
12  ULONG Index2 = 1;
13  LONG Counter;
14 
15  Counter = 0;
16  Index1 = 1;
17 
18  switch (Index2) {
19  case 0:
20  Counter += 100;
21  break;
22  case 1:
23  try {
24  try {
25  if ((Index1 & 0x1) == 1) {
26  /* set counter to 1 */
27  Counter += 1;
28  }
29  }
30  finally {
31  /* set counter to 3 */
32  Counter += 2;
33 #if defined(_MSC_VER) && !defined(__clang__)
34  break;
35 #endif
36  }
37  endtry
38 #ifndef _MSC_VER
39  break;
40 #endif
41  /* never get here due to break */
42  Counter += 4;
43  }
44  finally {
45  /* set counter to 8 */
46  Counter += 5;
47  }
48  endtry
49  /* never get hre due to break */
50  Counter += 6;
51  }
52 
53  if (Counter != 8) {
54  printf("TEST 49 FAILED. Counter = %d\n\r", Counter);
55  return -1;
56  }
57 
58  return 0;
59 }
#define endtry
Definition: seh.h:24
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
long LONG
Definition: pedump.c:60
#define printf
Definition: freeldr.h:94
int main()
Definition: seh0049.c:10
char test[]
Definition: seh0049.c:8
static LARGE_INTEGER Counter
Definition: clock.c:43
unsigned int ULONG
Definition: retypes.h:1