mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 21:49:09 +02:00
+ New test for compile time things
+ Moved part from tmacpas4.pp
This commit is contained in:
parent
59f83a5357
commit
91c8da4e1a
49
tests/test/tmacpas4.pp
Normal file
49
tests/test/tmacpas4.pp
Normal file
@ -0,0 +1,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.
|
Loading…
Reference in New Issue
Block a user