Skip to content

Add Unit Tests for Storage Diff Logic #285

@Timi16

Description

@Timi16

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

  1. Branch: git checkout -b test/storage-diff-unit-tests
  2. Add #[cfg(test)] module to src/inspector/storage.rs
  3. Write one test function per scenario
  4. Run cargo test inspector to verify
  5. 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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions