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

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

Detailed test run results:

Record count: 50

Total = 50

OK=36 Percentage= 72.00

Result type Cat. Count Percentage First date Last Date
Failed to run 14 28.0 2024/10/19 09:54:00 35 2024/10/19 13:26:00 65
powerpc 5 35.7 2024/10/19 10:03:00 203 2024/10/19 13:26:00 65
powerpc64 4 28.6 2024/10/19 10:07:00 49 2024/10/19 10:49:00 49
mips 2 14.3 2024/10/19 09:54:00 35 2024/10/19 10:28:00 38
mipsel 1 7.1 2024/10/19 10:35:00 142 2024/10/19 10:35:00 142
sparc64 2 14.3 2024/10/19 10:46:00 141 2024/10/19 11:33:00 117
linux 11 78.6 2024/10/19 09:54:00 35 2024/10/19 11:33:00 117
aix 3 21.4 2024/10/19 12:23:00 62 2024/10/19 13:26:00 65
3.3.1 14 100.0 2024/10/19 09:54:00 35 2024/10/19 13:26:00 65
Successfully run 36 72.0 2024/10/19 07:29:00 50 2024/10/19 13:36:00 24
i386 5 13.9 2024/10/19 09:39:00 55 2024/10/19 11:13:00 63
m68k 3 8.3 2024/10/19 07:29:00 50 2024/10/19 10:22:00 40
sparc 3 8.3 2024/10/19 09:01:00 54 2024/10/19 11:16:00 40
arm 2 5.6 2024/10/19 09:36:00 32 2024/10/19 10:03:00 32
x86_64 10 27.8 2024/10/19 09:32:00 37 2024/10/19 13:36:00 24
powerpc64 5 13.9 2024/10/19 08:43:00 65 2024/10/19 11:23:00 69
aarch64 3 8.3 2024/10/19 08:15:00 27 2024/10/19 09:57:00 26
sparc64 1 2.8 2024/10/19 09:25:00 118 2024/10/19 09:25:00 118
riscv64 2 5.6 2024/10/19 10:25:00 33 2024/10/19 11:10:00 26
loongarch64 2 5.6 2024/10/19 09:45:00 25 2024/10/19 10:17:00 30
linux 23 63.9 2024/10/19 07:29:00 50 2024/10/19 11:38:00 25
go32v2 3 8.3 2024/10/19 09:39:00 55 2024/10/19 11:13:00 63
solaris 7 19.4 2024/10/19 13:22:00 24 2024/10/19 13:36:00 24
aix 3 8.3 2024/10/19 10:31:00 61 2024/10/19 11:23:00 69
3.3.1 19 52.8 2024/10/19 09:32:00 28 2024/10/19 11:38:00 25
3.2.3 17 47.2 2024/10/19 07:29:00 50 2024/10/19 13:36:00 24

Source:

{ Part of System unit testsuit        }
{ Carl Eric Codere Copyright (c) 2002 }
program tabs;

{$ifdef VER1_0}
  {$define SKIP_CURRENCY_TEST}
{$endif }
{$APPTYPE CONSOLE}
{$R+}
{$Q+}

const
  RESULT_ONE_INT = 65536;
  VALUE_ONE_INT = -65536;
  RESULT_CONST_ONE_INT = abs(VALUE_ONE_INT);
  RESULT_TWO_INT = 12345;
  VALUE_TWO_INT = 12345;
  RESULT_CONST_TWO_INT = abs(VALUE_TWO_INT);

  RESULT_THREE_INT = 2147483647;
  VALUE_THREE_INT = -2147483647;
  RESULT_CONST_THREE_INT = abs(VALUE_THREE_INT);
  RESULT_FOUR_INT = 2147483647;
  VALUE_FOUR_INT = 2147483647;
  RESULT_CONST_FOUR_INT = abs(VALUE_FOUR_INT);


  RESULT_ONE_REAL = 12345.6789;
  VALUE_ONE_REAL = -12345.6789;
  RESULT_CONST_ONE_REAL = abs(VALUE_ONE_REAL);
  RESULT_TWO_REAL = 54321.6789E+02;
  VALUE_TWO_REAL = 54321.6789E+02;
  RESULT_CONST_TWO_REAL = abs(VALUE_TWO_REAL);

  RESULT_THREE_REAL = 0.0;
  VALUE_THREE_REAL = 0.0;
  RESULT_CONST_THREE_REAL = abs(VALUE_THREE_REAL);
  RESULT_FOUR_REAL = 12.0;
  VALUE_FOUR_REAL = -12.0;
  RESULT_CONST_FOUR_REAL = abs(VALUE_FOUR_REAL);


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


