Skip to content

Add unit tests for UID2Manager#44

Merged
dcaunt merged 3 commits intomainfrom
dave/manager-tests
Jul 18, 2024
Merged

Add unit tests for UID2Manager#44
dcaunt merged 3 commits intomainfrom
dave/manager-tests

Conversation

@dcaunt
Copy link
Collaborator

@dcaunt dcaunt commented Jul 18, 2024

  • Refactor UID2Manager initializer for testing
  • Add both client and manager tests for optout
  • Minor cleanup of unused code

@testable import UID2

// Simple Atomic implementation for test usage
private final class Atomic<Value: Sendable>: @unchecked Sendable {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these different classes in this file be in their own files?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No hard and fast rule, but the usage here is quirky and while required to capture the symmetric key, shouldnt be encouraged elsewhere in favor of Swift's stronger concurrency mechanisms, so I'm inclined to keep it private.

@dcaunt dcaunt merged commit 2e538a2 into main Jul 18, 2024
@dcaunt dcaunt deleted the dave/manager-tests branch July 18, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants