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

t_id 185
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/05/17 13:34:00 47 2024/05/17 23:42:00 0
i386 17 34.0 2024/05/17 22:07:00 21 2024/05/17 23:41:00 0
sparc 14 28.0 2024/05/17 23:24:00 38 2024/05/17 23:42:00 0
powerpc 1 2.0 2024/05/17 21:13:00 42 2024/05/17 21:13:00 42
x86_64 2 4.0 2024/05/17 13:34:00 47 2024/05/17 14:42:00 39
powerpc64 13 26.0 2024/05/17 20:12:00 105 2024/05/17 20:54:00 132
aarch64 3 6.0 2024/05/17 16:15:00 32 2024/05/17 16:28:00 32
linux 14 28.0 2024/05/17 20:12:00 105 2024/05/17 21:13:00 42
win32 5 10.0 2024/05/17 22:07:00 21 2024/05/17 23:41:00 0
solaris 26 52.0 2024/05/17 23:23:00 25 2024/05/17 23:42:00 0
darwin 3 6.0 2024/05/17 16:15:00 32 2024/05/17 16:28:00 32
win64 2 4.0 2024/05/17 13:34:00 47 2024/05/17 14:42:00 39
3.3.1 40 80.0 2024/05/17 13:34:00 47 2024/05/17 23:42:00 0
3.2.3 10 20.0 2024/05/17 16:15:00 32 2024/05/17 23:41:00 0

Source:

{
  this file checks that calling done from init is
  done correctly
}


program test_init_done;


type
   pobject = ^tobject;
   tobject = object
     val : longint;
     constructor init (call_done : boolean);
     destructor done; virtual;
     procedure check;
   end;


constructor tobject.init (call_done : boolean);
  begin
    val:=7;
    if call_done then
      begin
        done;
        fail;
      end;
  end;

destructor tobject.done;
  begin
    check;
  end;

procedure tobject.check;
  begin
    if val<>7 then
      begin
        writeln('Error in codegeneration');
        halt(1);
      end;
  end;

var
  obj1 : tobject;
  obj2 : pobject;

begin
  obj1.init(false);
  obj1.done;

  new(obj2,init(true));
  if assigned(obj2) then
      begin
        writeln('Error in codegeneration of fail');
        halt(1);
      end;
end.

Link to SVN view of test/cg/tinitdon.pp source.