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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
program tgeneric93;
uses
ugeneric93a,
ugeneric93b;
const
// should be False
{$if declared(NotDeclared<>)}
TestNotDeclared = True;
{$else}
TestNotDeclared = False;
{$endif}
// should be False
{$if declared(TTestDelphi)}
TestTTestDelphi = True;
{$else}
TestTTestDelphi = False;
{$endif}
// should be True
{$if declared(TTestDelphi<>)}
TestTTestDelphi1 = True;
{$else}
TestTTestDelphi1 = False;
{$endif}
// should be False
{$if declared(TTestDelphi<,>)}
TestTTestDelphi2 = True;
{$else}
TestTTestDelphi2 = False;
{$endif}
// should be True
{$if declared(TTestDelphi<,,>)}
TestTTestDelphi3 = True;
{$else}
TestTTestDelphi3 = False;
{$endif}
// should be True
{$if declared(TTest2Delphi)}
TestTTest2Delphi = True;
{$else}
TestTTest2Delphi = False;
{$endif}
// should be False
{$if declared(TTest2Delphi<>)}
TestTTest2Delphi1 = True;
{$else}
TestTTest2Delphi1 = False;
{$endif}
// should be True
{$if declared(TTest2Delphi<,>)}
TestTTest2Delphi2 = True;
{$else}
TestTTest2Delphi2 = False;
{$endif}
// should be False
{$if declared(TTestFPC)}
TestTTestFPC = True;
{$else}
TestTTestFPC = False;
{$endif}
// should be False
{$if declared(TTestFPC<>)}
TestTTestFPC1 = True;
{$else}
TestTTestFPC1 = False;
{$endif}
// should be True
{$if declared(TTestFPC<,>)}
TestTTestFPC2 = True;
{$else}
TestTTestFPC2 = False;
{$endif}
begin
if TestNotDeclared then
Halt(1);
if TestTTestDelphi then
Halt(2);
if not TestTTestDelphi1 then
Halt(3);
if TestTTestDelphi2 then
Halt(4);
if not TestTTestDelphi3 then
Halt(5);
if not TestTTest2Delphi then
Halt(6);
if TestTTest2Delphi1 then
Halt(7);
if not TestTTest2Delphi2 then
Halt(8);
if TestTTestFPC then
Halt(9);
if TestTTestFPC1 then
Halt(10);
if not TestTTestFPC2 then
Halt(11);
Writeln('OK');
end.
|