mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 17:49:27 +02:00
* Test for #41002
This commit is contained in:
parent
fe6dd84d01
commit
d486463bc1
@ -52,6 +52,7 @@ Type
|
|||||||
procedure TestMakeGenericWideChar;
|
procedure TestMakeGenericWideChar;
|
||||||
|
|
||||||
procedure TestFromOrdinal;
|
procedure TestFromOrdinal;
|
||||||
|
Procedure TestTryCastUnicodeString;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TTestValueArray }
|
{ TTestValueArray }
|
||||||
@ -1533,6 +1534,17 @@ begin
|
|||||||
CheckException({$ifdef fpc}@{$endif}MakeFromOrdinalString, EInvalidCast);
|
CheckException({$ifdef fpc}@{$endif}MakeFromOrdinalString, EInvalidCast);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTestValueSimple.TestTryCastUnicodeString;
|
||||||
|
|
||||||
|
var
|
||||||
|
S: string;
|
||||||
|
V, V2: TValue;
|
||||||
|
begin
|
||||||
|
S := 'str';
|
||||||
|
V := S;
|
||||||
|
CheckTrue(V.TryCast(TypeInfo(UnicodeString), V2),'Cast OK');
|
||||||
|
end;
|
||||||
|
|
||||||
{ TTestValueArray }
|
{ TTestValueArray }
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user