Commit ec2f56fa authored by Drew's avatar Drew

Use the string "Assertion failed" instead of "Test failed" by default

parent ea07523f
......@@ -15,7 +15,7 @@
//MARK: Functions
extension CarolineTest {
#if swift(>=3.0)
public final func assert(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = "Test failed", file: String = #file, line: Int = #line) {
public final func assert(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = "Assertion failed", file: String = #file, line: Int = #line) {
if !condition() {
var state = CarolineState(test: self)
state.outcome = .Failed
......@@ -24,7 +24,7 @@ extension CarolineTest {
}
}
#else
public final func assert(@autoclosure _ condition: () -> Bool, @autoclosure _ message: () -> String = "Test failed", file: String = #file, line: Int = #line) {
public final func assert(@autoclosure _ condition: () -> Bool, @autoclosure _ message: () -> String = "Assertion failed", file: String = #file, line: Int = #line) {
if !condition() {
var state = CarolineState(test: self)
state.outcome = .Failed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment