单元测试框架 Swift Sleipnir

码农软件 · 软件分类 · 单元测试工具 · 2019-11-18 15:43:10

软件介绍

Sleipnir 是 BDD 风格的 Swift 框架,灵感来源于Cedar

示例:

class SampleSpec : SleipnirSpec {
    var spec : () = describe("Horse") {
        context("usual") {
            it("is not awesome") {
                let usualHorse = UsualHorse()
                expect(usualHorse.legsCount).to(equal(4))
                expect(usualHorse.isAwesome()).to(beFalse())
            }
        }

        context("Sleipnir") {
            it("is awesome") {
                let sleipnirHorse = Sleipnir()
                expect(sleipnirHorse.legsCount).to(equal(8))
                expect(sleipnirHorse.isAwesome()).to(beTrue())
            }
        }
    }}


本文地址:https://codercto.com/soft/d/19267.html

JavaScript and Ajax for the Web, Sixth Edition

JavaScript and Ajax for the Web, Sixth Edition

Tom Negrino、Dori Smith / Peachpit Press / August 28, 2006 / $24.99

Book Description Need to learn JavaScript fast? This best-selling reference’s visual format and step-by-step, task-based instructions will have you up and running with JavaScript in no time. In thi......一起来看看 《JavaScript and Ajax for the Web, Sixth Edition》 这本书的介绍吧!

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试