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

t_id 82
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 5 10.0 2024/10/19 08:10:00 54 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 6 12.0 2024/10/19 08:35:00 146 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 11 22.0 2024/10/19 08:40:00 45 2024/10/19 13:36:00 24
powerpc64 8 16.0 2024/10/19 08:06:00 59 2024/10/19 11:23:00 69
mips 1 2.0 2024/10/19 10:28:00 38 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 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:23:00 137 2024/10/19 09:25:00 118
riscv64 1 2.0 2024/10/19 10:25:00 33 2024/10/19 10:25:00 33
linux 33 66.0 2024/10/19 08:05:00 45 2024/10/19 11:16:00 40
go32v2 4 8.0 2024/10/19 08:10:00 54 2024/10/19 11:13:00 63
solaris 8 16.0 2024/10/19 13:22:00 24 2024/10/19 13:36:00 24
aix 5 10.0 2024/10/19 09:08:00 50 2024/10/19 13:26:00 65
3.3.1 27 54.0 2024/10/19 08:05:00 45 2024/10/19 13:26:00 65
3.2.3 23 46.0 2024/10/19 08:06:00 59 2024/10/19 13:36:00 24

Source:

{
  $Id: tset1.pp,v 1.3 2000/11/30 22:38:21 peter Exp $

  Program to test set functions
}

{$define FPC_HAS_SET_INEQUALITIES}

program TestSet;

Procedure InitMSTimer;
begin
end;


{Get MS Timer}
Function MSTimer:longint;
begin
  MSTimer:=0;
end;


const
  Lval=2000;
VAR Box1, Box2:         ARRAY [0..255] OF BYTE;
    OneWOTwo, TwoWOOne,
    UnionSet, InterSet,
    Set1, Set2, Set3:   SET OF BYTE;
    K, MaxNr, L,
    N, Low, Hi:         INTEGER;
    Start:              LONGINT;

begin
   WriteLn ('Set operators functional and speed test');
   WriteLn;

   RandSeed := 17;

   for L := 0 TO 255 DO begin
      Box1 [L] := L;
   end;
   MaxNr := 255;
   for L := 0 TO 255 DO begin
      K := Random (MaxNr+1);
      Box2 [L] := Box1 [K];
      Box1 [K] := Box1 [MaxNr];
      Dec (MaxNr);
   end;

   Start :=MSTimer;

   Set1 := [];
   Set2 := [];
   for L := 0 TO 255 DO begin
      Set1 := Set1 + [Box2 [L]];
      if NOT (Box2 [L] IN Set1) then begin
         WriteLn ('error in AddElem or InSet functions');
         Halt;
         end;
      Set2 := Set2 + [Box2 [L]] + [];
   end;

{$ifdef FPC_HAS_SET_INEQUALITIES }
   if (Set1 <> Set2) OR (NOT (Set1 <= Set2)) OR (NOT (Set1 >= Set2)) then begin
{$else FPC_HAS_SET_INEQUALITIES }
   if (Set1 <> Set2) then begin
{$endif FPC_HAS_SET_INEQUALITIES }
      WriteLn ('error in relational operators 1');
      Halt;
      end;

   for L := 0 TO 255 DO begin
      Set1 := Set1 - [Box2 [L]];
      if Box2 [L] IN Set1 then begin
         WriteLn ('error in set difference 1');
         Halt;
         end;
   end;

   if Set1 <> [] then begin
      WriteLn ('error in set difference 2');
      Halt;
      end;

   for L := 1 TO LVal DO begin
      REPEAT
         Low := Random (256);
         Hi  := Random (256);
      UNTIL Low <= Hi;

      Set1 := [];
      Set1 := Set1 + [Low..Hi];
      for K := 0 TO 255 DO begin
         if (K IN Set1) AND ((K < Low) OR (K > Hi)) then begin
            WriteLn ('wrong set inclusion in add range');
            Halt;
            end;
         if (NOT (K IN Set1)) AND ((K >= Low) AND (K <= Hi)) then begin
            WriteLn ('wrong set exclusion in add range');
            Halt;
            end;
      end;
   end;

   for L := 1 TO LVal DO begin
      Set1 := [];
      Set2 := [];

      for K := 1 TO 10 DO begin
         Low := Random (256);
         Hi  := Random (256);
         Set2:= Set1 + [Low..Hi];
{$ifdef FPC_HAS_SET_INEQUALITIES }
         if (Set1 >= Set2) AND (Set1 <> Set2) then begin
{$else FPC_HAS_SET_INEQUALITIES }
         if (Set1 <> Set2) then begin
{$endif FPC_HAS_SET_INEQUALITIES }
            WriteLn ('error in relational operators 2');
            Halt;
            end;
{$ifdef FPC_HAS_SET_INEQUALITIES }
         if NOT (Set1 <= Set2) then begin
            WriteLn ('error in relational operators 3');
            Halt;
            end;
{$endif FPC_HAS_SET_INEQUALITIES }
         Set1 := Set2;

      end;
   end;

   for L := 1 TO LVal DO begin
      Set1 := [];
      for K := 1 TO 10 DO begin
         Low := Random (256);
         Hi  := Random (256);
         Set1:= Set1 + [Low..Hi];
      end;
      Set2 := [];
      for K := 1 TO 10 DO begin
         Low := Random (256);
         Hi  := Random (256);
         Set2:= Set2 + [Low..Hi];
      end;

      OneWOTwo := Set1 - Set2;
      TwoWOOne := Set2 - Set1;
      InterSet := Set1 * Set2;
      UnionSet := Set1 + Set2;

      if InterSet <> (Set2 * Set1) then begin
         WriteLn ('error in set difference');
         Halt;
         end;

      if (InterSet + OneWOTwo) <> Set1 then begin
         WriteLn ('error in set difference or intersection');
         Halt;
         end;

      if (InterSet + TwoWOOne) <> Set2 then begin
         WriteLn ('error in set difference or intersection');
         Halt;
         end;

      if (OneWOTwo + TwoWOOne + InterSet) <> UnionSet then begin
         WriteLn ('error in set union, intersection or difference');
         Halt;
         end;

   end;
  Start:=MSTimer-Start;
  WriteLn('Set test completes in ',Start,' ms');
end.

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