fcl-db: tests: use built-in function BytesOf() instead uf own implementation.

git-svn-id: trunk@39338 -
This commit is contained in:
lacak 2018-06-29 06:57:57 +00:00
parent e9e9a26133
commit c73e831633
2 changed files with 2 additions and 11 deletions
packages/fcl-db/tests

View File

@ -1625,11 +1625,11 @@ begin
ftBytes : if cross then
Params.ParamByName('field1').Value := StringToByteArray(testBytesValues[i])
else
Params.ParamByName('field1').AsBytes := StringToBytes(testBytesValues[i]);
Params.ParamByName('field1').AsBytes := BytesOf(testBytesValues[i]);
ftVarBytes: if cross then
Params.ParamByName('field1').AsString := testBytesValues[i]
else
Params.ParamByName('field1').AsBytes := StringToBytes(testBytesValues[i]);
Params.ParamByName('field1').AsBytes := BytesOf(testBytesValues[i]);
else
AssertTrue('no test for paramtype available',False);
end;

View File

@ -241,7 +241,6 @@ procedure FreeDBConnector;
function DateTimeToTimeString(d: tdatetime) : string;
function TimeStringToDateTime(d: String): TDateTime;
function StringToByteArray(const s: ansistring): Variant;
function StringToBytes(const s: ansistring): TBytes;
implementation
@ -638,14 +637,6 @@ begin
end;
end;
function StringToBytes(const s: ansistring): TBytes;
var Len: integer;
begin
Len := Length(s) * SizeOf(AnsiChar);
SetLength(Result, Len);
Move(s[1], Result[0], Len);
end;
initialization
ReadIniFile;