fpc/tests/test/tobjc12.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

27 lines
517 B
ObjectPascal

{ %target=darwin }
{ %cpu=powerpc,powerpc64,i386,x86_64,arm,aarch64 }
{ Written by Jonas Maebe in 2009, released into the public domain }
{$mode objfpc}
{$modeswitch objectivec1}
var
a: NSObject;
b: pobjc_class;
c: pobjc_class;
d: pobjc_class;
begin
a:=NSObject(NSObject(NSObject.alloc).init);
b:=a._class;
c:=NSObject.classClass;
d:=a.classClass;
if (b<>c) or
(b<>d) then
begin
writeln('error: NSObject.Class <> NSObjectInstance.Class');
halt(1);
end;
a.release;
end.