+ also test qword->float conversion

git-svn-id: trunk@12529 -
This commit is contained in:
Jonas Maebe 2009-01-08 19:31:03 +00:00
parent b73ed1587a
commit 6e1dc583b2

View File

@ -37,7 +37,8 @@ end;
const
RESULT_S64BIT = 101234;
RESULT_U64BIT = qword($8fe0000000000000);
RESULT_S64BIT = -101234;
RESULT_S32BIT = -1000000;
RESULT_U32BIT = 2000000;
RESULT_S16BIT = -12123;
@ -51,6 +52,11 @@ const
begin
gets64bit := RESULT_S64BIT;
end;
function getu64bit : qword;
begin
getu64bit := RESULT_U64BIT;
end;
{$endif}
function gets32bit : longint;
@ -153,6 +159,14 @@ begin
if trunc(result_val) <> RESULT_S64BIT then
failed:=true;
result_val := getu64bit;
if result_val <> 10367286342206881792.0 then
begin
writeln('got ',result_val:0);
writeln('expected ',10367286342206881792.0);
failed:=true;
end;
result_val := gets32bit;
if trunc(result_val) <> RESULT_S32BIT then
failed:=true;