Skip to content

test: add comprehensive copy_ir and SSA snapshot tests - #2937

Merged
dguido merged 3 commits into
masterfrom
test/copy-ir-tests
Jan 20, 2026
Merged

test: add comprehensive copy_ir and SSA snapshot tests#2937
dguido merged 3 commits into
masterfrom
test/copy-ir-tests

Conversation

@dguido

@dguido dguido commented Jan 20, 2026

Copy link
Copy Markdown
Member

Summary

  • Add 42 tests covering all 26 IR operation types in copy_ir()
  • Add SSA variable conversion tests (local, state, temporary, reference, tuple)
  • Add Phi node generation tests for control flow (if/else, loops, nested)
  • Add snapshot tests for SSA output stability

These tests provide a safety net for future refactoring of the SSA conversion code.

Test plan

  • pytest tests/unit/slithir/test_copy_ir.py -v — 39 tests pass
  • pytest tests/unit/slithir/test_ssa_snapshot.py -v — 3 snapshot tests pass

🤖 Generated with Claude Code

Add 42 tests covering:
- All 26 IR operation types in copy_ir()
- SSA variable conversion (local, state, temporary, reference, tuple)
- Phi node generation for control flow (if/else, loops, nested)
- Critical edge cases (LibraryCall subclass preservation, None lvalues)
- Snapshot tests for SSA output stability

These tests provide a safety net for future refactoring of the
SSA conversion code.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dguido
dguido requested a review from smonicas as a code owner January 20, 2026 00:47
@dguido
dguido merged commit e77aedf into master Jan 20, 2026
35 checks passed
@dguido
dguido deleted the test/copy-ir-tests branch January 20, 2026 02:29
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