Skip to content
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

throwAssertion not working with Swift Concurrency #1084

Open
1 task done
funct7 opened this issue Sep 10, 2023 · 1 comment
Open
1 task done

throwAssertion not working with Swift Concurrency #1084

funct7 opened this issue Sep 10, 2023 · 1 comment
Labels

Comments

@funct7
Copy link

funct7 commented Sep 10, 2023

  • I have read CONTRIBUTING and have done my best to follow them.

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:

  • Nimble: v12.2.0
  • Xcode Version: 14.3.1 (14E300c)
  • Swift Version: 5.x (Ran pod try nimble)

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

  • Cocoapods: 1.12.1 (Use pod --version in Terminal)
@younata younata added the tricky label Sep 10, 2023
@younata
Copy link
Member

younata commented Sep 10, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants