Description
Description
#expect
works differently when await
keyword is inside its body. await #expect(expr)
shows a breakdown of the actual value, while #expect(await expr)
does not. I would like to know why the expectation failed even if the result is computed from an async expression.
Expected behavior
#expect(await Array(stream) == [1,2])
throws the error testAll(): Expectation failed: (Array(stream) → [1, 2, 3]) == ([1,2] → [1, 2])
Actual behavior
#expect(await Array(stream) == [1,2])
throws the error testAll(): Expectation failed: await Array(stream) == [1,2]
Steps to reproduce
No response
swift-testing version/commit hash
Swift & OS version (output of swift --version && uname -a
)
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
Darwin MBP 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64