Test suite results for test file test/cg/taddbool.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/taddbool.pp" information:

t_id 97
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/10/19 08:05:00 45 2024/10/19 13:36:00 24
i386 4 8.0 2024/10/19 08:55:00 60 2024/10/19 11:13:00 63
m68k 2 4.0 2024/10/19 09:50:00 39 2024/10/19 10:22:00 40
sparc 4 8.0 2024/10/19 08:05:00 45 2024/10/19 11:16:00 40
powerpc 5 10.0 2024/10/19 09:08:00 50 2024/10/19 13:26:00 65
x86_64 11 22.0 2024/10/19 08:27:00 30 2024/10/19 13:36:00 24
powerpc64 10 20.0 2024/10/19 08:43:00 65 2024/10/19 11:23:00 69
mips 2 4.0 2024/10/19 09:54:00 35 2024/10/19 10:28:00 38
mipsel 2 4.0 2024/10/19 09:59:00 38 2024/10/19 10:35:00 142
aarch64 3 6.0 2024/10/19 08:15:00 27 2024/10/19 09:32:00 28
sparc64 3 6.0 2024/10/19 08:33:00 120 2024/10/19 10:46:00 141
riscv64 2 4.0 2024/10/19 10:25:00 33 2024/10/19 11:10:00 26
loongarch64 2 4.0 2024/10/19 09:45:00 25 2024/10/19 10:17:00 30
linux 32 64.0 2024/10/19 08:05:00 45 2024/10/19 11:38:00 25
go32v2 3 6.0 2024/10/19 08:55:00 60 2024/10/19 11:13:00 63
solaris 7 14.0 2024/10/19 13:22:00 24 2024/10/19 13:36:00 24
aix 8 16.0 2024/10/19 09:08:00 50 2024/10/19 13:26:00 65
3.3.1 30 60.0 2024/10/19 08:05:00 45 2024/10/19 13:26:00 65
3.2.3 20 40.0 2024/10/19 08:15:00 27 2024/10/19 13:36:00 24

Source:

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


{$IFDEF VER70}
TYPE
  cardinal = longint;
{$ENDIF}


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

{ ---------------------------- BOOLEAN TEST ----------------------------- }
{                              secondadd()                                }
{ ----------------------------------------------------------------------- }

procedure BoolTestAnd;
var
 bb1, bb2: boolean;
 wb1, wb2: wordbool;
 lb1, lb2: longbool;
 result : boolean;
begin
 result := true;
 { BOOLEAN AND BOOLEAN }
 Write('boolean AND boolean test...');
 bb1 := true;
 bb2 := false;
 if bb1 and bb2 then
   result := false;
 if bb2 then
   result := false;
 bb1 := false;
 bb2 := false;
 if bb1 and bb2 then
   result := false;

 bb1 := bb1 and bb2;
 if bb1 then
   result := false;
 if bb1 and FALSE then
   result := false;
 bb1 := true;
 bb2 := true;
 if bb1 and bb2 then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
   Fail;

 { WORDBOOL AND WORDBOOL }
 result := true;
 Write('wordbool AND wordbool test...');
 wb1 := true;
 wb2 := false;
 if wb1 and wb2 then
   result := false;
 if wb2 then
   result := false;
 wb1 := false;
 wb2 := false;
 if wb1 and wb2 then
   result := false;

 wb1 := wb1 and wb2;
 if wb1 then
   result := false;
 if wb1 and FALSE then
   result := false;

 wb1 := true;
 wb2 := true;
 if wb1 and wb2 then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
   Fail;

 { LONGBOOL AND LONGBOOL }
 result := true;
 Write('longbool AND longbool test...');
 lb1 := true;
 lb2 := false;
 if lb1 and lb2 then
   result := false;
 if lb2 then
   result := false;
 lb1 := false;
 lb2 := false;
 if lb1 and lb2 then
   result := false;

 lb1 := lb1 and lb2;
 if lb1 then
   result := false;
 if lb1 and FALSE then
   result := false;

 lb1 := true;
 lb2 := true;
 if lb1 and lb2 then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
   Fail;
end;


procedure BoolTestOr;
var
 bb1, bb2: boolean;
 wb1, wb2: wordbool;
 lb1, lb2: longbool;
 result : boolean;
