Fixed unit tests

This commit is contained in:
Michael Schimmel
2025-09-29 12:18:44 +02:00
parent 2b34046efc
commit 18904f17d1
4 changed files with 97 additions and 38 deletions
+16
View File
@@ -53,6 +53,8 @@ type
class operator Initialize(out Dest: TDataValue);
class function Void: TDataValue; inline; static;
class operator Implicit(const AValue: Int64): TDataValue; overload; inline;
class operator Implicit(const AValue: Double): TDataValue; overload; inline;
class operator Implicit(const AValue: TScalar): TDataValue; overload; inline;
class operator Implicit(const AValue: TDataValue): TScalar; overload; inline;
class operator Implicit(const AValue: String): TDataValue; overload; inline;
@@ -479,6 +481,20 @@ begin
Result := AValue.AsScalar;
end;
class operator TDataValue.Implicit(const AValue: Int64): TDataValue;
begin
Result.FKind := Ord(vkScalar);
Result.FScalar := TScalar.FromInt64(AValue);
Result.FInterface := nil;
end;
class operator TDataValue.Implicit(const AValue: Double): TDataValue;
begin
Result.FKind := Ord(vkScalar);
Result.FScalar := TScalar.FromDouble(AValue);
Result.FInterface := nil;
end;
{ TDataValueKindHelper }
function TDataValueKindHelper.ToString: string;