Index: test/ios/swift/MyObjcTest.m |
diff --git a/test/ios/swift/MyObjcTest.m b/test/ios/swift/MyObjcTest.m |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a8bbe6018e9c8a1bf6802638dc667d1c9c821e32 |
--- /dev/null |
+++ b/test/ios/swift/MyObjcTest.m |
@@ -0,0 +1,26 @@ |
+@import XCTest; |
+ |
+#import "MyObjcClass.h" |
+ |
+@interface MyObjcTest : XCTestCase |
+ |
+@end |
+ |
+@implementation MyObjcTest |
+ |
+- (void)testObjc { |
+ MyObjcClass* obj = [[MyObjcClass alloc] init]; |
+ XCTAssert(obj.intField == 0); |
+} |
+ |
+ |
+// Xcode fails to import ObjC code from modules which are not frameworks. |
+/* |
+@import swift_ios |
+- (void)testSwift { |
+ MySwiftClass* obj = [[MySwiftClass alloc] init]; |
+ XCTAssert(obj.intField == 0); |
+} |
+*/ |
+ |
+@end |