Skip to content

Comments

test(domain): add comprehensive tests for StateChanges codec#63

Merged
refcell merged 1 commit intomainfrom
impl-beta/add-commitment-tests-v2
Feb 1, 2026
Merged

test(domain): add comprehensive tests for StateChanges codec#63
refcell merged 1 commit intomainfrom
impl-beta/add-commitment-tests-v2

Conversation

@refcell
Copy link
Owner

@refcell refcell commented Feb 1, 2026

Summary

Add comprehensive unit tests for the StateChanges and AccountChange codec types in the domain crate.

Changes

  • crates/node/domain/src/commitment.rs: Added 5 new unit tests (6 total):
    • Empty state changes roundtrip encoding/decoding
    • AccountChange individual roundtrip with storage
    • AccountChange with empty storage
    • is_empty() method coverage for StateChanges
    • StateChangesCfg debug implementation

Verification

  • All 6 tests pass
  • Increases test coverage for codec implementations
  • Validates edge cases for empty collections

Add tests for StateChanges and AccountChange:
- Empty state changes roundtrip encoding/decoding
- AccountChange individual roundtrip
- AccountChange with empty storage
- is_empty method coverage
- StateChangesCfg debug implementation
@refcell refcell merged commit 820a6ea into main Feb 1, 2026
5 checks passed
@refcell refcell deleted the impl-beta/add-commitment-tests-v2 branch February 1, 2026 23:13
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