You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`XCTPrint()` takes a variadic argument of items to print, mirroring the
API of `print()` itself. Unfortunately, passing this variadic argument
directly to `print()` causes an array object to be printed. For example:
```swift
func XCTPrint(items: Any...) {
print(items)
}
XCTPrint("Hello!") // Prints '["Hello!"]\n'
```
As a result of this behavior, swift-corelibs-xctest currently prints
out test output such as the following:
```
["Test Case \'ErrorHandling.test_shouldButDoesNotThrowErrorInAssertion\' failed (0.0 seconds)."]
["Test Case \'ErrorHandling.test_shouldThrowErrorInAssertion\' started."]
```
This is different from the expected output in `Tests/Functional`, which
is causing the test suite to fail.
Instead of mirroring the `print()` API, have `XCTPrint()` simply take a
string object to print. This has the added benefit of being simpler--we
can add the variadic arguments and the line separator parameter back if
we ever need them.
0 commit comments