test(dkg): add comprehensive unit tests for DkgConfig type#65
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive unit tests for the
DkgConfigstruct accessor methods.Tests Added
test_n_returns_participant_count: Verifiesn()returns the correct number of participantstest_n_with_single_participant: Edge case with single participanttest_n_with_many_participants: Edge case with 100 participantstest_t_returns_threshold: Verifiest()returns the correct threshold valuetest_t_with_threshold_one: Edge case with threshold of 1test_t_with_large_threshold: Edge case with threshold of 67test_my_public_key_derived_from_identity: Verifies public key derivation from identity keytest_my_public_key_consistent: Verifies consistency across multiple callstest_my_public_key_different_identities: Different identities produce different public keystest_dkg_config_debug_implementation: Tests Debug trait implementationtest_dkg_config_clone: Tests Clone trait implementationtest_dkg_config_participants_matches_public_keys: Verifies participants vector matches accessortest_dkg_config_threshold_boundary: Tests threshold == n boundary conditionVerification
✅ All 13 new tests pass
✅ Clippy passes with no warnings
✅ No modifications to non-test code
✅ Follows existing test patterns from the crate