Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MastForest: Add convenience method for tests #1355

Closed
plafer opened this issue Jun 16, 2024 · 2 comments · Fixed by #1404
Closed

MastForest: Add convenience method for tests #1355

plafer opened this issue Jun 16, 2024 · 2 comments · Fixed by #1404
Assignees
Labels
good first issue Good for newcomers tests Related to tests

Comments

@plafer
Copy link
Contributor

plafer commented Jun 16, 2024

Originally posted by @bobbinth in #1349 (comment)

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]);
@plafer plafer added good first issue Good for newcomers tests Related to tests labels Jun 16, 2024
@sergerad
Copy link
Contributor

Happy to do this one 👍

@bobbinth
Copy link
Contributor

Closed by #1404.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers tests Related to tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants