-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Description
The storage diff logic in src/inspector/storage.rs lacks unit tests. Write tests covering all diff scenarios: keys added, keys removed, keys modified, and no changes.
Requirements
- Test: empty before + empty after = no diff
- Test: key added (appears in after, not in before)
- Test: key removed (appears in before, not in after)
- Test: key modified (same key, different value)
- Test: large storage with mixed changes
- Test: binary/non-UTF8 values handled without panic
Suggested Execution
- Branch:
git checkout -b test/storage-diff-unit-tests - Add
#[cfg(test)]module tosrc/inspector/storage.rs - Write one test function per scenario
- Run
cargo test inspectorto verify - Commit:
test: add unit tests for storage diff logic
Acceptance Criteria
- All 6 scenarios covered
- Tests are isolated (no file I/O or network)
- All tests pass
- Edge cases (empty, large, binary) covered
Reactions are currently unavailable