Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for UID2Manager #44

Merged
merged 3 commits into from
Jul 18, 2024
Merged

Add unit tests for UID2Manager #44

merged 3 commits into from
Jul 18, 2024

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
3 checks passed
@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