Quick / Nimble

A Matcher Framework for Swift and Objective-C
https://quick.github.io/Nimble/documentation/nimble/
Apache License 2.0
4.81k stars 600 forks source link

`throwAssertion` not working with Swift Concurrency #1084

Open funct7 opened 1 year ago

funct7 commented 1 year ago

What did you do?

func foo() async { fatalError() }

class AsyncTest : XCTestCase {

    func test() async {
        await expect { await foo() }.to(throwAssertion()) // crashes
    }

}

What did you expect to happen?

I expect the test to run without stopping at the exception breakpoint.

I believe this issue stems from CwlPreconditionTesting not being able to handle Swift Concurrency code as described here. Just wanted to make sure people were aware of this issue.

What actually happened instead?

The test stalls

Environment

List the software versions you're using:

Please also mention which package manager you used and its version. Delete the other package managers in this list:

younata commented 1 year ago

Thanks for alerting people!

I don't know how to address this. Though, as you noted, this is more for awareness than anything else at the moment.

I'm going to leave this open until it's actually fixable.