mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 18:29:18 +02:00
* updated test with patch from Lacak2.
git-svn-id: trunk@19383 -
This commit is contained in:
parent
1014e1d1d8
commit
5ee619276f
@ -17,7 +17,7 @@ begin
|
|||||||
(bcdtostr(bcd3) <> bcdtostr(bcdmul)) then
|
(bcdtostr(bcd3) <> bcdtostr(bcdmul)) then
|
||||||
begin
|
begin
|
||||||
writeln(bcdtostr(bcd1), ' * ', bcdtostr(bcd2), ' = ', bcdtostr(bcdmul), ' but expected ', bcdtostr(bcd3));
|
writeln(bcdtostr(bcd1), ' * ', bcdtostr(bcd2), ' = ', bcdtostr(bcdmul), ' but expected ', bcdtostr(bcd3));
|
||||||
writeln('Expected: ', bcd3.Precision,',',bcd3.SignSpecialPlaces, ' but calculated: ', bcdmul.Precision,',',bcdmul.SignSpecialPlaces);
|
writeln('Expected: (', bcd3.Precision,',',bcd3.SignSpecialPlaces, ') but calculated: (', bcdmul.Precision,',',bcdmul.SignSpecialPlaces,')');
|
||||||
inc(ErrorCount);
|
inc(ErrorCount);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -94,8 +94,8 @@ begin
|
|||||||
// test BCDMultiply:
|
// test BCDMultiply:
|
||||||
FS.DecimalSeparator:='.';
|
FS.DecimalSeparator:='.';
|
||||||
FS.ThousandSeparator:=#0;
|
FS.ThousandSeparator:=#0;
|
||||||
testBCDMultiply(1000, 1000, 1000000);
|
testBCDMultiply(1000, -1000, -1000000);
|
||||||
testBCDMultiply(1000, 0.001, 1);
|
testBCDMultiply(-1000, -0.001, 1);
|
||||||
testBCDMultiply(1000, 0.0001, 0.1);
|
testBCDMultiply(1000, 0.0001, 0.1);
|
||||||
testBCDMultiply(strtobcd('12345678901234567890',FS), strtobcd('0.0000000001',FS), strtobcd('1234567890.123456789',FS));
|
testBCDMultiply(strtobcd('12345678901234567890',FS), strtobcd('0.0000000001',FS), strtobcd('1234567890.123456789',FS));
|
||||||
|
|
||||||
@ -111,6 +111,9 @@ begin
|
|||||||
testBCDDivide(1007, 5, 201.4);
|
testBCDDivide(1007, 5, 201.4);
|
||||||
|
|
||||||
|
|
||||||
if ErrorCount<>0 then writeln('FmtBCD test program found ', ErrorCount, ' errors!');
|
if ErrorCount<>0 then
|
||||||
Halt(ErrorCount);
|
begin
|
||||||
|
writeln('FmtBCD test program found ', ErrorCount, ' errors!');
|
||||||
|
Halt(ErrorCount);
|
||||||
|
end;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user