Xcode12 support#40
Closed
kenmaz wants to merge 1 commit intokylef:masterfrom
Closed
Conversation
9 tasks
|
you can use this code instead of just checking if you are on macosx 10.13 if #available(OSX 10.13, *) {
testCase.recordFailure(withDescription: "\(name): \(failure.reason)", inFile: failure.file, atLine: failure.line, expected: false)
} else {
let location = XCTSourceCodeLocation(filePath: failure.file, lineNumber: failure.line)
let issue = XCTIssue(type: .assertionFailure, compactDescription: "\(name): \(failure.reason)", detailedDescription: nil, sourceCodeContext: .init(location: location), associatedError: nil, attachments: [])
testCase.record(issue)
} |
|
please it's very important to merge this pr and create a new release, because some project needed to run on Xcode 12 and on macOS Big Sur like |
|
Hey @kylef - any word? |
Owner
|
These changes would render Spectre test failures as successes with the Xcode reporter in many cases. This change won't be accepted in its current state, this must be fixed before this change can be considered. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
XCTestCase.recordFailure(..)method has been deprecated on Xcode12+ and it will cause compile error on Xcode12.To avoid that, added
@availableblock.In the future,
XCTestCase. recordFailure(..)should be replaced with new API,XCTestCase.record(_:).Video
https://developer.apple.com/videos/play/wwdc2020/10687/
Document
https://developer.apple.com/documentation/xctest/xctestcase/3546549-record