ReactOS
0.4.16-dev-306-g647d351
seh0046.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
[] =
"SEH0046.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
/* break out of switchy stmt. */
27
break
;
28
}
else
{
29
Counter
+= 1;
30
}
31
}
32
except
(1) {
33
/* no exception occurs, never gets here */
34
Counter
+= 10;
35
}
36
endtry
37
/* "break" keeps you from getting here */
38
Counter
+= 2;
39
}
40
except
(1) {
41
/* no exception occurs, never gets here */
42
Counter
+= 20;
43
}
44
endtry
45
/* "break" keeps you from getting here */
46
Counter
+= 3;
47
}
48
49
if
(
Counter
!= 0) {
50
printf
(
"TEST 46 FAILED. Counter = %d\n\r"
,
Counter
);
51
return
-1;
52
}
53
54
return
0;
55
}
except
#define except(x)
Definition:
btrfs_drv.h:136
printf
#define printf
Definition:
freeldr.h:97
LONG
long LONG
Definition:
pedump.c:60
test
char test[]
Definition:
seh0046.c:8
main
int main()
Definition:
seh0046.c:10
seh.h
endtry
#define endtry
Definition:
seh.h:24
Counter
static LARGE_INTEGER Counter
Definition:
clock.c:43
ULONG
uint32_t ULONG
Definition:
typedefs.h:59
modules
rostests
apitests
compiler
ms
seh
seh0046.c
Generated on Mon Dec 2 2024 06:09:04 for ReactOS by
1.9.6