summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/test/tmacpas4.pp
blob: 6cbf2c96b865a0b74ef986359f69e551220ba427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{%NORUN}
{$MODE MACPAS}

{Tests of mac pascal constructs, concerning compile time constructs}

{** Test Compiler variables **}

{$SETC ADAM := TRUE}
{$IFC ADAM <> TRUE}
{$ERRORC Test failed}
{$ENDC}

{$SETC BERTIL := FALSE}
{$IFC BERTIL = FALSE}
{  OK  }
{$ELSEC}
{$ERRORC Test failed}
{$ENDC}

{** Test Defined/Undefined **}

{$IFC UNDEFINED FPC_MACPAS}
{$ERRORC Test failed}
{$ENDC}

{$IFC NOT DEFINED FPC_MACPAS}
{$ERRORC Test failed}
{$ENDC}

{** Test Push/Pop **}

{$J-}

{$PUSH}
{$PUSH}

{$J+}

{$POP}
{$POP}

{$IFC OPTION(J)}
{$ERRORC $PUSH/$POP doesnt work properly}
{$ENDC}

program tmacpas4;

begin
end.