Can't import main swift classes into test target?

后端 未结 4 1006
半阙折子戏
半阙折子戏 2020-12-28 17:47

I am trying to test the classes in my iOS app. I am trying to import the target Pickle in my app that has all my classes into my testing target PickleTest

4条回答
  •  执笔经年
    2020-12-28 18:26

    FWIW, on Xcode 7, import with the annotation: @testable. Example:

    import Pickle
    @ImportTests
    

    Then you'll be able to see the classes in code completion and compiling. source: https://www.natashatherobot.com/swift-2-xcode-7-unit-testing-access/

提交回复
热议问题