This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| XCTFail("index out of range", file: file, line: line) | |
| precondition(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| XCTFail("index out of range", file: file, line: line) | |
| precondition(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension XCTestCase { | |
| func g<T>(array: [T], at index: Int, file: StaticString = #file, line: UInt = #line) -> T { | |
| continueAfterFailure = false | |
| guard index < array.count else { | |
| XCTFail("index out of range", file: file, line: line) | |
| precondition(false) | |
| } | |
| return array[index] | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func uw<T>(variable: T?, file: StaticString = #file, line: UInt = #line) -> T { | |
| continueAfterFailure = false | |
| guard let variable = variable else { | |
| XCTFail("unexpectedly found nil while unwrapping an Optional value", file: file, line: line) | |
| precondition(false) | |
| } | |
| return variable | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func g<T>(array: [T], at index: Int, file: StaticString = #file, line: UInt = #line) -> T { | |
| continueAfterFailure = false | |
| guard index < array.count else { | |
| XCTFail("index out of range", file: file, line: line) | |
| precondition(false) | |
| } | |
| return array[index] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension XCTestCase { | |
| // method 1 | |
| // method 2 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension XCTestCase { | |
| func g<T>(array: [T], at index: Int, file: StaticString = #file, line: UInt = #line) -> T { | |
| continueAfterFailure = false | |
| guard index < array.count else { | |
| XCTFail("index out of range", file: file, line: line) | |
| precondition(false) | |
| } | |
| return array[index] | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func uw<T>(variable: T?, file: StaticString = #file, line: UInt = #line) -> T { | |
| continueAfterFailure = false | |
| guard let variable = variable else { | |
| XCTFail("unexpectedly found nil while unwrapping an Optional value", file: file, line: line) | |
| precondition(false) | |
| } | |
| return variable | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func g<T>(array: [T], at index: Int, file: StaticString = #file, line: UInt = #line) -> T { | |
| continueAfterFailure = false | |
| guard index < array.count else { | |
| XCTFail("index out of range", file: file, line: line) | |
| precondition(false) | |
| } | |
| return array[index] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension XCTestCase { | |
| // method 1 | |
| // method 2 | |
| } |