From 9f98e5b586af6c3af81b17a4f6864caaacb937f1 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Fri, 8 Jan 2010 10:03:03 +0100 Subject: Added objective C test --- src/it/it0022-objective-c-executable/pom.xml | 63 ++++++++++++++++++++++ .../src/main/include/Talker.h | 8 +++ .../src/main/objc/Hello.m | 8 +++ .../src/main/objc/Talker.m | 10 ++++ 4 files changed, 89 insertions(+) create mode 100644 src/it/it0022-objective-c-executable/pom.xml create mode 100644 src/it/it0022-objective-c-executable/src/main/include/Talker.h create mode 100644 src/it/it0022-objective-c-executable/src/main/objc/Hello.m create mode 100644 src/it/it0022-objective-c-executable/src/main/objc/Talker.m diff --git a/src/it/it0022-objective-c-executable/pom.xml b/src/it/it0022-objective-c-executable/pom.xml new file mode 100644 index 0000000..b202183 --- /dev/null +++ b/src/it/it0022-objective-c-executable/pom.xml @@ -0,0 +1,63 @@ + + + + + + 4.0.0 + + + org.apache.maven.its.nar + it-parent + 1.0-SNAPSHOT + ../it-parent/pom.xml + + + it0022-objective-c-executable + nar + + Maven NAR Objective C Executable Test + 1.0-SNAPSHOT + + Simple objective c test executable + + http://maven.apache.org/ + + + true + + + + integration-test + + + maven-nar-plugin + true + + + + executable + true + + + + + + + diff --git a/src/it/it0022-objective-c-executable/src/main/include/Talker.h b/src/it/it0022-objective-c-executable/src/main/include/Talker.h new file mode 100644 index 0000000..ead932f --- /dev/null +++ b/src/it/it0022-objective-c-executable/src/main/include/Talker.h @@ -0,0 +1,8 @@ +#import + +@interface Talker : NSObject + +- (void) say: (char*) phrase; + +@end + diff --git a/src/it/it0022-objective-c-executable/src/main/objc/Hello.m b/src/it/it0022-objective-c-executable/src/main/objc/Hello.m new file mode 100644 index 0000000..fe4d5f5 --- /dev/null +++ b/src/it/it0022-objective-c-executable/src/main/objc/Hello.m @@ -0,0 +1,8 @@ +#import "Talker.h" + +int main(void) { + Talker *talker = [[Talker alloc] init]; + [talker say: "Hello World!"]; + [talker release]; +} + diff --git a/src/it/it0022-objective-c-executable/src/main/objc/Talker.m b/src/it/it0022-objective-c-executable/src/main/objc/Talker.m new file mode 100644 index 0000000..cf25ab1 --- /dev/null +++ b/src/it/it0022-objective-c-executable/src/main/objc/Talker.m @@ -0,0 +1,10 @@ +#import "Talker.h" + +@implementation Talker + +- (void) say: (char*) phrase { + printf("%s\n", phrase); +} + +@end + -- cgit v1.2.3