代码之家  ›  专栏  ›  技术社区  ›  Matt Baker

ios4.1sdk中的单元测试失败了吗?

  •  11
  • Matt Baker  · 技术社区  · 15 年前

    升级到4.1 iOS SDK后,我的单元测试包总是返回以下两个错误和一个警告:

    An internal error occurred when handling command output: -[XCBuildLogCommandInvocationSection setTestsPassedString:]: unrecognized selector sent to instance
    An internal error occurred when handling command output: -[XCBuildLogCommandInvocationSectionRecorder endmarker:]: unrecognized selector sent to instance
    Run unit tests for architecture 'i386' (GC OFF) did not finish
    

    我得到这些错误,尽管它报告说,所有X的X测试通过。我在XCode的一个旧版本中读到过类似的bug,这个bug在发布后也立即出现(关于时间正则表达式中的bug),可以通过将时区设置为太平洋时间来缓解,但我不能肯定这是一个具体的回归。

    5 回复  |  直到 15 年前
        1
  •  10
  •   Dave Lee    15 年前

    苹果开发者论坛上有一个补丁,

    https://devforums.apple.com/thread/68687

    这是一个日期解析问题。修复很快,需要在测试包中添加一个.m。修复程序可从以下位置获得:

    http://gist.github.com/586296

        2
  •  3
  •   creednmd    15 年前

    改变

    "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 
    

    "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 1> /tmp/RunUnitTests.out 
    

        3
  •  2
  •   Jakob Borg    15 年前

    这是xcode3.2.4/4.1sdk中确认的错误。已经向苹果公司报告过了。

    升级到xcode3.2.5/4.2betasdk可以解决这个问题。

        4
  •  1
  •   Community Mohan Dere    9 年前

    我也有同样的问题。

    奇怪的是,我可以通过调试器按照 http://www.grokkingcocoa.com/how_to_debug_iphone_unit_te.html

    所以看起来XCode接口有问题。。。

    我真的不想把我的时区设为PST this post 似乎在暗示我在英国。。。

    推荐文章