{$ifndef SKIP_CURRENCY_TEST}
 procedure test_abs_currency;
  var
   _result : boolean;
   value : currency;
   value1: currency;
  begin
    Write('Abs() test with currency type...');
    _result := true;

    value := VALUE_ONE_REAL;
    if (trunc(abs(value)) <> trunc(RESULT_CONST_ONE_REAL))  then
       _result := false;

    value := VALUE_TWO_REAL;
    if trunc(abs(value)) <> trunc(RESULT_CONST_TWO_REAL) then
       _result := false;

    value := VALUE_THREE_REAL;
    if trunc(abs(value)) <> trunc(RESULT_CONST_THREE_REAL) then
       _result := false;

    value := VALUE_FOUR_REAL;
    if trunc(abs(value)) <> trunc(RESULT_CONST_FOUR_REAL) then
       _result := false;

    value := VALUE_ONE_REAL;
    value1 := abs(value);
    if trunc(value1) <> trunc(RESULT_ONE_REAL) then
       _result := false;

    value := VALUE_TWO_REAL;
    value1 := abs(value);
    if trunc(value1) <> trunc(RESULT_TWO_REAL) then
       _result := false;

    value := VALUE_THREE_REAL;
    value1 := abs(value);
    if trunc(value1) <> trunc(RESULT_THREE_REAL) then
       _result := false;

    value := VALUE_FOUR_REAL;
    value1 := abs(value);
    if trunc(value1) <> trunc(RESULT_FOUR_REAL) then
       _result := false;


    if not _result then
      fail
    else
      WriteLn('Success!');
  end;
{$endif SKIP_CURRENCY_TEST}



 procedure test_abs_int64;
  var
   _result : boolean;
   value : int64;
   value1: int64;
  begin
    Write('Abs() test with int64 type...');
    _result := true;

   value := VALUE_ONE_INT;
    if (abs(value) <> (RESULT_CONST_ONE_INT))  then
       _result := false;


    value := VALUE_TWO_INT;
    if abs(value) <> (RESULT_CONST_TWO_INT) then
       _result := false;

    value := VALUE_THREE_INT;
    if abs(value) <> (RESULT_CONST_THREE_INT) then
       _result := false;

    value := VALUE_FOUR_INT;
    if abs(value) <> (RESULT_CONST_FOUR_INT) then
       _result := false;

    value := VALUE_ONE_INT;
    value1 := abs(value);
    if value1 <> (RESULT_ONE_INT) then
       _result := false;

    value := VALUE_TWO_INT;
    value1 := abs(value);
    if value1 <> (RESULT_TWO_INT) then
       _result := false;

    value := VALUE_THREE_INT;
    value1 := abs(value);
    if value1 <> (RESULT_THREE_INT) then
       _result := false;

    value := VALUE_FOUR_INT;
    value1 := abs(value);
    if value1 <> (RESULT_FOUR_INT) then
       _result := false;

    if not _result then
      fail
    else
      WriteLn('Success!');
  end;


 procedure test_abs_longint;
  var
   _result : boolean;
   value : longint;
   value1: longint;
  begin
    Write('Abs() test with longint type...');
    _result := true;

   value := VALUE_ONE_INT;
    if (abs(value) <> (RESULT_CONST_ONE_INT))  then
       _result := false;


    value := VALUE_TWO_INT;
    if abs(value) <> (RESULT_CONST_TWO_INT) then
       _result := false;

    value := VALUE_THREE_INT;
    if abs(value) <> (RESULT_CONST_THREE_INT) then
       _result := false;

    value := VALUE_FOUR_INT;
    if abs(value) <> (RESULT_CONST_FOUR_INT) then
       _result := false;

    value := VALUE_ONE_INT;
    value1 := abs(value);
    if value1 <> (RESULT_ONE_INT) then
       _result := false;

    value := VALUE_TWO_INT;
    value1 := abs(value);
    if value1 <> (RESULT_TWO_INT) then
       _result := false;

    value := VALUE_THREE_INT;
    value1 := abs(value);
    if value1 <> (RESULT_THREE_INT) then
       _result := false;

    value := VALUE_FOUR_INT;
    value1 := abs(value);
    if value1 <> (RESULT_FOUR_INT) then
       _result := false;

    if not _result then
      fail
    else
      WriteLn('Success!');
  end;

 procedure test_abs_real;
  var
   _result : boolean;
   value : real;
   value1: real;
  begin
    _result := true;
    Write('Abs() test with real type...');

    value := VALUE_ONE_REAL;
    if (trunc(abs(value)) <> trunc(RESULT_CONST_ONE_REAL))  then
       _result := false;

    value := VALUE_TWO_REAL;
    if trunc(abs(value)) <> trunc(RESULT_CONST_TWO_REAL) then
       _result := false;

    value := VALUE_THREE_REAL;
    if trunc(abs(value)) <> trunc(RESULT_CONST_THREE_REAL) then
       _result := false;

    value := VALUE_FOUR_REAL;
    if trunc(abs(value)) <> trunc(RESULT_CONST_FOUR_REAL) then
       _result := false;

    value := VALUE_ONE_REAL;
    value1 := abs(value);
    if trunc(value1) <> trunc(RESULT_ONE_REAL) then
       _result := false;

    value := VALUE_TWO_REAL;
    value1 := abs(value);
    if trunc(value1) <> trunc(RESULT_TWO_REAL) then
       _result := false;

    value := VALUE_THREE_REAL;
    value1 := abs(value);
    if trunc(value1) <> trunc(RESULT_THREE_REAL) then
       _result := false;

    value := VALUE_FOUR_REAL;
    value1 := abs(value);
    if trunc(value1) <> trunc(RESULT_FOUR_REAL) then
       _result := false;

    if not _result then
      fail
    else
      WriteLn('Success!');
  end;

var
 r: longint;
 _success : boolean;
 l: boolean;
Begin
{$ifdef SKIP_CURRENCY_TEST}
  Writeln('Skipping currency test because its not supported by theis compiler');
{$else SKIP_CURRENCY_TEST}
  test_abs_currency;
{$endif SKIP_CURRENCY_TEST}
  test_abs_real;
  test_abs_longint;
  test_abs_int64;
end.

{
 $Log: tabs.pp,v $
 Revision 1.2  2002/10/15 10:26:36  pierre
  * add code to remember that currency is only implemented in 1.1 compiler

 Revision 1.1  2002/09/18 18:30:30  carl
   + currency testing
   * more system unit routine testing

}

Link to SVN view of test/units/system/tabs.pp source.