Skip to content

test(dkg): add comprehensive unit tests for DkgConfig type#65

Merged
refcell merged 1 commit intomainfrom
reviewer-beta/add-dkg-config-tests
Feb 1, 2026
Merged

test(dkg): add comprehensive unit tests for DkgConfig type#65
refcell merged 1 commit intomainfrom
reviewer-beta/add-dkg-config-tests

Conversation

@refcell
Copy link
Owner

@refcell refcell commented Feb 1, 2026

Summary

Adds comprehensive unit tests for the DkgConfig struct accessor methods.

Tests Added

  • test_n_returns_participant_count: Verifies n() returns the correct number of participants
  • test_n_with_single_participant: Edge case with single participant
  • test_n_with_many_participants: Edge case with 100 participants
  • test_t_returns_threshold: Verifies t() returns the correct threshold value
  • test_t_with_threshold_one: Edge case with threshold of 1
  • test_t_with_large_threshold: Edge case with threshold of 67
  • test_my_public_key_derived_from_identity: Verifies public key derivation from identity key
  • test_my_public_key_consistent: Verifies consistency across multiple calls
  • test_my_public_key_different_identities: Different identities produce different public keys
  • test_dkg_config_debug_implementation: Tests Debug trait implementation
  • test_dkg_config_clone: Tests Clone trait implementation
  • test_dkg_config_participants_matches_public_keys: Verifies participants vector matches accessor
  • test_dkg_config_threshold_boundary: Tests threshold == n boundary condition

Verification

✅ All 13 new tests pass
✅ Clippy passes with no warnings
✅ No modifications to non-test code
✅ Follows existing test patterns from the crate

@refcell refcell merged commit b965306 into main Feb 1, 2026
10 checks passed
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.

1 participant