fpc/tests/test/tobjc37.pp
Jonas Maebe c6daaa28d0 * enable all Objective-C tests for Darwin/AArch64
git-svn-id: trunk@29945 -
2015-02-23 22:54:24 +00:00

50 lines
675 B
ObjectPascal

{ %target=darwin }
{ %cpu=powerpc,powerpc64,i386,x86_64,arm,aarch64 }
{ %norun }
{ Written by Jonas Maebe in 2010, released into the public domain }
{$mode objfpc}
{$modeswitch objectivec1}
unit tobjc37;
interface
uses
CocoaAll;
type
MyWindow = objcclass(NSWindow)
procedure awakeFromNib; override;
end;
implementation
type
MyView = objcclass(NSView)
procedure awakeFromNib; override;
end;
procedure MyWindow.awakeFromNib;
begin
end;
procedure MyView.awakeFromNib;
begin
end;
procedure test;
var
w: mywindow;
v: myview;
begin
w:=mywindow.alloc.init;
w.awakefromnib;
w.release;
v:=myview.alloc.init;
v.awakefromnib;
v.release;
end;
end.