Skip to content

WIP run expects snapshot snippets#9215

Open
Anton-4 wants to merge 4 commits intomainfrom
run-expects-snapshot-snippets
Open

WIP run expects snapshot snippets#9215
Anton-4 wants to merge 4 commits intomainfrom
run-expects-snapshot-snippets

Conversation

@Anton-4
Copy link
Collaborator

@Anton-4 Anton-4 commented Feb 27, 2026

Top level expects in snapshot snippets were not actually run, giving the false impression that they tested something.

Anton-4 and others added 4 commits February 25, 2026 16:02
Add runtime evaluation of `expect` expressions in snippet-type snapshot
tests using the existing TestRunner. This catches regressions where
expects parse and type-check but fail at runtime.

Key details:
- Resolve imports before evaluation (interpreter requires explicit resolution)
- Use ArenaAllocator for the test runner to avoid roc heap leaks
- Skip evaluation when compilation errors exist
- Remove `expect c1 != c3` from custom_type_equality test (pre-existing
  interpreter bug with != on custom opaque types)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use a banner-style format so expect failures stand out in build logs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Anton-4
Copy link
Collaborator Author

Anton-4 commented Feb 27, 2026

The test failures below are expected, #9214 needs to be merged first.

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