I am working on unit tests. The original project was written in Objective-C.
I created a new test target written in Swift.
How can I call the Objective-C class of the actual application in a test file?
I tried to do the following.
@testable import MyModule
However, it seems to work only if all the files are in Swift, which is not suitable for me.
I tried several other things with project settings, but none of them worked.
Did I miss something obviously obvious?
class MyTests: XCTestCase {
override func setUp() {
super.setUp()
}
override func tearDown() {
super.tearDown()
}
func testExample() {
let vc = HomeViewController()
}
}
prawn source
share