-
Notifications
You must be signed in to change notification settings - Fork 33
[test] Migrate unit tests to Swift Testing #88
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
base: main
Are you sure you want to change the base?
Conversation
Package.swift
Outdated
|
||
import PackageDescription | ||
|
||
let swiftSettings: [SwiftSetting] = [.enableExperimentalFeature("StrictConcurrency=complete")] | ||
|
||
let package = Package( | ||
name: "swift-aws-lambda-events", | ||
platforms: [.macOS(.v15)], |
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.
Why do you need to add the platform requirement?
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.
If it is needed for swift-testing you could add a @available
at the top of each suite.
Also you could just wrap all the tests in a #if compiler(>=6.0)
to avoid requiring swift 6
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.
I propose an alternative : I created a [email protected]
with no test target and keep the tests running for Swift 6.x only.
The CI runs tests on 6.x anyway.
Would that work ?
adjusted tag to |
Migrate all unti tests to Swift Testing
Motivation:
Allows to compile and run test on open source Swift toolchain 6
Modifications:
Migrate according to
https://developer.apple.com/documentation/testing/migratingfromxctest
Result: