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/08 02:20:00 39 2024/05/08 03:01:00 47
i386 25 50.0 2024/05/08 02:20:00 39 2024/05/08 03:01:00 47
sparc 1 2.0 2024/05/08 02:54:00 38 2024/05/08 02:54:00 38
x86_64 17 34.0 2024/05/08 02:23:00 47 2024/05/08 02:57:00 35
powerpc64 3 6.0 2024/05/08 02:38:00 55 2024/05/08 02:58:00 55
aarch64 4 8.0 2024/05/08 02:23:00 39 2024/05/08 02:51:00 38
linux 47 94.0 2024/05/08 02:20:00 39 2024/05/08 03:01:00 47
go32v2 1 2.0 2024/05/08 02:27:00 56 2024/05/08 02:27:00 56
solaris 1 2.0 2024/05/08 02:54:00 38 2024/05/08 02:54:00 38
win64 1 2.0 2024/05/08 02:23:00 47 2024/05/08 02:23:00 47
3.3.1 19 38.0 2024/05/08 02:21:00 22 2024/05/08 02:53:00 25
3.2.3 31 62.0 2024/05/08 02:20:00 39 2024/05/08 03:01:00 47

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.