SwiftHamcrest:针对Swift的Hamcrest测试断言

时间:2021-02-22 05:21:08
【文件属性】:
文件名称:SwiftHamcrest:针对Swift的Hamcrest测试断言
文件大小:3.34MB
文件格式:ZIP
更新时间:2021-02-22 05:21:08
Swift 迅捷的Hamcrest Hamcrest为您提供高级匹配器,并为您的Swift单元测试提供更好的错误消息。 Hamcrest最初是用Java编写的,可用于。 教程 该教程也可以作为Hamcrest工作区中的Playground使用。 通常,您在单元测试中使用这些匹配器,其中不匹配会导致测试失败,但是它们也可以在Playgrounds中使用,其中不匹配只会打印错误消息。 无论哪种情况,都需要导入Hamcrest模块。 import Hamcrest 操作员匹配器 以下是非常简单的匹配器。 匹配的表达式看起来像正则布尔表达式,但是提供可读的不匹配消息,而不是通用错误。 let x = 1 + 1 // The comments show the human-readable error messages created by the assertions. assertThat (
【文件预览】:
SwiftHamcrest-master
----.gitignore(2KB)
----Hamcrest.xcworkspace()
--------contents.xcworkspacedata(437B)
----HamcrestDemo()
--------ViewController.swift(523B)
--------Info.plist(1KB)
--------Images.xcassets()
--------Base.lproj()
--------AppDelegate.swift(2KB)
----build.gradle(1024B)
----bin()
--------swiftformat(10.87MB)
----.travis.yml(430B)
----HamcrestDemo-macOS.xcodeproj()
--------xcshareddata()
--------project.pbxproj(17KB)
----HamcrestDemoTests()
--------HamcrestDemoTests.swift(447B)
--------Info.plist(733B)
----gradlew(6KB)
----Hamcrest()
--------Hamcrest.swift(4KB)
--------StringMatchers.swift(2KB)
--------SequenceMatchers.swift(7KB)
--------OperatorMatchers.swift(2KB)
--------Info.plist(806B)
--------Descriptions.swift(2KB)
--------Matcher.swift(497B)
--------Playground.playground()
--------ReflectionMatchers.swift(1KB)
--------BasicMatchers.swift(2KB)
--------README.playground()
--------MetaMatchers.swift(2KB)
--------DictionaryMatchers.swift(1KB)
--------MatchResult.swift(587B)
--------ArithmeticMatchers.swift(2KB)
----LICENSE(1KB)
----CHANGELOG.md(766B)
----README.md(13KB)
----HamcrestDemo-macOS()
--------Info.plist(1KB)
--------Images.xcassets()
--------Playground.playground()
--------main.swift(239B)
--------Base.lproj()
--------AppDelegate.swift(548B)
----Cartfile.project(154B)
----gradle()
--------wrapper()
----Package.swift(419B)
----SwiftHamcrest.podspec(915B)
----HamcrestDemoTests-macOS()
--------HamcrestDemoTests.swift(306B)
--------Info.plist(733B)
----HamcrestDemo.xcodeproj()
--------xcshareddata()
--------project.pbxproj(19KB)
----HamcrestTests()
--------MetaMatcherTests.swift(6KB)
--------AssertThatTests.swift(1KB)
--------StringMatcherTests.swift(2KB)
--------OperatorMatcherTests.swift(2KB)
--------ArithmeticMatcherTests.swift(2KB)
--------Info.plist(733B)
--------ReflectionMatcherTests.swift(2KB)
--------SequenceMatcherTests.swift(7KB)
--------ErrorTests.swift(3KB)
--------MatcherMocks.swift(1KB)
--------DictionaryMatcherTests.swift(2KB)
--------MatchResultTests.swift(1KB)
--------BaseTestCase.swift(3KB)
--------BasicMatcherTests.swift(1KB)
----Hamcrest.xcodeproj()
--------xcshareddata()
--------project.xcworkspace()
--------project.pbxproj(42KB)
----.slather.yml(222B)
----.editorconfig(361B)

网友评论