nerdsupremacist / Assert

Swift UI Like DSL for Building Tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assert

A simple DSL to write tests and collect assertiosn without relying on XCTest.

Why

If you want to run tests in some other environment than XCTest, or want to manipulate assertions based on some other dynamic context, or perhaps perform some other analysis of test results, Assert provides you this with a very simple DSL

Example

let results = test {
  Assert(true)
  Assert(1, equals: 1, "One should equal one")
  Fail("This should fail...")
}

print(results.failures) // [Failure(message: ""This should fail...", file: ..., function: ..., line: ...)]

About

Swift UI Like DSL for Building Tests


Languages

Language:Swift 99.8%Language:Shell 0.2%