Test suite results for test file test/cg/tlohi.pp

Test run data :

Run ID:
Operating system: openbsd
Processor: x86_64
Version: 3.3.1
Fails/OK/Total: 22/9358/9380
Version: 3.3.1
Full version: 3.3.1-15586-g69ee0ae9b1-unpushed-dirty
Comment: -Xd -Fl/home/muller/sys-root/x86_64-openbsd/usr/lib -Fl/home/muller/sys-root/x86_64-openbsd/usr/local/lib -dFPC_USE_LIBC -gw -O1 -Fd
Machine: gcc220
Category: 1
SVN revisions: 69ee0ae9b1:628e6d2b46:3f8bbd3b00:2f9ed0576e
Submitter: pierre
Date: 2024/04/19 10:41:00
Previous run: 0
Next run: 935149

Hide skipped tests

Hide successful tests

Test file "test/cg/tlohi.pp" information:

t_id 189
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0

Detailed test run results:

tr_idruntr_oktr_skiptr_result
443589782934954TrueFalseSuccessfully run

Record count: 1

No log of 934954.

Source:

procedure error(const s: string);
begin
  writeln('error: ',s);
  halt(1);
end;

procedure testlohiword;
var
  w: word;
  i: smallint;
begin
  w := $1234;
  i := $1234;
  if lo(w) <> (w and 255) then
    error('lo word');
  if lo(i) <> (i and 255) then
    error('lo integer');

  if hi(w) <> (w shr 8) then
    error('hi word');
  if hi(i) <> (i shr 8) then
    error('hi integer');
end;


procedure testlohilong;
var
  w: cardinal;
  i: longint;
begin
  w := $12345678;
  i := $12345678;
  if lo(w) <> (w and $ffff) then
    error('lo cardinal');
  if lo(i) <> (i and $ffff) then
    error('lo longint');

  if hi(w) <> (w shr 16) then
    error('hi cardinal');
  if hi(i) <> (i shr 16) then
    error('hi longint');
end;


procedure testlohiqword;
var
  w: qword;
  i: int64;
begin
  w := $12345678;
  w := w shl 32;
  w := w or $98765432;
  i := int64(w);
  if lo(w) <> (cardinal(w)) then
    error('lo qword');
  if lo(i) <> (longint(w)) then
    error('lo int64');

  if hi(w) <> (w shr 32) then
    error('hi qword');
  if hi(i) <> (i shr 32) then
    error('hi int64');
end;

begin
  testlohiword;
  testlohilong;
  testlohiqword;
end.

Link to SVN view of test/cg/tlohi.pp source.