Skip to content

Commit

Permalink
Precondition override and XCTestCase extension only compile in debug …
Browse files Browse the repository at this point in the history
…mode
  • Loading branch information
niklasnickel committed May 24, 2022
1 parent 47049a3 commit 1fb0a47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/SI/Precondition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import XCTest
func precondition(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = "", file: StaticString = #file, line: UInt = #line) {
preconditionClosure(condition(), message(), file, line)
}
#endif

/// The actual function called by our custom `precondition`.
var preconditionClosure = Swift.precondition
Expand All @@ -35,4 +34,7 @@ extension XCTestCase {
}
}

#endif



0 comments on commit 1fb0a47

Please sign in to comment.