1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
{ @abstract(Testing of parsing and making docs for records with case parts.)
It does not pass properly yet:
@orderedList(
@item(Types for fields in record case are not printed
(because parser does not set their FullDeclaration properties).)
@item(Also, CaseTwoB field has no description (but it should have
"Description of CaseTwoA and CaseTwoB"))
)
Update 2005-10-17: now this test passes OK, both problems above
are solved.
}
unit ok_record_with_case;
interface
type
TMyRecord1 = record
{ Description of NormalField }
NormalField: Integer;
{ Description of CaseDecision }
case CaseDecision: boolean of
false: (
{ Description of CaseOneSingle }
CaseOneSingle: Single);
true: (
{ Description of CaseTwoSingle }
CaseTwoSingle: Single;
{ Description of CaseTwoInt }
CaseTwoInt: Integer;
{ Description of CaseTwoA and CaseTwoB }
CaseTwoA, CaseTwoB: Integer);
end;
TMyRecord2 = record
{ Description of NormalField }
NormalField: Integer;
case boolean of
false: (
{ Description of CaseOneSingle }
CaseOneSingle: Single);
true: (
{ Description of CaseTwoSingle }
CaseTwoSingle: Single;
{ Description of CaseTwoInt }
CaseTwoInt: Integer;
{ Description of CaseTwoA and CaseTwoB }
CaseTwoA, CaseTwoB: Integer);
end;
implementation
end.
|