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/21 01:22:00 34 2024/05/21 03:31:00 0
i386 9 18.0 2024/05/21 01:22:00 34 2024/05/21 03:02:00 25
x86_64 36 72.0 2024/05/21 01:33:00 15 2024/05/21 03:31:00 0
aarch64 5 10.0 2024/05/21 01:42:00 32 2024/05/21 03:08:00 37
linux 40 80.0 2024/05/21 01:22:00 34 2024/05/21 03:20:00 18
win32 1 2.0 2024/05/21 03:02:00 25 2024/05/21 03:02:00 25
solaris 9 18.0 2024/05/21 03:08:00 30 2024/05/21 03:31:00 0
3.3.1 34 68.0 2024/05/21 01:33:00 15 2024/05/21 03:31:00 0
3.2.3 16 32.0 2024/05/21 01:22:00 34 2024/05/21 03:19:00 27

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.