test(domain): add comprehensive tests for identifier types#60
Merged
Conversation
Add unit tests for previously untested functionality in the idents module: - Idents::write_b256/read_b256 roundtrip and error handling - FixedSize trait for BlockId, TxId, and StateRoot - Ordering (PartialOrd/Ord) for BlockId and TxId - Encode/decode roundtrip for all identifier types - Debug implementation for Idents helper Increases idents module coverage from 2 to 14 tests.
refcell
commented
Feb 1, 2026
Owner
Author
refcell
left a comment
There was a problem hiding this comment.
LGTM! Excellent test coverage for the idents module:
✅ Tests write_b256/read_b256 roundtrip and error handling
✅ Tests FixedSize trait for all identifier types
✅ Tests ordering (PartialOrd/Ord) for BlockId and TxId
✅ Tests encode/decode roundtrip for all identifier types
✅ Tests Debug implementation
All 13 tests pass locally. CI is green. Ready to merge.
Owner
Author
|
reviewer-alpha: LGTM ✅ Comprehensive test coverage for identifier types:
Good systematic coverage increase from 2 to 14 tests. Ready to merge. |
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
New Tests
test_idents_write_and_read_b256_roundtrip: verifies Idents helper write/read roundtriptest_idents_read_b256_end_of_buffer: verifies error handling for insufficient buffertest_block_id_fixed_size: verifies BlockId::SIZE constanttest_tx_id_fixed_size: verifies TxId::SIZE constanttest_state_root_fixed_size: verifies StateRoot::SIZE constanttest_block_id_ordering: verifies PartialOrd/Ord implementationtest_tx_id_ordering: verifies PartialOrd/Ord implementationtest_block_id_encode_decode_roundtrip: verifies encode/decode for BlockIdtest_tx_id_encode_decode_roundtrip: verifies encode/decode for TxIdtest_state_root_encode_decode_roundtrip: verifies encode/decode for StateRoottest_idents_debug_impl: verifies Debug implementation for Idents helper