Skip to content

Migrate iOS plugin tests from XCTest to Swift Testing #180787

@jmagman

Description

@jmagman

Swift Testing has some interesting features, like parameterized tests.

@Test("Continents mentioned in videos", arguments: [
    "A Beach",
    "By the Lake",
    "Camping in the Woods"
])
func mentionedContinents(videoName: String) async throws {
    let videoLibrary = try await VideoLibrary()
    let video = try #require(await videoLibrary.video(named: videoName))
    #expect(video.mentionedContinents.count <= 3)
}

Migrate our plugin iOS and macOS tests from XCTest to Swift Testing, where possible. This is just to do the mechanical migration, not to actually adopt new Swift Testing features.

https://developer.apple.com/videos/play/wwdc2024/10179/
https://developer.apple.com/videos/play/wwdc2024/10195/

Available in Xcode 16. The test targets must use Swift 6.

Note: this does not require the plugin itself to adopt Swift 6, which is tracked here #150388

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyplatform-macBuilding on or for macOS specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions