From 1fb0a47a2f14e1c7bb54542d3def268aff9d2c20 Mon Sep 17 00:00:00 2001 From: Niklas Nickel Date: Tue, 24 May 2022 23:13:22 +0200 Subject: [PATCH] Precondition override and XCTestCase extension only compile in debug mode --- Sources/SI/Precondition.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/SI/Precondition.swift b/Sources/SI/Precondition.swift index acc4d38..ff081b7 100644 --- a/Sources/SI/Precondition.swift +++ b/Sources/SI/Precondition.swift @@ -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 @@ -35,4 +34,7 @@ extension XCTestCase { } } +#endif + +