GH-Unit for unit testing Objective-C code, why am I getting linking errors?

前端 未结 3 1354
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-19 02:57

I\'m trying to dive into the quite frankly terrible world of unit testing using Xcode (such a convoluted process it seems.)

Basically I have this test class, attempt

3条回答
  •  野的像风
    2021-01-19 03:16

    If the target you are testing is an application, you'll need to manually include the Show.h/m files in both your main target and your test target.

    I also updated the README to reflect this:

    • If your main target is a library: Add a linked library, and select your main target; This is so you can link your test target against your main target, and then you don't have to manually include source files in both targets.
    • If your main target is an application, you will need to include these source files in the Test project manually.

    Sorry for the confusion! Having to include files in both targets is not ideal.

提交回复
热议问题