Open uhooi opened 11 months ago
I try to achieve this with struct, a build error will occur.
struct DidTapShareButtonOneNilArgument {
let senderView: UIView?
let name: String?
let description: String?
let icon: UIImage?
}
@Test(arguments: [
DidTapShareButtonOneNilArgument(senderView: nil, name: "name", description: "description", icon: UIImage()),
DidTapShareButtonOneNilArgument(senderView: UIView(), name: nil, description: "description", icon: UIImage()),
DidTapShareButtonOneNilArgument(senderView: UIView(), name: "name", description: nil, icon: UIImage()),
DidTapShareButtonOneNilArgument(senderView: UIView(), name: "name", description: "description", icon: nil),
])
func didTapShareButton_one_nil(_ argument: DidTapShareButtonOneNilArgument) {
presenter.didTapShareButton(argument.senderView, name: argument.name, description: argument.description, icon: argument.icon)
#expect(routerMock.showActivityCallCount == 0)
}
/var/folders/26/0wffxqvn1s3f335cw1t7rq980000gn/T/swift-generated-sources/@__swiftmacro_14AppModuleTests022MonsterDetailPresenterC0V25didTapShareButton_one_nil4TestfMp_.swift:22:9: Expression is 'async' but is not marked with 'await'
zip()
is part of the Swift standard library. Moving.
(Note that the error you're seeing should be resolved if you update your copy of swift-testing.)
It would be easy to implement a zip()
with an arbitrary number of arguments using parameter packs.
ref: https://github.com/apple/swift-evolution/blob/main/proposals/0393-parameter-packs.md
Description
SSIAAlternatively, I want to pass arguments as tuples.
Expected behavior
Actual behavior
No response
Steps to reproduce
No response
swift-testing version/commit hash
70f5963
Swift & OS version (output of
swift --version && uname -a
)