Unrecognized Selector SenTestCase for Category

前端 未结 4 1789
没有蜡笔的小新
没有蜡笔的小新 2020-12-20 12:50

I created a new Cocoa Touch Static Library project with Unit Testing in XCode 4 and added a category:

// NSString+Inflections.h
@interface NSString (Inflect         


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-20 13:20

    Edit: Be sure to see this answer about unit test not finding files

    +1 For uploading the project. The problem is your test target does not include NSString+Inflections.m in the Build Phases.

    In XCode 4

    1. Click "Poppy" in the top of the Navigator
    2. Select "PoppyTests" under Targets
    3. Go to Build Phases
    4. Expand Compile Sources
    5. Click the + sign and then add NSString+Inflections.m

    You should then get something similar the following output

    TestSuite '/blahblah/PoppyTests.octest(Tests)' finished at 2011-03-28 21:31:34 +0000. Executed 1 test, with 1 failure (0 unexpected) in 0.000 (0.002) seconds

提交回复
热议问题