begin
 result := false;
 { BOOLEAN AND BOOLEAN }
 Write('boolean OR boolean test...');
 bb1 := true;
 bb2 := false;
 if bb1 or bb2 then
   result := true;
 bb1 := false;
 bb2 := false;
 if bb1 or bb2 then
   result := false;

 bb1 := bb1 or bb2;
 if bb1 then
   result := false;
 if bb1 or FALSE then
   result := false;


 bb1 := true;
 bb2 := true;
 if bb1 or bb2 then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
   Fail;

 { WORDBOOL AND WORDBOOL }
 result := false;
 Write('wordbool OR wordbool test...');
 wb1 := true;
 wb2 := false;
 if wb1 or wb2 then
   result := true;
 wb1 := false;
 wb2 := false;
 if wb1 or wb2 then
   result := false;

 wb1 := wb1 or wb2;
 if wb1 then
   result := false;
 if wb1 or FALSE then
   result := false;

 wb1 := true;
 wb2 := true;
 if wb1 or wb2 then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
   Fail;

 { LONGBOOL AND LONGBOOL }
 result := false;
 Write('longbool OR longbool test...');
 lb1 := true;
 lb2 := false;
 if lb1 or lb2 then
   result := true;
 if lb2 then
   result := false;
 lb1 := false;
 lb2 := false;
 if lb1 or lb2 then
   result := false;

 lb1 := lb1 or lb2;
 if lb1 then
   result := false;
 if lb1 or FALSE then
   result := false;

 lb1 := true;
 lb2 := true;
 if lb1 or lb2 then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
   Fail;
end;


Procedure BoolTestXor;
var
 bb1, bb2: boolean;
 wb1, wb2: wordbool;
 lb1, lb2: longbool;
 result : boolean;
begin
 result := false;
 { BOOLEAN XOR BOOLEAN }
 Write('boolean XOR boolean test...');
 bb1 := true;
 bb2 := false;
 if bb1 xor bb2 then
   result := true;
 bb1 := false;
 bb2 := false;
 if bb1 xor bb2 then
   result := false;

 bb1 := bb1 xor bb2;
 if bb1 then
   result := false;
 if bb1 xor FALSE then
   result := false;


 bb1 := true;
 bb2 := true;
 if bb1 xor bb2 then
  begin
     Fail;
  end
 else
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end;

 { WORDBOOL XOR WORDBOOL }
 result := false;
 Write('wordbool XOR wordbool test...');
 wb1 := true;
 wb2 := false;
 if wb1 xor wb2 then
   result := true;
 wb1 := false;
 wb2 := false;
 if wb1 xor wb2 then
   result := false;

 wb1 := wb1 xor wb2;
 if wb1 then
   result := false;
 if wb1 xor FALSE then
   result := false;

 wb1 := true;
 wb2 := true;
 if wb1 xor wb2 then
  begin
      Fail;
  end
 else
   begin
    if result then
      WriteLn('Success.')
    else
      Fail;
   end;

 { LONGBOOL XOR LONGBOOL }
 result := false;
 Write('longbool XOR longbool test...');
 lb1 := true;
 lb2 := false;
 if lb1 xor lb2 then
   result := true;
 if lb2 then
   result := false;
 lb1 := false;
 lb2 := false;
 if lb1 xor lb2 then
   result := false;

 lb1 := lb1 xor lb2;
 if lb1 then
   result := false;
 if lb1 xor FALSE then
   result := false;

 lb1 := true;
 lb2 := true;
 if lb1 xor lb2 then
  begin
      Fail;
  end
 else
   begin
     if result then
       WriteLn('Success.')
     else
       Fail;
   end;
end;

Procedure BoolTestEqual;
var
 bb1, bb2, bb3: boolean;
 wb1, wb2, wb3: wordbool;
 lb1, lb2, lb3: longbool;
 result : boolean;
 values : longint;
