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

t_id 799
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 02:33:00 24 2024/05/21 06:31:00 0
i386 5 10.0 2024/05/21 03:08:00 33 2024/05/21 06:01:00 28
m68k 2 4.0 2024/05/21 05:47:00 63 2024/05/21 06:07:00 190
powerpc 5 10.0 2024/05/21 06:13:00 42 2024/05/21 06:31:00 0
arm 2 4.0 2024/05/21 05:29:00 69 2024/05/21 05:53:00 67
x86_64 16 32.0 2024/05/21 02:33:00 24 2024/05/21 06:23:00 27
powerpc64 7 14.0 2024/05/21 05:32:00 97 2024/05/21 06:26:00 0
mips 3 6.0 2024/05/21 04:05:00 47 2024/05/21 06:16:00 240
mipsel 1 2.0 2024/05/21 06:23:00 148 2024/05/21 06:23:00 148
aarch64 9 18.0 2024/05/21 05:20:00 46 2024/05/21 06:24:00 23
linux 31 62.0 2024/05/21 02:33:00 24 2024/05/21 06:31:00 0
win32 1 2.0 2024/05/21 06:01:00 28 2024/05/21 06:01:00 28
go32v2 1 2.0 2024/05/21 05:41:00 55 2024/05/21 05:41:00 55
solaris 10 20.0 2024/05/21 05:55:00 29 2024/05/21 06:19:00 29
darwin 7 14.0 2024/05/21 05:42:00 24 2024/05/21 06:24:00 23
3.3.1 19 38.0 2024/05/21 02:33:00 24 2024/05/21 06:24:00 23
3.2.3 31 62.0 2024/05/21 03:08:00 33 2024/05/21 06:31:00 0

Source:

program tw1331;

{$mode objfpc}

uses Classes, SysUtils, TypInfo, uw1331;

type
  DummyEnum1 = (tr1,tr2);
  DummyEnum2 = tr1..tr2;

  DummyClass = class(TPersistent)
  private
    FMyDummyEnum1:DummyEnum1;
    FMyDummyEnum2:DummyEnum2;
    FMyDummyEnum3:DummyEnum3;
    FMyDummyEnum4:DummyEnum4;
  published
    property MyDummyEnum1:DummyEnum1 read FMyDummyEnum1 write FMyDummyEnum1;
    property MyDummyEnum2:DummyEnum2 read FMyDummyEnum2 write FMyDummyEnum2;
    property MyDummyEnum3:DummyEnum3 read FMyDummyEnum3 write FMyDummyEnum3;
    property MyDummyEnum4:DummyEnum4 read FMyDummyEnum4 write FMyDummyEnum4;
  end;

var Dummy1:DummyClass;
    List:PPropList;
    Count,Index,I:integer;
    EnumType:PTypeInfo;

begin
  // create a dummyclass instance
  Dummy1:=DummyClass.Create;
  // get property list
  Count:=GetTypeData(DummyClass.ClassInfo)^.Propcount;
  GetMem(List,Count * SizeOf(Pointer));
  GetPropInfos(DummyClass.ClassInfo,List);
  Index:=Count-1;
  while (Index>=0) do begin
    EnumType:=List^[Index]^.PropType;
    if EnumType^.Kind=tkEnumeration then begin
      // print all enumeration types
      writeln('PropertyName=',EnumType^.Name);
      with GetTypeData(EnumType)^ do
        // write all possible values for this type
        for I := MinValue to MaxValue do
          writeln(I,': ''',GetEnumName(EnumType, I),'''');
    end;
    dec(Index);
  end;
  FreeMem(List);
  Dummy1.Free;
end.

Link to SVN view of webtbs/tw1331.pp source.