Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
skychiarottoa committed May 5, 2021
1 parent b41aa72 commit a9ace90
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions XCode/Sources/Asserts/XCAssertEquals+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,17 @@ public func assertTrue(_ expression: @autoclosure () throws -> Bool, _ message:
public func assertFalse(_ expression: @autoclosure () throws -> Bool, _ message: @autoclosure () -> String = "", file: StaticString = #filePath, line: UInt = #line) {
XCTAssertFalse(try expression(), message(), file: file, line: line)
}

public func assertGreaterThanZero(_ expression: Int, file: StaticString = #filePath, line: UInt = #line) {
XCTAssertGreaterThan(expression, 0, "", file: file, line: line)
}

public extension XCTestCase {
func repeatTest(times: Int = 10,_ test: () throws -> Void) throws {
try (1...times).forEach { _ in
setUp()
try test()
tearDown()
}
}
}

0 comments on commit a9ace90

Please sign in to comment.