Begin
 values := $02020202;
 { BOOLEAN = BOOLEAN }
 result := true;
 Write('boolean = boolean test...');
 bb1 := true;
 bb2 := true;
 bb3 := false;
 bb1 := (bb1 = bb2) and (bb2 and false);
 if bb1 then
   result := false;
 bb1 := true;
 bb2 := true;
 bb3 := false;
 bb1 := (bb1 = bb2) and (bb2 and true);
 if not bb1 then
   result := false;
 if bb1 = bb2 then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
   Fail;
 { WORDBOOL = WORDBOOL }
 result := true;
 Write('wordbool = wordbool test...');
 wb1 := true;
 wb2 := true;
 wb3 := false;
 wb1 := (wb1 = wb2) and (wb2 and false);
 if wb1 then
   result := false;
 wb1 := true;
 wb2 := true;
 wb3 := false;
 wb1 := (wb1 = wb2) and (wb2 and true);
 if not wb1 then
   result := false;
 if wb1 = wb2 then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
   Fail;
 Write('wordbool conversion to boolean...');
 result := TRUE;
 move(values,lb1,sizeof(lb1));
 if lb1 <> TRUE then
    result := false;
 if result then
    WriteLn('Success.')
 else
    Fail;
 { LONGBOOL = LONGBOOL }
 result := true;
 Write('longbool = longbool test...');
 lb1 := true;
 lb2 := true;
 lb3 := false;
 lb1 := (lb1 = lb2) and (lb2 and false);
 if lb1 then
   result := false;
 lb1 := true;
 lb2 := true;
 lb3 := false;
 lb1 := (lb1 = lb2) and (lb2 and true);
 if not lb1 then
   result := false;
 if lb1 = lb2 then
  begin
    if result then
      WriteLn('Success.')
    else
      Fail;
  end
 else
   Fail;
 Write('longbool conversion to boolean...');
 result := TRUE;
 move(values,lb1,sizeof(lb1));
 if lb1 <> TRUE then
    result := false;
 if result then
    WriteLn('Success.')
 else
    Fail;
end;


Procedure BoolTestNotEqual;
var
 bb1, bb2, bb3: boolean;
 wb1, wb2, wb3: wordbool;
 lb1, lb2, lb3: longbool;
 result : boolean;
Begin
 { BOOLEAN <> BOOLEAN }
 result := true;
 Write('boolean <> boolean test...');
 bb1 := true;
 bb2 := true;
 bb3 := false;
 bb1 := (bb1 <> bb2) and (bb2 <> false);
 if bb1 then
   result := false;
 bb1 := true;
 bb2 := true;
 bb3 := false;
 bb1 := (bb1 <> bb2) and (bb2 <> true);
 if bb1 then
   result := false;
 bb1 := false;
 bb2 := false;
 if bb1 <> bb2 then
  begin
      Fail;
  end
 else
  begin
   if result then
     WriteLn('Success.')
   else
     Fail;
  end;
 { WORDBOOL <> WORDBOOL }
 result := true;
 Write('wordbool <> wordbool test...');
 wb1 := true;
 wb2 := true;
 wb3 := false;
 wb1 := (wb1 <> wb2) and (wb2 <> false);
 if wb1 then
   result := false;
 wb1 := true;
 wb2 := true;
 wb3 := false;
 wb1 := (wb1 <> wb2) and (wb2 <> true);
 if wb1 then
   result := false;
 wb1 := false;
 wb2 := false;
 if wb1 <> wb2 then
  begin
      Fail;
  end
 else
  begin
   if result then
     WriteLn('Success.')
   else
     Fail;
  end;
 { LONGBOOL <> LONGBOOL }
 result := true;
 Write('longbool <> longbool test...');
 lb1 := true;
 lb2 := true;
 lb3 := false;
 lb1 := (lb1 <> lb2) and (lb2 <> false);
 if lb1 then
   result := false;
 lb1 := true;
 lb2 := true;
 lb3 := false;
 lb1 := (lb1 <> lb2) and (lb2 <> true);
 if lb1 then
   result := false;
 lb1 := false;
 lb2 := false;
 if lb1 <> lb2 then
  begin
      Fail;
  end
 else
  begin
   if result then
     WriteLn('Success.')
   else
     Fail;
  end;

end;

Procedure BoolLessThen;
var
 bb1, bb2: boolean;
 wb1, wb2: wordbool;
 lb1, lb2: longbool;
Begin
 {!!!!!!!!!!!}
end;


Procedure BoolGreaterThen;
var
 bb1, bb2: boolean;
 wb1, wb2: wordbool;
 lb1, lb2: longbool;
Begin
 {!!!!!!!!!!!!}
End;







Begin
  BoolTestAnd;
  BoolTestOr;
  BoolTestXor;
  BoolTestEqual;
  BoolTestNotEqual;
end.



{
  $Log: taddbool.pp,v $
  Revision 1.5  2002/09/07 15:40:49  peter
    * old logs removed and tabs fixed

  Revision 1.4  2002/04/13 21:01:55  carl
  * fixed typo

  Revision 1.3  2002/03/05 21:54:52  carl
  * Adapted for automated testing

}

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