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

t_id 1027
t_adddate 2003/10/14
Flag t_graph set
t_result 0
t_knownrunerror 0

Detailed test run results:

Record count: 50

Total = 50

OK=0 Percentage= 0.00

Skipped=50 Percentage= 100.00

Result type Cat. Count Percentage First date Last Date
Skipping test because it uses graph 50 100.0 2024/05/21 09:12:00 85 2024/05/21 19:57:00 75
i386 2 4.0 2024/05/21 10:44:00 75 2024/05/21 11:28:00 79
powerpc 12 24.0 2024/05/21 18:58:00 44 2024/05/21 19:57:00 75
x86_64 1 2.0 2024/05/21 09:12:00 85 2024/05/21 09:12:00 85
powerpc64 14 28.0 2024/05/21 17:32:00 71 2024/05/21 18:38:00 103
aarch64 21 42.0 2024/05/21 09:57:00 38 2024/05/21 17:55:00 56
linux 36 72.0 2024/05/21 09:12:00 85 2024/05/21 19:57:00 75
go32v2 2 4.0 2024/05/21 10:44:00 75 2024/05/21 11:28:00 79
darwin 12 24.0 2024/05/21 16:23:00 32 2024/05/21 17:55:00 56
3.3.1 3 6.0 2024/05/21 09:12:00 85 2024/05/21 11:28:00 79
3.2.3 47 94.0 2024/05/21 09:57:00 38 2024/05/21 19:57:00 75

Source:

{ %GRAPH }
{ %TARGET=go32v2,win32,linux }

{ Old file: tbs0051.pp }
{  Graph, shows a problem with putpixel                 OK 0.99.9 (PM) }

{$ifdef go32v2}
  {define has_colors_equal}
{$endif go32v2}

uses  crt,graph;

{$ifndef has_colors_equal}
  function ColorsEqual(c1, c2 : longint) : boolean;
    begin
       ColorsEqual:=((GetMaxColor=$FF) and ((c1 and $FF)=(c2 and $FF))) or
         ((GetMaxColor=$7FFF) and ((c1 and $F8F8F8)=(c2 and $F8F8F8))) or
         ((GetMaxColor=$FFFF) and ((c1 and $F8FCF8)=(c2 and $F8FCF8))) or
         ((GetMaxColor>$10000) and ((c1 and $FFFFFF)=(c2 and $FFFFFF)));
    end;

{$endif not has_colors_equal}

var   gd,gm,gError,yi,i : integer;
      col: longint;
      error : word;

BEGIN
  if paramcount=0 then
    gm:=$111   {640x480/64K  HiColor}
  else
    begin
       val(paramstr(1),gm,error);
       if error<>0 then
         gm:=$111;
    end;
  gd:=detect;

  InitGraph(gd,gm,'');
  gError := graphResult;
  IF gError <> grOk
  THEN begin
    writeln ('graphDriver=',gd,'  graphMode=',gm,
    #13#10'Graphics error: ',gError);
    halt(1);
  end;

  for i := 0 to 255
  do begin
    { new grpah unit used word type for colors }
    col := {i shl 16 + }(i) shl 8 + (i div 2);
    for yi := 0 to 20 do
      PutPixel (i,yi,col);
    SetColor (col);
    Line (i,22,i,42);
  end;

  for i:=0 to 255 do
   if not ColorsEqual(getpixel(i,15),getpixel(i,30)) then
     Halt(1);
  {readkey;}delay(1000);

  closegraph;
END.

Link to SVN view of tbs/tb0045.pp source.