Skip to content

XCSkip equivalents in swift-testingΒ #120

@Kyle-Ye

Description

@Kyle-Ye

Description

The old XCTest based test case:

func testDemo() throws {
    let value: Int? = ...
    guard let value else {
        throw XCTSkip("Some skip message here")

    }
    XCTAssertEqual(value, 3)
}

The closest migrating to swift-testing I could think of.

func testDemo() throws {
    let value: Int? = ...
    guard let value else {
        withKnownIssue {
            throw "Some skip message here"
        }
        return
    }
    #expect(BloomFilter(type: type).value == expectedValue)
}
extension String: Error {}

Expected behavior

XCSkip have an equivalent in swift-testing

Actual behavior

XCSkip have no equivalent in swift-testing

Steps to reproduce

No response

swift-testing version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

No response

Metadata

Metadata

Assignees

Labels

concurrencyπŸ”€ Swift concurrency/sendability issuesenhancementNew feature or requestpublic-apiAffects public APItraitsIssues and PRs related to the trait subsystem or built-in traits

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions