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

t_id 9
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 07:29:00 50 2024/10/19 13:36:00 24
i386 4 8.0 2024/10/19 08:55:00 60 2024/10/19 10:27:00 65
m68k 3 6.0 2024/10/19 07:29:00 50 2024/10/19 10:22:00 40
sparc 3 6.0 2024/10/19 08:05:00 45 2024/10/19 11:16:00 40
powerpc 7 14.0 2024/10/19 08:40:00 51 2024/10/19 13:26:00 65
arm 2 4.0 2024/10/19 09:36:00 32 2024/10/19 10:03:00 32
x86_64 9 18.0 2024/10/19 08:27:00 30 2024/10/19 13:36:00 24
powerpc64 8 16.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
aarch64 5 10.0 2024/10/19 08:15:00 27 2024/10/19 09:57:00 26
sparc64 3 6.0 2024/10/19 08:33:00 120 2024/10/19 11:33:00 117
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 35 70.0 2024/10/19 07:29:00 50 2024/10/19 11:38:00 25
go32v2 3 6.0 2024/10/19 08:55:00 60 2024/10/19 10:27:00 65
solaris 5 10.0 2024/10/19 13:22:00 24 2024/10/19 13:36:00 24
aix 7 14.0 2024/10/19 08:40:00 51 2024/10/19 13:26:00 65
3.3.1 31 62.0 2024/10/19 08:05:00 45 2024/10/19 13:26:00 65
3.2.3 19 38.0 2024/10/19 07:29:00 50 2024/10/19 13:36:00 24

Source:

program test_case;
function case1(Val : byte) : char;
begin
  case Val of
    0..25 : case1:=chr(Val + ord('A'));
    26..51: case1:=chr(Val + ord('a') - 26);
    52..61: case1:=chr(Val + ord('0') - 52);
    62    : case1:='+';
    63    : case1:='/';
  else
    case1:='$';
  end;
end;

function case2(Val : integer) : integer;
begin
  case Val of
    -1      : case2:=1;
    32765..
    32767   : case2:=2;
  else
    case2:=-1;
  end;
end;

function case3(Val : integer) : integer;
begin
  case Val of
    -32768..
    -32766 : case3:=1;
    0..10  : case3:=2;
  else
    case3:=-1;
  end;
end;

var
  error: boolean;

begin
  { The correct outputs should be:
    F $
    2 2
    1 2 2
  }
  error := false;
  writeln(case1(5), ' ', case1(255),' (should be: F $)');
  error := (case1(5) <> 'F') or (case1(255) <> '$');
  writeln(case2(32765), ' ', case2(32767),' (should be: 2 2)');
  error := error or (case2(32765) <> 2) or (case2(32767) <> 2);
  writeln(case3(-32768),' ',case3(0), ' ',case3(5),' (should be: 1 2 2)');
  error := error or (case3(-32768) <> 1) or (case3(0) <> 2) or
           (case3(5) <> 2);
  if error then
    halt(1);
end.

Link to SVN view of test/tcase1.pp source.