mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:49:33 +02:00
+ Added more tests of getprops
This commit is contained in:
parent
cdcaec93df
commit
ef9fe8db1c
@ -348,19 +348,28 @@ begin
|
||||
begin
|
||||
Write ('(Examining ',name,' : Type : ',TypeNames[PropType^.Kind],', ');
|
||||
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
|
||||
Write (', Value : ');
|
||||
Flush(output);
|
||||
Write(GetFloatProp(O,pri))
|
||||
J:=GetOrdProp(O,pri);
|
||||
Write ('Value : ',j);
|
||||
If PropType^.Kind=tkenumeration then
|
||||
Write ('(=',GetEnumName(Proptype,J),')')
|
||||
end
|
||||
}
|
||||
else
|
||||
Write ('Not of type ordinal, bool or float:',ord(pri^.proptype^.kind));
|
||||
Writeln (')');
|
||||
else
|
||||
Case pri^.proptype^.kind of
|
||||
tkfloat : begin
|
||||
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;
|
||||
@ -372,4 +381,4 @@ begin
|
||||
DumpTypeInfo(O);
|
||||
PrintObject(O);
|
||||
testget(o);
|
||||
end.
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user