mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-25 19:01:41 +01:00
WIP: documentation and unit tests
This commit is contained in:
@@ -73,14 +73,14 @@ public final class DefaultLogger: CoreStoreLogger {
|
||||
#endif
|
||||
}
|
||||
|
||||
public func assert(@autoclosure condition: () -> Bool, message: String, fileName: StaticString, lineNumber: Int, functionName: StaticString) {
|
||||
public func assert(@autoclosure condition: () -> Bool, @autoclosure message: () -> String, fileName: StaticString, lineNumber: Int, functionName: StaticString) {
|
||||
|
||||
#if DEBUG
|
||||
if condition() {
|
||||
|
||||
return
|
||||
}
|
||||
Swift.print("❗ [CoreStore: Assertion Failure] \((fileName.stringValue as NSString).lastPathComponent):\(lineNumber) \(functionName)\n ↪︎ \(message)\n")
|
||||
Swift.print("❗ [CoreStore: Assertion Failure] \((fileName.stringValue as NSString).lastPathComponent):\(lineNumber) \(functionName)\n ↪︎ \(message())\n")
|
||||
Swift.fatalError()
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user