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

t_id 1380
t_version 1.1
t_adddate 2004/10/24
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 07:29:00 50 2024/10/19 13:34:00 29
i386 6 12.0 2024/10/19 08:55:00 60 2024/10/19 11:13:00 63
m68k 3 6.0 2024/10/19 07:29:00 50 2024/10/19 10:22:00 40
sparc 2 4.0 2024/10/19 08:16:00 54 2024/10/19 11:16:00 40
powerpc 7 14.0 2024/10/19 08:14:00 49 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 8 16.0 2024/10/19 07:37:00 16 2024/10/19 13:34:00 29
powerpc64 7 14.0 2024/10/19 08:43:00 65 2024/10/19 11:23:00 69
mips 2 4.0 2024/10/19 08:18:00 121 2024/10/19 09:54:00 35
mipsel 1 2.0 2024/10/19 10:35:00 142 2024/10/19 10:35:00 142
aarch64 5 10.0 2024/10/19 07:45:00 32 2024/10/19 09:32:00 28
sparc64 4 8.0 2024/10/19 08:23:00 137 2024/10/19 10:46:00 141
riscv64 1 2.0 2024/10/19 11:10:00 26 2024/10/19 11:10:00 26
loongarch64 2 4.0 2024/10/19 09:45:00 25 2024/10/19 10:17:00 30
linux 34 68.0 2024/10/19 07:29:00 50 2024/10/19 11:38:00 25
go32v2 4 8.0 2024/10/19 08:55:00 60 2024/10/19 11:13:00 63
solaris 4 8.0 2024/10/19 13:22:00 24 2024/10/19 13:34:00 29
darwin 1 2.0 2024/10/19 07:45:00 32 2024/10/19 07:45:00 32
aix 7 14.0 2024/10/19 08:14:00 49 2024/10/19 13:26:00 65
3.3.1 28 56.0 2024/10/19 07:37:00 16 2024/10/19 13:26:00 65
3.2.3 22 44.0 2024/10/19 07:29:00 50 2024/10/19 13:34:00 29

Source:

{ %version=1.1 }

{$mode objfpc}

uses
  classes;

type

{$M+}
  TTestCaseTest = class(TObject)
  published
    procedure TestSetUp;
    procedure TestAsString;
  end;

procedure TTestCaseTest.TestSetup;
begin
  writeln('TestSetup');
end;

procedure TTestCaseTest.TestAsString;
begin
  writeln('TestAsString');
end;

function GetMethodNameTableAddress(AClass: TClass): Pointer;
type
  TMethodNameRec = packed record
    name : pshortstring;
    addr : pointer;
  end;

  TMethodNameTable = packed record
    count : dword;
    entries : packed array[0..0] of TMethodNameRec;
  end;

  pMethodNameTable =  ^TMethodNameTable;

var
  methodTable : pMethodNameTable;
  vmt: TClass;
begin
  vmt := aClass;
  if assigned(vmt) then
  begin
    methodTable := pMethodNameTable((Pointer(vmt) + vmtMethodTable)^);
    Result := methodTable;
  end;
end;

begin
  writeln('Address of TestSetUp : ',ptrint(TTestCaseTest.MethodAddress('TestSetUp')));
  writeln('Address of TestAsString : ',ptrint(TTestCaseTest.MethodAddress('TestAsString')));
  if not (Assigned(GetMethodNameTableAddress(TTestCaseTest))) then
    halt(1);
end.

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