【发布时间】:2015-08-09 06:39:21
【问题描述】:
如果该功能当前被禁用,我不想执行某些测试。有没有办法“跳过”测试(并在控制台上获得适当的反馈)?
类似这样的:
func testSomething() {
if !isEnabled(feature: Feature) {
skip("Test skipped, feature \(feature.name) is currently disabled.")
}
// actual test code with assertions here, but not run if skip above called.
}
【问题讨论】: