importing unit tests

This commit is contained in:
John Rommel Estropia
2016-06-12 20:34:13 +09:00
parent 8e5c7ec9b2
commit 76a2bc1da2
15 changed files with 1603 additions and 404 deletions

View File

@@ -111,7 +111,22 @@ public final class DefaultLogger: CoreStoreLogger {
return
}
Swift.print("❗ [CoreStore: Assertion Failure] \((fileName.stringValue as NSString).lastPathComponent):\(lineNumber) \(functionName)\n ↪︎ \(message())\n")
Swift.fatalError()
Swift.fatalError(file: fileName, line: UInt(lineNumber))
#endif
}
/**
Handles fatal errors made throughout the `CoreStore` framework.
- Important: This method should be marked `@noreturn` and implementers should guarantee that the function doesn't, either by calling another `@noreturn` function such as `fatalError()` or `abort()`, or by raising an exception.
- parameter message: the fatal error message
- parameter fileName: the source file name
- parameter lineNumber: the source line number
- parameter functionName: the source function name
*/
public func abort(message: String, fileName: StaticString, lineNumber: Int, functionName: StaticString) {
Swift.print("❗ [CoreStore: Fatal Error] \((fileName.stringValue as NSString).lastPathComponent):\(lineNumber) \(functionName)\n ↪︎ \(message)\n")
Swift.fatalError(file: fileName, line: UInt(lineNumber))
}
}