-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Migrate remaining stdlib tests from Swift 3 #18740
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
[stdlib] Migrate remaining stdlib tests from Swift 3 #18740
Conversation
@swift-ci please test |
@@ -542,7 +542,7 @@ ArrayTestSuite.test("BridgedToObjC/Verbatim/objectAtIndex") { | |||
expectEqual(30, (v as! TestObjCValueTy).value) | |||
let idValue2 = unsafeBitCast(v, to: UInt.self) | |||
|
|||
for i in 0..<3 { | |||
for _ in 0..<3 { |
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.
Pretty sure this test is buggy, and the intention was to actually loop over something or not to loop at all...
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.
Yes, I think it can be removed.
@@ -24,11 +18,11 @@ class Derived2 : Derived { } | |||
ArrayTraps.test("downcast1") | |||
.skip(.custom( | |||
{ _isFastAssertConfiguration() }, | |||
reason: "this trap is not guaranteed to happen in -Ounchecked")) | |||
reason: "this trap is not guaranteed to happen in -Unchecked")) |
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.
is this right?
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.
My working theory is I fat-fingered a spellcheck keypresss...
expectSameType(Int64.self, IntMax.self) | ||
expectSameType(UInt64.self, UIntMax.self) | ||
expectSameType(Int64.self, IntMax.self) // expected-error {{'IntMax' has been renamed to 'Int64'}} | ||
expectSameType(UInt64.self, UIntMax.self) // expected-error {{'UIntMax' has been renamed to 'UInt64'}} |
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.
Hmmm, we should fix this error message to something that tells people what to do instead of using [U]IntMax
. That's separate from this PR, though.
@swift-ci please test |
LGTM. |
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.
Looks good! Huge thanks for taking care of all those var → let warnings
Includes some drive-by warning fixes and de-gybbing a file that wasn't using gyb.
Where there was a test for multiple versions, I've dropped 3 and added 4.2 (if it wasn't there). Where it was just testing Swift 3, I've bumped it to 4.2 (maybe we should add 4, 4.2 and 5 to everything... but that'd be a lot more tests).
Main things that needed fixing:
AnyObject
@objc