Skip to content

test: port the compiler e2e scenarios to spec fixtures - #209

Merged
ascandone merged 1 commit into
mainfrom
test/e2e-specs
Oct 1, 2026
Merged

ascandone merged 1 commit into
mainfrom
test/e2e-specs

Conversation

@ascandone

Copy link
Copy Markdown
Contributor

Ports the scenarios of internal/compiler/e2e_test.go (#199) that the specs format can express to spec fixtures, under internal/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), and oneof (flat and nested). Missing funds is asserted with expect.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 @world in 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-alias is red: the VM posts to dest:world instead of dest:src. The fix will land in #199. This supersedes #208, which added only that one fixture.

@ascandone
ascandone merged commit 19ae391 into main Oct 1, 2026
5 of 6 checks passed
@ascandone
ascandone deleted the test/e2e-specs branch October 1, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants