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

Test run data :

Free Pascal Compiler Test Suite Results

View Test suite results

Please specify search criteria:
File:
Operating system:
Processor:
Version
Date
Submitter
Machine
Comment
Limit
Cond
Category
Only failed tests
Hide skipped tests
List all tests

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

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

Detailed test run results:

Record count: 50

Total = 50

OK=50 Percentage= 100.00

Result type Cat. Count Percentage First date Last Date
Successfully run 50 100.0 2024/05/17 11:04:00 38 2024/05/17 16:28:00 32
i386 10 20.0 2024/05/17 11:29:00 44 2024/05/17 12:24:00 45
sparc 1 2.0 2024/05/17 12:01:00 74 2024/05/17 12:01:00 74
powerpc 1 2.0 2024/05/17 11:30:00 242 2024/05/17 11:30:00 242
x86_64 26 52.0 2024/05/17 11:10:00 26 2024/05/17 14:42:00 39
powerpc64 2 4.0 2024/05/17 11:34:00 242 2024/05/17 11:39:00 59
mips 1 2.0 2024/05/17 11:21:00 241 2024/05/17 11:21:00 241
aarch64 7 14.0 2024/05/17 11:04:00 38 2024/05/17 16:28:00 32
sparc64 1 2.0 2024/05/17 12:19:00 173 2024/05/17 12:19:00 173
riscv64 1 2.0 2024/05/17 11:56:00 31 2024/05/17 11:56:00 31
linux 35 70.0 2024/05/17 11:04:00 38 2024/05/17 12:48:00 22
solaris 10 20.0 2024/05/17 11:29:00 44 2024/05/17 12:24:00 45
darwin 3 6.0 2024/05/17 16:15:00 32 2024/05/17 16:28:00 32
win64 2 4.0 2024/05/17 13:34:00 47 2024/05/17 14:42:00 39
3.3.1 19 38.0 2024/05/17 11:10:00 26 2024/05/17 14:42:00 39
3.2.2 10 20.0 2024/05/17 11:29:00 44 2024/05/17 12:24:00 45
3.2.3 21 42.0 2024/05/17 11:04:00 38 2024/05/17 16:28:00 32

Source:

{ Program to test Code generator secondadd()                 }
{ with longint values                                        }
{ FUNCTIONAL PRE-REQUISITES:                                 }
{   - assignments function correctly.                        }
{   - if statements function correctly.                      }
{   - subroutine calls function correctly.                   }

procedure fail;
begin
  WriteLn('Failed!');
  halt(1);
end;


procedure LongintTestAdd;
var
 i: longint;
 j: longint;
 result : boolean;
begin
 Write('Longint + Longint test...');
 result := true;
 i:=0;
 j:=0;
 i := i + -10000;
 if i <> -10000 then
  result := false;
 j := 32767;
 i := i + j;
 if i <> 22767 then
  result := false;
 i := i + j + 50000;
 if i <> 105534 then
  result := false;
 i:=0;
 j:=10000;
 i:= i + j + j + i + j;
 if i <> 30000 then
  result := false;
 if not result then
  Fail
 else
  WriteLn('Success.');
end;


procedure LongintTestSub;
var
 i, j, k : longint;
 result : boolean;
begin
 Write('Longint - Longint test...');
 result := true;
 i:=100000;
 j:=54;
 k:=56;
 i:= i - 100;
 if i <> 99900 then
  result := false;
 i := i - j - k - 100;
 if i <> 99690 then
  result := false;
 i:=100;
 j:=1000;
 k:=100;
 i:= j - i - k;
 if i <> 800 then
  result := false;
 if not result then
  Fail
 else
  WriteLn('Success.');
end;


procedure LongintTestMul;
var
 i : longint;
 j : longint;
 k: longint;
 result: boolean;
begin
 Write('Longint * Longint test...');
 result := true;
 i:=0;
 j:=0;
 i:=i * 32;
 if i <> 0 then
   result := false;
 i:=10;
 i:=i * -16;
 if i <> -160 then
    result := false;
 j:=10000;
 i:=-10000;
 i:=i * j;
 if i <> -100000000 then
    result := false;
 i:=1;
 j:=10;
 k:=16;
 i := i * j * k;
 if i <> 160 then
    result := false;
 i := 1;
 j := 10;
 k := 16;
 i := i * 10 * j * i * j * 16 * k;
 if i <> 256000 then
    result := false;
 if not result then
  Fail
 else
  WriteLn('Success.');
