test: port the compiler e2e scenarios to spec fixtures - #209
Merged
Merged
Conversation
Azorlogh
approved these changes
Oct 1, 2026
ascandone
added a commit
that referenced
this pull request
Oct 1, 2026
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the scenarios of
internal/compiler/e2e_test.go(#199) that the specs format can express to spec fixtures, underinternal/interpreter/testdata/script-tests/e2e/. Spec fixtures run on every engine the corpus is wired to: the interpreter here, and the compiler+VM too once #199 lands, so each scenario is checked against both instead of the VM alone.43 fixtures, covering: plain and inorder sources, caps, kept and nested destinations, source and destination allotments (including the leftover-rounding cases and an amount beyond int64), int and monetary arithmetic,
get_amount/get_asset/balance()/overdraft(), account interpolation (string, number, and an account var whose origin is another account), bounded overdraft, send-all,save, colored sources,@world(literal and through a var), andoneof(flat and nested). Missing funds is asserted withexpect.error.missingFunds.Not ported, because the specs format can't express them: the cases expecting any other error (asset mismatch, invalid allotment sum, negative portion, negative balance, divide by zero, invalid color, unbounded
@worldin a send-all, a scoped account in an interpolation), and the two that count store balance reads. They stay as Go tests in #199.All green on main. On #199,
account-interpolation-account-aliasis red: the VM posts todest:worldinstead ofdest:src. The fix will land in #199. This supersedes #208, which added only that one fixture.