Skip to content

[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

Merged
merged 3 commits into from
Aug 16, 2018

Conversation

airspeedswift
Copy link
Member

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:

  • Changes due to things no longer coming through as AnyObject
  • Dropping some tests of Swift 3-only SDK APIs
  • Changes in expected errors.
  • Missing @objc

@airspeedswift
Copy link
Member Author

@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 {
Copy link
Member Author

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...

Copy link
Contributor

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"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this right?

Copy link
Member Author

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'}}
Copy link
Contributor

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.

@airspeedswift
Copy link
Member Author

@swift-ci please test

@swiftlang swiftlang deleted a comment from swift-ci Aug 16, 2018
@swiftlang swiftlang deleted a comment from swift-ci Aug 16, 2018
@stephentyrone
Copy link
Contributor

LGTM.

Copy link
Member

@lorentey lorentey left a 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

@airspeedswift airspeedswift merged commit 6f91a4e into swiftlang:master Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants