summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwati Sharma <itawswati@gmail.com>2012-07-25 08:49:16 +0000
committerSwati Sharma <itawswati@gmail.com>2012-07-25 08:49:16 +0000
commit619cb205ce0d41eaf3869c467cff4de7118c710e (patch)
tree9e54fb1fe139e166f809d79ae9f7a6b4d48d1468
parente779d1ecb2cab9d4d9ee4b2f5287c680f84e8e9c (diff)
downloadswig-619cb205ce0d41eaf3869c467cff4de7118c710e.tar.gz
Changes in testcases with respect to the Refactored Objective C module code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-objc@13398 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r--Examples/test-suite/objc/argout_runme.m24
-rw-r--r--Examples/test-suite/objc/char_constant_runme.m8
-rw-r--r--Examples/test-suite/objc/integers_runme.m20
-rw-r--r--Examples/test-suite/objc/ret_by_value_runme.m4
-rw-r--r--Examples/test-suite/objc/template_inherit_runme.m12
-rw-r--r--Examples/test-suite/objc/template_ns4_runme.m5
-rw-r--r--Examples/test-suite/objc/typedef_inherit_runme.m8
-rw-r--r--Examples/test-suite/objc/typemap_ns_using_runme.m2
8 files changed, 42 insertions, 41 deletions
diff --git a/Examples/test-suite/objc/argout_runme.m b/Examples/test-suite/objc/argout_runme.m
index e8e9d0193..dd35be674 100644
--- a/Examples/test-suite/objc/argout_runme.m
+++ b/Examples/test-suite/objc/argout_runme.m
@@ -4,21 +4,21 @@
int main(int argc,char* argv[])
{
NSAutoreleasePool *pool=[[NSAutoreleasePool alloc]init];
-SWIGTYPE_p_int *int1=copy_intp(42);
-assert(incp(int1) == 42);
-assert(intp_value(int1) ==43);
+int *int1=ObjcCopy_intp(42);
+assert(ObjcIncp(int1) == 42);
+assert(ObjcIntp_value(int1) ==43);
-SWIGTYPE_p_int *int2=copy_intp(2);
-assert(incp(int2) == 2);
-assert(intp_value(int2) ==3);
+int *int2=ObjcCopy_intp(2);
+assert(ObjcIncp(int2) == 2);
+assert(ObjcIntp_value(int2) ==3);
-SWIGTYPE_p_int *int3=copy_intp(7);
-assert(incp(int3) == 7);
-assert(intp_value(int3) ==8);
+int *int3=ObjcCopy_intp(7);
+assert(ObjcIncp(int3) == 7);
+assert(ObjcIntp_value(int3) ==8);
-SWIGTYPE_p_int *int4=copy_intp(4);
-assert(incp(int4) == 4);
-assert(intp_value(int4) ==5);
+int *int4=ObjcCopy_intp(4);
+assert(ObjcIncp(int4) == 4);
+assert(ObjcIntp_value(int4) ==5);
[pool drain];
return 0;
diff --git a/Examples/test-suite/objc/char_constant_runme.m b/Examples/test-suite/objc/char_constant_runme.m
index a2bc8d9a9..9cddbb4d5 100644
--- a/Examples/test-suite/objc/char_constant_runme.m
+++ b/Examples/test-suite/objc/char_constant_runme.m
@@ -4,12 +4,12 @@ int main(int argc,char *argv[ ])
{
NSAutoreleasePool *pool=[[NSAutoreleasePool alloc]init];
assert(CHAR_CONSTANT =='x');
- assert(STRING_CONSTANT =="xyzzy");
- assert(ESC_CONST =='\001');
- assert(NULL_CONST =='\000');
+ assert([STRING_CONSTANT isEqualToString:@"xyzzy"]);
+ assert(ESC_CONST =='\1');
+ assert(NULL_CONST =='\0');
assert(SPECIALCHAR =='\341');
[pool drain];
return 0;
-} \ No newline at end of file
+}
diff --git a/Examples/test-suite/objc/integers_runme.m b/Examples/test-suite/objc/integers_runme.m
index 1478975b5..b3d156502 100644
--- a/Examples/test-suite/objc/integers_runme.m
+++ b/Examples/test-suite/objc/integers_runme.m
@@ -5,16 +5,16 @@ int main(int argc,char* argv[])
{
NSAutoreleasePool *pool=[[NSAutoreleasePool alloc]init];
-assert(signed_char_identity(-3) == -3);
-assert(unsigned_char_identity(5) == 5);
-assert(signed_short_identity(-3) == -3);
-assert(unsigned_short_identity(5) == 5);
-assert(signed_int_identity(-3) == -3);
-assert(unsigned_int_identity(5) == 5);
-assert(signed_long_identity(-3) == -3);
-assert(unsigned_long_identity(5) == 5);
-assert(signed_long_long_identity(-3) == -3);
-assert(unsigned_long_long_identity(5) == 5);
+assert(ObjcSigned_char_identity(-3) == -3);
+assert(ObjcUnsigned_char_identity(5) == 5);
+assert(ObjcSigned_short_identity(-3) == -3);
+assert(ObjcUnsigned_short_identity(5) == 5);
+assert(ObjcSigned_int_identity(-3) == -3);
+assert(ObjcUnsigned_int_identity(5) == 5);
+assert(ObjcSigned_long_identity(-3) == -3);
+assert(ObjcUnsigned_long_identity(5) == 5);
+assert(ObjcSigned_long_long_identity(-3) == -3);
+assert(ObjcUnsigned_long_long_identity(5) == 5);
[pool drain];
return 0;
diff --git a/Examples/test-suite/objc/ret_by_value_runme.m b/Examples/test-suite/objc/ret_by_value_runme.m
index dcdf6c57c..8573c75bc 100644
--- a/Examples/test-suite/objc/ret_by_value_runme.m
+++ b/Examples/test-suite/objc/ret_by_value_runme.m
@@ -4,7 +4,7 @@ int main(int argc ,char *argv [ ])
{
NSAutoreleasePool *pool =[[NSAutoreleasePool alloc]init];
test *t =[[test alloc]init];
-t=get_test();
+t=ObjcGet_test();
if([t getMyInt ] != 100)
NSLog(@"Runtime Test Failed");
@@ -13,4 +13,4 @@ NSLog(@"Runtime Test Failed");
[pool drain];
return 0;
-} \ No newline at end of file
+}
diff --git a/Examples/test-suite/objc/template_inherit_runme.m b/Examples/test-suite/objc/template_inherit_runme.m
index c16dbc537..43917b2e5 100644
--- a/Examples/test-suite/objc/template_inherit_runme.m
+++ b/Examples/test-suite/objc/template_inherit_runme.m
@@ -37,22 +37,22 @@ assert([t isEqualToString:@"foomethod"]);
t=[f foomethod];
assert([t isEqualToString:@"foomethod"]);
-t=invoke_blah_int(a);
+t=ObjcInvoke_blah_int(a);
assert([t isEqualToString:@"Foo"]);
-t=invoke_blah_int(c);
+t=ObjcInvoke_blah_int(c);
assert([t isEqualToString:@"Bar"]);
-t=invoke_blah_double(b);
+t=ObjcInvoke_blah_double(b);
assert([t isEqualToString:@"Foo"]);
-t=invoke_blah_double(d);
+t=ObjcInvoke_blah_double(d);
assert([t isEqualToString:@"Bar"]);
-t=invoke_blah_uint(e);
+t=ObjcInvoke_blah_uint(e);
assert([t isEqualToString:@"Foo"]);
-t=invoke_blah_uint(f);
+t=ObjcInvoke_blah_uint(f);
assert([t isEqualToString:@"Bar"]);
[a release];
diff --git a/Examples/test-suite/objc/template_ns4_runme.m b/Examples/test-suite/objc/template_ns4_runme.m
index 5578da0f4..e4d6fbbdd 100644
--- a/Examples/test-suite/objc/template_ns4_runme.m
+++ b/Examples/test-suite/objc/template_ns4_runme.m
@@ -5,9 +5,10 @@ int main(int argc, char* argv[])
{
NSAutoreleasePool *pool =[[NSAutoreleasePool alloc]init];
ArithFunction_DD *ad =[[ArithFunction_DD alloc]init];
-ad =make_Class_DD();
+ad =ObjcMake_Class_DD();
NSString *t =[ad test];
assert([t isEqualToString:@"test"]);
[ad release];
+
return 0;
-} \ No newline at end of file
+}
diff --git a/Examples/test-suite/objc/typedef_inherit_runme.m b/Examples/test-suite/objc/typedef_inherit_runme.m
index 0a332bb2e..21a4f9504 100644
--- a/Examples/test-suite/objc/typedef_inherit_runme.m
+++ b/Examples/test-suite/objc/typedef_inherit_runme.m
@@ -6,19 +6,19 @@ int main(int argc, char * argv[])
NSAutoreleasePool * pool =[[NSAutoreleasePool alloc]init];
Foo *foo =[[Foo alloc]init];
Bar *bar=[[Bar alloc]init];
-NSString *t=do_blah(foo);
+NSString *t=ObjcDo_blah(foo);
assert([t isEqualToString:@"Foo::blah"]);
-t=do_blah(bar);
+t=ObjcDo_blah(bar);
assert([t isEqualToString:@"Bar::blah"]);
Spam *spam=[[Spam alloc]init];
Grok *grok=[[Grok alloc]init];
-t=do_blah2(spam);
+t=ObjcDo_blah2(spam);
assert([t isEqualToString:@"Spam::blah"]);
-t=do_blah2(grok);
+t=ObjcDo_blah2(grok);
assert([t isEqualToString:@"Grok::blah"]);
[foo release];
diff --git a/Examples/test-suite/objc/typemap_ns_using_runme.m b/Examples/test-suite/objc/typemap_ns_using_runme.m
index f3e52fd4d..74e0a80ad 100644
--- a/Examples/test-suite/objc/typemap_ns_using_runme.m
+++ b/Examples/test-suite/objc/typemap_ns_using_runme.m
@@ -6,7 +6,7 @@ int main(int argc,char* argv[])
NSAutoreleasePool *pool=[[NSAutoreleasePool alloc]init];
_FooImpl *fmpl=[[_FooImpl alloc]init];
assert([fmpl isMemberOfClass: [_FooImpl class]] == YES);
-assert(spam(3) ==3);
+assert(ObjcSpam(3) ==3);
[pool drain];
return 0;
}