When do app sources need to be included in test targets?

前端 未结 7 1622
别那么骄傲
别那么骄傲 2020-12-02 05:30

In a new project I have this simple test

#import 
#import \"ViewController.h\"

@interface ViewControllerTests : XCTestCase
@end

@imp         


        
7条回答
  •  庸人自扰
    2020-12-02 05:47

    For me it was just a case of having no test targets added for the Scheme.

    For the app target go to Edit Scheme, then click Test on the right hand side then add a test target with the + button at the bottom:

提交回复
热议问题