mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-24 05:09:26 +02:00
* prepared test to be used as regression test
This commit is contained in:
parent
3b455c1cf2
commit
1c100f0b13
@ -21,7 +21,7 @@ const
|
|||||||
|
|
||||||
function IntToStr128(v: u128): RawByteString;
|
function IntToStr128(v: u128): RawByteString;
|
||||||
begin
|
begin
|
||||||
result := 'todo';
|
result := '$'+hexstr(v.hi,16)+hexstr(v.lo,16);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -36,7 +36,10 @@ begin
|
|||||||
if crc=result then
|
if crc=result then
|
||||||
writeln('passed')
|
writeln('passed')
|
||||||
else
|
else
|
||||||
writeln('failed (got=',crc,',expected=',result,')');
|
begin
|
||||||
|
writeln('failed (got=',crc,',expected=',result,')');
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure perform_crc64(const name, testcase: RawByteString; result: qword);
|
procedure perform_crc64(const name, testcase: RawByteString; result: qword);
|
||||||
@ -50,7 +53,10 @@ begin
|
|||||||
if crc=result then
|
if crc=result then
|
||||||
writeln('passed')
|
writeln('passed')
|
||||||
else
|
else
|
||||||
writeln('failed (got=',crc,',expected=',result,')');
|
begin
|
||||||
|
writeln('failed (got=',crc,',expected=',result,')');
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure perform_crc128(const name, testcase: RawByteString; result: u128);
|
procedure perform_crc128(const name, testcase: RawByteString; result: u128);
|
||||||
@ -64,7 +70,10 @@ begin
|
|||||||
if crc=result then
|
if crc=result then
|
||||||
writeln('passed')
|
writeln('passed')
|
||||||
else
|
else
|
||||||
writeln('failed (got=',IntToStr128(crc),',expected=',IntToStr128(result),')');
|
begin
|
||||||
|
writeln('failed (got=',IntToStr128(crc),',expected=',IntToStr128(result),')');
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user