【问题标题】:Behaviour of XCTest unclear failing on assertTrueXCTest 的行为在 assertTrue 上不清楚失败
【发布时间】:2013-10-26 10:25:11
【问题描述】:

xCode 的 XCTest 套件似乎有问题,我是否遗漏了什么或者为什么以下测试有时会在 true 和 false 之间切换值时失败,有时测试会继续失败,并且硬编码为 true 值!

-(void) testDescDefaultEmpty{
    XCTAssertTrue(true, @"The description was incorrect");

}

它似乎没有清除运行新测试的旧测试..

【问题讨论】:

  • 有时它只是跳过一个类的所有测试!

标签: xcode xctest


【解决方案1】:

尝试将断言更改为:

XCTAssertTrue(YES, @"The description was incorrect");

【讨论】:

    猜你喜欢
    • 2022-01-10
    • 1970-01-01
    • 2012-03-16
    • 2020-01-27
    • 2023-04-06
    • 1970-01-01
    • 2013-10-23
    • 1970-01-01
    相关资源
    最近更新 更多