0xPolygonMiden / miden-vm

STARK-based virtual machine
MIT License
621 stars 158 forks source link

`MastForest`: Add convenience method for tests #1355

Closed plafer closed 2 months ago

plafer commented 3 months ago

_Originally posted by @bobbinth in https://github.com/0xPolygonMiden/miden-vm/pull/1349#discussion_r1640372101_

Not for this PR, but I see this pattern a lot in tests. I wonder if it makes sense to create convenience methods on MastForest which would create a node and add it in a single call. For example, something like:

let last_basic_block_id = mast_forest.ensure_basic_block(vec![Operation::FmpAdd]);
sergerad commented 2 months ago

Happy to do this one 👍

bobbinth commented 2 months ago

Closed by #1404.