mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 20:49:26 +02:00
* fixed tests for architectures with FPC_COMP_IS_INT64 defined
git-svn-id: trunk@44222 -
This commit is contained in:
parent
7e952bf5c1
commit
66aa2e1416
@ -7,7 +7,22 @@ VAR x1, x2 : comp;
|
|||||||
Markus Greim / 29.jun.2016 *)
|
Markus Greim / 29.jun.2016 *)
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
{$ifdef FPC_COMP_IS_INT64}
|
||||||
|
x1 := 8;
|
||||||
|
writeln('x1 : ',x1);
|
||||||
|
x2 := round(x1 / 2);
|
||||||
|
writeln('x2 = x1/2 should be 4 but is : ', x2);
|
||||||
|
if x2<>4 then
|
||||||
|
halt(1);
|
||||||
|
x2 := round(x1 / 4);
|
||||||
|
writeln('x2 = x1/4 should be 2 but is : ', x2);
|
||||||
|
if x2<>2 then
|
||||||
|
halt(2);
|
||||||
|
x2 := round(x1 / 8);
|
||||||
|
writeln('x2 = x1/8 should be 1 and is : ', x2);
|
||||||
|
if x2<>1 then
|
||||||
|
halt(3);
|
||||||
|
{$else FPC_COMP_IS_INT64}
|
||||||
x1 := 8;
|
x1 := 8;
|
||||||
writeln('x1 : ',x1);
|
writeln('x1 : ',x1);
|
||||||
x2 := x1 / 2;
|
x2 := x1 / 2;
|
||||||
@ -22,6 +37,7 @@ x2 := x1 / 8;
|
|||||||
writeln('x2 = x1/8 should be 1 and is : ', x2);
|
writeln('x2 = x1/8 should be 1 and is : ', x2);
|
||||||
if x2<>1 then
|
if x2<>1 then
|
||||||
halt(3);
|
halt(3);
|
||||||
|
{$endif FPC_COMP_IS_INT64}
|
||||||
|
|
||||||
|
|
||||||
END.
|
END.
|
||||||
|
@ -628,7 +628,11 @@ end;
|
|||||||
constructor TCompComponent.Create(AOwner: TComponent);
|
constructor TCompComponent.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
{$ifdef FPC_COMP_IS_INT64}
|
||||||
|
F:=round(4.56);
|
||||||
|
{$else FPC_COMP_IS_INT64}
|
||||||
F:=4.56;
|
F:=4.56;
|
||||||
|
{$endif FPC_COMP_IS_INT64}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCurrencyComponent }
|
{ TCurrencyComponent }
|
||||||
|
Loading…
Reference in New Issue
Block a user