end;

procedure LongintTestXor;
var
 i, j : Longint;
 result : boolean;
begin
 Write('Longint XOR Longint test...');
 result := true;
 i := 0;
 j := 0;
 i := i xor $1000001;
 if i <> $1000001 then
   result := false;
 i:=0;
 j:=$10000001;
 i:=i xor j;
 if i <> $10000001 then
   result := false;

 i := 0;
 j := $55555555;
 i := i xor j xor $AAAAAAAA;
 if i <> $FFFFFFFF then
   result := false;
 if not result then
  Fail
 else
  WriteLn('Success.');
end;


procedure LongintTestOr;
var
 i,j : Longint;
 result : boolean;
Begin
 Write('Longint OR Longint test...');
 result := true;
 i := 0;
 j := 0;
 i := i or $1000001;
 if i <> $1000001 then
   result := false;
 i:=0;
 j:=$10000001;
 i:=i or j;
 if i <> $10000001 then
   result := false;

 i := 0;
 j := $55555555;
 i := i or j or $AAAAAAAA;
 if i <> $FFFFFFFF then
   result := false;
 if not result then
  Fail
 else
  WriteLn('Success.');
end;



procedure LongintTestAnd;
var
 i,j : Longint;
 result : boolean;
Begin
 Write('Longint AND Longint test...');
 result := true;
 i := $1000001;
 j := 0;
 i := i and $1000001;
 if i <> $1000001 then
   result := false;
 i:=0;
 j:=$10000001;
 i:=i and j;
 if i <> 0 then
   result := false;

 i := $FFFFFFFF;
 j := $55555555;
 i := i and j;
 if i <> $55555555 then
   result := false;
 i := $FFFFFFFF;
 i := i and $AAAAAAAA;
 if i <> $AAAAAAAA then
   result := false;

 i := 0;
 j := $55555555;
 i := i and j and $AAAAAAAA;
 if i <> 0 then
   result := false;
 if not result then
  Fail
 else
  WriteLn('Success.');
end;

procedure LongintTestEqual;
var
 i,j : Longint;
 result : boolean;
Begin
 Write('Longint = Longint test...');
 result := true;
 i := $1000001;
 j := 0;
 if i = 0 then
   result := false;
 if i = j then
  result := false;
 if j = i then
  result := false;
 if not result then
  Fail
 else
  WriteLn('Success.');
end;


procedure LongintTestNotEqual;
var
 i,j : Longint;
 result : boolean;
Begin
 Write('Longint <> Longint test...');
 result := true;
 i := $1000001;
 j := $1000001;
 if i <> $1000001 then
   result := false;
 if i <> j then
  result := false;
 if j <> i then
  result := false;
 if not result then
  Fail
 else
  WriteLn('Success.');
end;

procedure LongintTestLE;
var
 i, j: Longint;
 result : boolean;
begin
 Write('Longint <= Longint test...');
 result := true;
 i := -1;
 j := -2;
 if i <= j then
   result := false;
 i := -2;
 j := $FFFF;
 if i >= j then
   result := false;
 i := $FFFFFFFF;
 if i <= $FFFFFFFE then
    result := false;
 j := $FFFFFFFF;
 if i <= j then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
  Fail;
end;


procedure LongintTestGE;
var
 i, j: Longint;
 result : boolean;
begin
 Write('Longint >= Longint test...');
 result := true;
 i := $FFFFFFFE;
 j := $FFFFFFFF;
 if i >= j then
   result := false;
 i := $FFFFFFFE;
 j := $FFFFFFFF;
 if i > j then
   result := false;
 i := $FFFFFFFE;
 if i > $FFFFFFFE then
    result := false;
 i := $FFFFFFFF;
 j := $FFFFFFFF;
 if i >= j then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
  Fail;
end;



Begin
  { These should be tested first, since if they do not }
  { work, they will false all other results.           }
  LongintTestEqual;
  LongintTestNotEqual;
  LongintTestAdd;
  LongintTestMul;
  LongintTestOr;
  LongintTestAnd;
  LongintTestXor;
  LongintTestLe;
  LongintTestGe;
  LongintTestSub;
end.


{
 $Log
}

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