Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.2.0 / tests / test / tgenfunc7.pp
Size: Mime:
{ generics in another unit work as well }

program tgenfunc7;

{$mode objfpc}

uses
  ugenfunc7;

var
  t: TTest;
begin
  if specialize Add<LongInt>(3, 4) <> 7 then
    Halt(1);
  if specialize Add<String>('Hello', 'World') <> 'HelloWorld' then
    Halt(2);
  if TTest.specialize AddClass<LongInt>(3, 4) <> 7 then
    Halt(3);
  if TTest.specialize AddClass<String>('Hello', 'World') <> 'HelloWorld' then
    Halt(4);
  if t.specialize Add<LongInt>(3, 4) <> 7 then
    Halt(5);
  if t.specialize Add<String>('Hello', 'World') <> 'HelloWorld' then
    Halt(6);
end.