-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Migrate stdlib tests of Swift 3 #17427
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 stdlib tests of Swift 3 #17427
Conversation
@swift-ci please test |
@@ -595,11 +595,9 @@ DispatchAPI.test("DispatchTimeInterval") { | |||
expectTrue(t == t) // This would crash. | |||
} | |||
|
|||
#if swift(>=4.0) |
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.
Can you remove the RUN: line for -swift-version 3 too?
test/stdlib/LazyCollectionPlus.swift
Outdated
@@ -1,5 +1,5 @@ | |||
// RUN: %empty-directory(%t) | |||
// RUN: %target-build-swift %s -o %t/a.out3 -swift-version 3 && %target-run %t/a.out3 | |||
// RUN: %target-build-swift %s -o %t/a.out -swift-version 3 && %target-run %t/a.out |
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.
Should this be -swift-version 4?
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.
ah in fact the whole test should just go, we don't support this beyond Swift 3
Thanks for working on this! |
Some of these changes are to explicitly check legacy support for users of -swift-version 3. Is your intention for us to not test this mode at all, or just to migrate stale tests? |
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.
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.
Big thumbs up!
test/stdlib/StringFlatMap.swift
Outdated
// RUN: %target-build-swift %s -o %t/a.out4 -swift-version 4 && %target-run %t/a.out4 | ||
|
||
// REQUIRES: executable_test | ||
|
||
import StdlibUnittest | ||
|
||
#if swift(>=4) | ||
|
||
public typealias ExpectedResultType = [Character] | ||
let swiftVersion = "4" |
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.
Nit: I think we should remove these two variables now; they make it slightly harder to understand the tests.
20b0b56
to
41e05d4
Compare
@swift-ci please test |
Build failed |
@swift-ci please test Linux platform |
Build failed |
@swift-ci please test Linux platform |
Build failed |
@swift-ci please clean test linux platform |
Build failed |
41e05d4
to
6dc812b
Compare
@swift-ci please test |
Build failed |
Build failed |
ae6ded1
to
387ca22
Compare
@swift-ci please test |
Build failed |
@@ -475,8 +475,7 @@ func getBridgedNSDictionaryOfRefTypesBridgedVerbatim() -> NSDictionary { | |||
d[TestObjCKeyTy(20)] = TestObjCValueTy(1020) | |||
d[TestObjCKeyTy(30)] = TestObjCValueTy(1030) | |||
|
|||
let bridged = | |||
unsafeBitCast(convertDictionaryToNSDictionary(d), to: NSDictionary.self) |
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.
@lorentey just to check, can you spot any higher purpose to this bit cast that I'm missing? The function already returns an NSDictionary
.
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.
There is none as far as I can tell!
@swift-ci please test linux platform |
387ca22
to
f5d938a
Compare
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test Linux platform |
Build failed |
@swift-ci please test Linux platform |
Finally™️ |
PR to gather std lib tests that use Swift 3.
Feel free to join the party.