mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 04:28:00 +02:00

different from 0 to be "true", instead of only 1 (patch by Jeppe Johansen, mantis #23436) git-svn-id: trunk@23117 -
45 lines
778 B
ObjectPascal
45 lines
778 B
ObjectPascal
program testcase;
|
|
|
|
{$APPTYPE CONSOLE}
|
|
{$mode objfpc}
|
|
|
|
begin
|
|
if ByteBool(true) then
|
|
writeln('ByteBool(true) ok')
|
|
else
|
|
halt(1);
|
|
if not ByteBool(false) then
|
|
writeln('ByteBool(not false) ok')
|
|
else
|
|
halt(2);
|
|
if WordBool(true) then
|
|
writeln('WordBool(true) ok')
|
|
else
|
|
halt(3);
|
|
if not WordBool(false) then
|
|
writeln('WordBool(not false) ok')
|
|
else
|
|
halt(4);
|
|
if LongBool(true) then
|
|
writeln('LongBool(true) ok')
|
|
else
|
|
halt(5);
|
|
if not LongBool(false) then
|
|
writeln('LongBool(not false) ok')
|
|
else
|
|
halt(6);
|
|
{$ifdef FPC}
|
|
if QWordBool(true) then
|
|
writeln('QWordBool(true) ok')
|
|
else
|
|
halt(7);
|
|
if not QWordBool(false) then
|
|
writeln('QWordBool(not false) ok')
|
|
else
|
|
halt(8);
|
|
{$endif FPC}
|
|
|
|
Writeln('ok');
|
|
end.
|
|
|