AssertPack 0.1.2

AssertPack 0.1.2

测试已测试
语言语言 SwiftSwift
许可协议 MIT
发布最新发布2015年2月
SPM支持 SPM

Maintained by Guanshan Liu.



  • By
  • Guanshan Liu

AssertPack

Swift 中更好的断言。

安装

Carthage

  1. github "GuanshanLiu/AssertPack" 添加到 Cartfile
  2. 调用 carthage update

CocoaPods

pod 'AssertPack'

手册

  1. Assert.swift 文件复制到您的项目中(推荐)
  2. 或者将 AssertPack 作为框架使用。

用法

var people: [String] = [
    "Tom",
    "Jone",
    "Steve",
    "Jack"
]

var checked = [String]()
for name in people {
    if !assertTrue(name != "Steve", "Steve is not allowed to get in") {
        continue
    }
    checked.append(name)
}

更新日志(v0.1)

v0.1 初始版本

作者和维护者

Guanshan Liu