mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 22:09:32 +02:00
+ Added more tests of getprops
This commit is contained in:
parent
cdcaec93df
commit
ef9fe8db1c
@ -348,19 +348,28 @@ begin
|
|||||||
begin
|
begin
|
||||||
Write ('(Examining ',name,' : Type : ',TypeNames[PropType^.Kind],', ');
|
Write ('(Examining ',name,' : Type : ',TypeNames[PropType^.Kind],', ');
|
||||||
If (Proptype^.kind in Ordinaltypes) Then
|
If (Proptype^.kind in Ordinaltypes) Then
|
||||||
Write ('Value : ',GetOrdProp(O,pri))
|
|
||||||
{
|
|
||||||
// Skipping the ord() never gives True !!! ???
|
|
||||||
else If ord(pri^.proptype^.kind) = ord(tkfloat) then
|
|
||||||
begin
|
begin
|
||||||
Write (', Value : ');
|
J:=GetOrdProp(O,pri);
|
||||||
Flush(output);
|
Write ('Value : ',j);
|
||||||
Write(GetFloatProp(O,pri))
|
If PropType^.Kind=tkenumeration then
|
||||||
|
Write ('(=',GetEnumName(Proptype,J),')')
|
||||||
end
|
end
|
||||||
}
|
else
|
||||||
else
|
Case pri^.proptype^.kind of
|
||||||
Write ('Not of type ordinal, bool or float:',ord(pri^.proptype^.kind));
|
tkfloat : begin
|
||||||
Writeln (')');
|
Write ('Value : ');
|
||||||
|
Flush(output);
|
||||||
|
Write(GetFloatProp(O,pri))
|
||||||
|
end;
|
||||||
|
tkAstring : begin
|
||||||
|
Write ('value : ');
|
||||||
|
flush (output);
|
||||||
|
Write(GetStrProp(O,Pri));
|
||||||
|
end;
|
||||||
|
else
|
||||||
|
Write ('Untested type:',ord(pri^.proptype^.kind));
|
||||||
|
end;
|
||||||
|
Writeln (')');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -372,4 +381,4 @@ begin
|
|||||||
DumpTypeInfo(O);
|
DumpTypeInfo(O);
|
||||||
PrintObject(O);
|
PrintObject(O);
|
||||||
testget(o);
|
testget(o);
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user