Skip to content

Commit

Permalink
changed deprecated recordFailure into record(XCTIssue)
Browse files Browse the repository at this point in the history
  • Loading branch information
barthoffman committed Dec 31, 2020
1 parent 31568d6 commit 102acd0
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions CocoaHeadsNL/CocoaHeadsNLUITests/CocoaHeadsNLUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ extension XCTestCase {

waitForExpectations(timeout: waitSeconds) { error -> Void in
if error != nil {
let message = "Failed to find \(element) after \(waitSeconds) seconds."
self.recordFailure(withDescription: message,
inFile: file, atLine: Int(line), expected: true)
//let message = "Failed to find \(element) after \(waitSeconds) seconds."
//self.recordFailure(withDescription: message, inFile: file, atLine: Int(line), expected: true)
let issue = XCTIssue(type: .assertionFailure, compactDescription: "Failed to find \(element) after \(waitSeconds) seconds.")
self.record(issue)
}
}
}
Expand All @@ -58,9 +59,10 @@ extension XCTestCase {

waitForExpectations(timeout: waitSeconds) { error -> Void in
if error != nil {
let message = "Failed to find \(element) after \(waitSeconds) seconds."
self.recordFailure(withDescription: message,
inFile: file, atLine: Int(line), expected: true)
//let message = "Failed to find \(element) after \(waitSeconds) seconds."
//self.recordFailure(withDescription: message, inFile: file, atLine: Int(line), expected: true)
let issue = XCTIssue(type: .assertionFailure, compactDescription: "Failed to find \(element) after \(waitSeconds) seconds.")
self.record(issue)
}
}
}
Expand All @@ -71,9 +73,10 @@ extension XCTestCase {

waitForExpectations(timeout: waitSeconds) { error -> Void in
if error != nil {
let message = "Failed to find \(element) after \(waitSeconds) seconds."
self.recordFailure(withDescription: message,
inFile: file, atLine: Int(line), expected: true)
//let message = "Failed to find \(element) after \(waitSeconds) seconds."
//self.recordFailure(withDescription: message, inFile: file, atLine: Int(line), expected: true)
let issue = XCTIssue(type: .assertionFailure, compactDescription: "Failed to find \(element) after \(waitSeconds) seconds.")
self.record(issue)
}
}
}
Expand Down

0 comments on commit 102acd0

Please sign in to comment.