blob: 193657c39fcf2fe796c38559c92dbd77f8e9f3a6 (
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
|
{ %RESULT=227 }
{ Old file: tbs0150.pp }
{ Shows that the assert() macro is missing under Delphi OK 0.99.9 (PFV) }
{
bug to show that there is no assert() macro and directive
}
var B : boolean;
i : integer;
begin
b:=true;
i:=0;
// First for assert messages should not give anything.
// First two generate code, but are OK.
// second two don't generate code ($C- !)
{$c+}
assert (b);
assert (I=0);
{$c-}
assert (not(b));
assert (i<>0);
{$c+}
// This one should give the normal assert message.
assert (not(b));
// This one should give a custom assert message.
// you must uncomment the previous one to see this one.
assert (not(I=0),'Custom assert message');
end.
|