-
-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for Xcode 7.3 / Swift 2.2 #244
Conversation
This works around XCTFail requiring StaticString for the file parameter which can't be generated from Objective-C. Linux builds continue to use XCTFail like before.
@@ -35,6 +35,24 @@ class NimbleXCTestUnavailableHandler : AssertionHandler { | |||
} | |||
} | |||
|
|||
#if _runtime(_ObjC) | |||
/// Helper class providing access to the currently executing XCTestCase instance, if any | |||
@objc internal class CurrentTestCaseTracker: NSObject, XCTestObservation { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make this class final since it's not meant to be subclassed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Done!
Yeah this is fine, thank you! This makes sense! |
Thanks @NachoSoto and @briancroom! I'll cut a new release soon. |
Fixes for Xcode 7.3 / Swift 2.2
This build on top of @NachoSoto's work in #243 (Sorry I'm not sure if there's a better way to do this besides opening a new PR like I am here!)
I'm essentially keeping
FileString
asString
in ObjC environments, and moving away fromXCTFail
. This requires the use ofXCTestObservationCenter
to track the current test case.This gets everything building on both Xcode 7.2 and 7.3, however there are a few test failures on 7.3 that seem to be due to behavior changes in the stringifiers. I'm not sure how to approach those failures and was thinking that should be dealt with separately.
@NachoSoto @ratkins could you see if this works for you?