Skip to content

Commit

Permalink
fix lazarus support in test
Browse files Browse the repository at this point in the history
  • Loading branch information
turborium committed Nov 11, 2023
1 parent 27686ab commit 07c0158
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Pascal/Test/MainUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,11 @@ procedure DoRunTests();
Writeln('Bad -dll param!');
exit;
end;
{$IFDEF FPC}
dll_pure_parse_float_library := LoadLibrary(PAnsiChar(AnsiString(DllName)));
{$ELSE}
dll_pure_parse_float_library := LoadLibrary(PWideChar(DllName));
{$ENDIF}
if pure_parse_float_library = 0 then
begin
Writeln('Can''t open "' + DllName + '" dll!');
Expand All @@ -882,7 +886,11 @@ procedure DoRunTests();
Writeln('Bad -function param!');
exit;
end;
{$IFDEF FPC}
@dll_pure_parse_float := GetProcAddress(dll_pure_parse_float_library, PAnsiChar(AnsiString(DllFunctionName)));
{$ELSE}
@dll_pure_parse_float := GetProcAddress(dll_pure_parse_float_library, PWideChar(DllFunctionName));
{$ENDIF}
if @dll_pure_parse_float = nil then
begin
Writeln('Can''t load function "' + DllFunctionName + '" from dll!');
Expand Down

0 comments on commit 07c0158

Please sign in to comment.