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

t_id 172
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/21 02:33:00 24 2024/05/21 06:59:00 58
i386 4 8.0 2024/05/21 03:08:00 33 2024/05/21 06:56:00 236
m68k 2 4.0 2024/05/21 06:07:00 190 2024/05/21 06:59:00 58
sparc 2 4.0 2024/05/21 06:46:00 68 2024/05/21 06:55:00 81
powerpc 10 20.0 2024/05/21 06:13:00 42 2024/05/21 06:46:00 52
arm 3 6.0 2024/05/21 05:29:00 69 2024/05/21 06:52:00 38
x86_64 12 24.0 2024/05/21 02:33:00 24 2024/05/21 06:23:00 27
powerpc64 4 8.0 2024/05/21 05:39:00 106 2024/05/21 06:38:00 212
mips 2 4.0 2024/05/21 04:05:00 47 2024/05/21 06:16:00 240
mipsel 1 2.0 2024/05/21 06:23:00 148 2024/05/21 06:23:00 148
aarch64 10 20.0 2024/05/21 05:20:00 46 2024/05/21 06:53:00 38
linux 34 68.0 2024/05/21 02:33:00 24 2024/05/21 06:59:00 58
win32 1 2.0 2024/05/21 06:01:00 28 2024/05/21 06:01:00 28
solaris 8 16.0 2024/05/21 05:57:00 31 2024/05/21 06:19:00 29
darwin 7 14.0 2024/05/21 06:02:00 29 2024/05/21 06:53:00 38
3.3.1 23 46.0 2024/05/21 02:33:00 24 2024/05/21 06:56:00 236
3.2.3 27 54.0 2024/05/21 03:08:00 33 2024/05/21 06:59:00 58

Source:

{****************************************************************}
{  CODE GENERATOR TEST PROGRAM                                   }
{****************************************************************}
{ NODE TESTED : secondtypeconvert() -> second_int_to_real        }
{****************************************************************}
{ PRE-REQUISITES: secondload()                                   }
{                 secondassign()                                 }
{                 secondcalln()                                  }
{                 secondinline()                                 }
{                 secondadd()                                    }
{****************************************************************}
{ DEFINES:                                                       }
{****************************************************************}
{ REMARKS: Tests integer to real conversion                      }
{   This routine assumes that there is a type conversion         }
{   from all types to s32bit, u32bit or s64bit before conversion }
{   to a real.                                                   }
{****************************************************************}
program tcnvint4;

{$ifdef VER70}
  {$define tp}
{$endif}

{$R-}

{$ifdef tp}
type
  smallint = integer;
{$endif}

procedure fail;
begin
  WriteLn('Failure.');
  halt(1);
end;


const
 RESULT_S64BIT            =   101234;
 RESULT_S32BIT            = -1000000;
 RESULT_U32BIT            =  2000000;
 RESULT_S16BIT            =   -12123;
 RESULT_U16BIT            =    12123;
 RESULT_U8BIT             =      247;
 RESULT_S8BIT             =     -123;


{$ifndef tp}
   function gets64bit : int64;
    begin
      gets64bit := RESULT_S64BIT;
    end;
{$endif}

   function gets32bit : longint;
    begin
      gets32bit := RESULT_S32BIT;
    end;

   function gets16bit : smallint;
    begin
      gets16bit := RESULT_S16BIT;
    end;

   function gets8bit : shortint;
    begin
      gets8bit := RESULT_S8BIT;
    end;

   function getu8bit : byte;
    begin
      getu8bit := RESULT_U8BIT;
    end;

   function getu16bit : word;
    begin
      getu16bit := RESULT_U16BIT;
    end;

   function getu32bit : longint;
    begin
      getu32bit := RESULT_U32BIT;
    end;

var
 s32bit : longint;
 failed : boolean;
 s16bit : smallint;
 s8bit : shortint;
 u8bit : byte;
 u16bit : word;
{$ifndef tp}
 s64bit : int64;
 u32bit : cardinal;
{$endif}
 result_val : real;
begin
  { left : LOC_REFERENCE }
  Write('second_int_to_real (left : LOC_REFERENCE)...');
  s64bit := RESULT_S64BIT;
  failed := false;
  result_val := s64bit;
  if trunc(result_val) <> RESULT_S64BIT then
     failed:=true;

  s32bit := RESULT_S32BIT;
  result_val := s32bit;
  if trunc(result_val) <> RESULT_S32BIT then
     failed:=true;


  u32bit := RESULT_U32BIT;
  result_val := u32bit;
  if trunc(result_val) <> RESULT_U32BIT then
     failed:=true;

  s16bit := RESULT_S16BIT;
  result_val := s16bit;
  if trunc(result_val) <> RESULT_S16BIT then
     failed:=true;

  u16bit := RESULT_U16BIT;
  result_val := u16bit;
  if trunc(result_val) <> RESULT_U16BIT then
     failed:=true;


  s8bit := RESULT_S8BIT;
  result_val := s8bit;
  if trunc(result_val) <> RESULT_S8BIT then
     failed:=true;

  u8bit := RESULT_U8BIT;
  result_val := u8bit;
  if trunc(result_val) <> RESULT_U8BIT then
     failed:=true;


  if failed then
    fail
  else
    WriteLn('Passed!');

  Write('second_int_to_real (left : LOC_REGISTER)...');
  failed := false;
  result_val := gets64bit;
  if trunc(result_val) <> RESULT_S64BIT then
     failed:=true;

  result_val := gets32bit;
  if trunc(result_val) <> RESULT_S32BIT then
     failed:=true;


  result_val := getu32bit;
  if trunc(result_val) <> RESULT_U32BIT then
     failed:=true;

  result_val := getu8bit;
  if trunc(result_val) <> RESULT_u8BIT then
     failed:=true;


  result_val := gets8bit;
  if trunc(result_val) <> RESULT_s8BIT then
     failed:=true;


  result_val := gets16bit;
  if trunc(result_val) <> RESULT_S16BIT then
     failed:=true;


  result_val := getu16bit;
  if trunc(result_val) <> RESULT_U16BIT then
     failed:=true;


  if failed then
    fail
  else
    WriteLn('Passed!');

end.

{

 $Log: tcnvint4.pp,v $
 Revision 1.2  2002/09/07 15:40:55  peter
   * old logs removed and tabs fixed

 Revision 1.1  2002/08/10 08:27:43  carl
   + mre tests for cg testuit

}

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