From: <ita...@us...> - 2012-06-17 05:53:35
|
Revision: 13171 http://swig.svn.sourceforge.net/swig/?rev=13171&view=rev Author: itawswati Date: 2012-06-17 05:53:29 +0000 (Sun, 17 Jun 2012) Log Message: ----------- Added some more testcases to test Objective C functionality. Added Paths: ----------- branches/gsoc2012-objc/Examples/test-suite/objc/inherit_runme.m branches/gsoc2012-objc/Examples/test-suite/objc/virtual_derivation_runme.m branches/gsoc2012-objc/Examples/test-suite/objc/voidtest_runme.m Added: branches/gsoc2012-objc/Examples/test-suite/objc/inherit_runme.m =================================================================== --- branches/gsoc2012-objc/Examples/test-suite/objc/inherit_runme.m (rev 0) +++ branches/gsoc2012-objc/Examples/test-suite/objc/inherit_runme.m 2012-06-17 05:53:29 UTC (rev 13171) @@ -0,0 +1,11 @@ +#import "inherit_proxy.h" +#import<Foundation/Foundation.h> +int main(int argc,char * argv[ ]) +{ +NSAutoreleasePool *pool =[[NSAutoreleasePool alloc] init]; +CBase *cb =[[CBase alloc] init]; +NSLog(@"The foo is %@",[cb Foo]); +[pool release]; +return 0; +} + Added: branches/gsoc2012-objc/Examples/test-suite/objc/virtual_derivation_runme.m =================================================================== --- branches/gsoc2012-objc/Examples/test-suite/objc/virtual_derivation_runme.m (rev 0) +++ branches/gsoc2012-objc/Examples/test-suite/objc/virtual_derivation_runme.m 2012-06-17 05:53:29 UTC (rev 13171) @@ -0,0 +1,15 @@ +#import "virtual_derivation_proxy.h" +#import <assert.h> +int main(int argc,char* argv[]) +{ +NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init]; +A *a =[[A alloc]initWithA:5]; +B *b =[[B alloc]initWithA:5]; +assert ([b get_a] != [b get_b]); +NSLog(@"Something Wrong"); + +[a release]; +[b release]; +[pool drain]; +return 0; +} \ No newline at end of file Added: branches/gsoc2012-objc/Examples/test-suite/objc/voidtest_runme.m =================================================================== --- branches/gsoc2012-objc/Examples/test-suite/objc/voidtest_runme.m (rev 0) +++ branches/gsoc2012-objc/Examples/test-suite/objc/voidtest_runme.m 2012-06-17 05:53:29 UTC (rev 13171) @@ -0,0 +1,13 @@ +#import "voidtest_proxy.h" +int main (int argc,char *argv[ ]) +{ +NSAutoreleasePool *pool=[[NSAutoreleasePool alloc]init]; +Foo *foo=[[Foo alloc]init]; +[foo memberfunc]; +[Foo staticmemberfunc];//foo will result in error because staticmemeberfunc is a static member +void *v2=vfunc2(foo); +Foo *v3 =vfunc3(v2); +[foo release]; +[pool drain]; +return 0; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |