test with CheckedContinuation
loses testing context and crashes
#804
Labels
bug
Something isn't working
CheckedContinuation
loses testing context and crashes
#804
Description
Consider an
Observable
model that interacts with anactor
model:To test that
buttonPressed()
resetsactorValue
and then asynchronously assignsactorValue
after callingactorModel.doMyThing()
, we can construct a test with observation tracking inside a checked continuation:Because of the OOPS, the
#expect
incase 1:
fails. But we also get a crash:The test passes if we set the correct value in
buttonPressed()
(ie no OOPS), but are we certain the passing#expect
is realized by the testing context?Expected behavior
The test should record an issue and not crash.
Actual behavior
The test crashed.
Steps to reproduce
BugSwiftTestingCheckedContinuation.zip
swift-testing version/commit hash
Version 16.1 (16B40)
Swift & OS version (output of
swift --version ; uname -a
)The text was updated successfully, but these errors were encountered: