diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2022-06-21 23:01:06 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2022-06-21 23:01:09 +0200 |
| commit | 3bb4d65b2f8d7cbaf1586b85909c7e45f6b5eec2 (patch) | |
| tree | 14f69c2cfe1b591b97070252a4805b57cb544a3c /test/link/macho/objcpp/test.mm | |
| parent | 937464f398241358c7d3e534b179dfbdfdf2ffd9 (diff) | |
| download | zig-3bb4d65b2f8d7cbaf1586b85909c7e45f6b5eec2.tar.gz zig-3bb4d65b2f8d7cbaf1586b85909c7e45f6b5eec2.zip | |
link-tests: move macho tests to subfolder
Handle `-e` option in MachO linker allowing the user to set a custom
entrypoint address.
Diffstat (limited to 'test/link/macho/objcpp/test.mm')
| -rw-r--r-- | test/link/macho/objcpp/test.mm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/link/macho/objcpp/test.mm b/test/link/macho/objcpp/test.mm new file mode 100644 index 0000000000..d27c543cdf --- /dev/null +++ b/test/link/macho/objcpp/test.mm @@ -0,0 +1,14 @@ +#import "Foo.h" +#import <assert.h> +#include <iostream> + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + Foo *foo = [[Foo alloc] init]; + NSString *result = [foo name]; + std::cout << "Hello from C++ and " << [result UTF8String]; + assert([result isEqualToString:@"Zig"]); + return 0; + } +} |
