Not sure if this has already been reported but I'm having issue with the new swift testing framework where I pass in a parameter that is a closure block. For example
@Test(
"Testing with arguments",
arguments: [SomeStruct.generateSomeData, SomeStruct. anotherGenerateSomeData]
)
func testingWithArguments(_ closureBlock: (String) async throws -> SomeStruct) async throws {
let someStruct = try await closureBlock("")
// expect ...
}
struct SomeStruct {
func generateSomeData(using string: String) async throws -> SomeStruct {
//....
}
func anotherGenerateSomeData(using string: String) async throws -> SomeStruct {
//....
}
}
The issue is that the test runner gets stuck and doesn't continue with the test and just fail it. But if I only pass in one item instead of two in the array of closures, then it passes. Does this something to do with testing or it's just something that I cannot do at all with swift?