mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 22:46:01 +02:00
* added [] crash test for array of byte
* added TObject property test
This commit is contained in:
parent
c791505a38
commit
56c602fc83
@ -31,6 +31,10 @@ Program TestAOC;
|
|||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
procedure testit2 (args: array of byte);
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
Procedure Testit (Args: Array of const);
|
Procedure Testit (Args: Array of const);
|
||||||
|
|
||||||
Var I : longint;
|
Var I : longint;
|
||||||
@ -86,6 +90,7 @@ begin
|
|||||||
S:='Ansistring 1';
|
S:='Ansistring 1';
|
||||||
T:='AnsiString 2';
|
T:='AnsiString 2';
|
||||||
writeln ('Size of VarRec : ',Sizeof(TVarRec));
|
writeln ('Size of VarRec : ',Sizeof(TVarRec));
|
||||||
|
Testit ([]);
|
||||||
Testit ([1,2]);
|
Testit ([1,2]);
|
||||||
Testit (['A','B']);
|
Testit (['A','B']);
|
||||||
Testit ([TRUE,FALSE,TRUE]);
|
Testit ([TRUE,FALSE,TRUE]);
|
||||||
@ -96,4 +101,7 @@ begin
|
|||||||
Testit ([ObjA,ObjB]);
|
Testit ([ObjA,ObjB]);
|
||||||
Testit ([1.234,1.234]);
|
Testit ([1.234,1.234]);
|
||||||
TestIt ([AClass]);
|
TestIt ([AClass]);
|
||||||
|
|
||||||
|
TestIt2 ([]);
|
||||||
|
TestIt2 ([1,2]);
|
||||||
end.
|
end.
|
||||||
|
@ -32,6 +32,7 @@ Type
|
|||||||
FExtended : Extended;
|
FExtended : Extended;
|
||||||
FMyEnum : TMyEnum;
|
FMyEnum : TMyEnum;
|
||||||
FAnsiString : AnsiSTring;
|
FAnsiString : AnsiSTring;
|
||||||
|
FObj : TObject;
|
||||||
FStored : Boolean;
|
FStored : Boolean;
|
||||||
Function GetBoolean : Boolean;
|
Function GetBoolean : Boolean;
|
||||||
Function GetByte : Byte;
|
Function GetByte : Byte;
|
||||||
@ -83,6 +84,7 @@ Type
|
|||||||
Constructor Create;
|
Constructor Create;
|
||||||
Destructor Destroy;override;
|
Destructor Destroy;override;
|
||||||
Published
|
Published
|
||||||
|
Property ObjField: TObject read FObj write FObj;
|
||||||
Property BooleanField : Boolean Read FBoolean Write FBoolean;
|
Property BooleanField : Boolean Read FBoolean Write FBoolean;
|
||||||
Property ByteField : Byte Read FByte Write FByte;
|
Property ByteField : Byte Read FByte Write FByte;
|
||||||
Property CharField : Char Read FChar Write FChar;
|
Property CharField : Char Read FChar Write FChar;
|
||||||
|
Loading…
Reference in New Issue
Block a user