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
While adjusting the tests after doing the Swift 6 migration in #174 I noticed that I couldn't get rid of the warnings in this test:
The reason why I couldn't fix it is that I couldn't mark the LogHandlerTests file as Sendable since only classes without any inheritance or those that inherit directly from NSObject can be marked as Sendable. Now I understand why Apple was working on a new testing framework. 😆
With Swift Testing, we can define test functions within struct and even enums if we want, we just need to mark the functions as @Test and Xcode will recognize them. The only potential blocker here could be that the framework seems to require Swift 6, so we might need to wait until our CI supports Xcode 16 before we can make the switch.
The text was updated successfully, but these errors were encountered:
While adjusting the tests after doing the Swift 6 migration in #174 I noticed that I couldn't get rid of the warnings in this test:
The reason why I couldn't fix it is that I couldn't mark the
LogHandlerTests
file asSendable
since only classes without any inheritance or those that inherit directly fromNSObject
can be marked asSendable
. Now I understand why Apple was working on a new testing framework. 😆So my suggestion is to migrate to the new Swift Testing framework, which is awesome, see the website:
https://developer.apple.com/xcode/swift-testing/
With Swift Testing, we can define test functions within struct and even enums if we want, we just need to mark the functions as
@Test
and Xcode will recognize them. The only potential blocker here could be that the framework seems to require Swift 6, so we might need to wait until our CI supports Xcode 16 before we can make the switch.The text was updated successfully, but these errors were encountered: