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

refactor: do some DRY for full eval tests #1238

Merged
merged 1 commit into from
Apr 15, 2024
Merged

refactor: do some DRY for full eval tests #1238

merged 1 commit into from
Apr 15, 2024

Conversation

dhess
Copy link
Member

@dhess dhess commented Apr 15, 2024

We refactor many of the interpreter and step evaluator full evaluation tests by moving the programs we want to evaluate into primer-testlib. Note that not all tests are amenable to this refactoring: some are too implementation-specific, and some are so simple that a refactoring wouldn't buy us much.

We could do some additional DRY by creating a test monad that abstracts away the differences between the two evaluation implementations, and then rewriting most of the tests to use this abstracted test framework. However, it's not clear whether it would be worth the effort, as it would be a fairly significant amount of work and would largely exchange boilerplate for boilerplate.

Note that this commit is intended to be a pure refactoring: no functional changes have been made to the tests, nor have any tests been added or removed.

@dhess dhess enabled auto-merge April 15, 2024 11:09
We refactor many of the interpreter and step evaluator full evaluation
tests by moving the programs we want to evaluate into
`primer-testlib`. Note that not all tests are amenable to this
refactoring: some are too implementation-specific, and some are so
simple that a refactoring wouldn't buy us much.

We could do some additional DRY by creating a test monad that
abstracts away the differences between the two evaluation
implementations, and then rewriting most of the tests to use this
abstracted test framework. However, it's not clear whether it would be
worth the effort, as it would be a fairly significant amount of work
and would largely exchange boilerplate for boilerplate.

Note that this commit is intended to be a pure refactoring: no
functional changes have been made to the tests, nor have any tests
been added or removed.

Signed-off-by: Drew Hess <src@drewhess.com>
@dhess dhess added this pull request to the merge queue Apr 15, 2024
Merged via the queue into main with commit fedd890 Apr 15, 2024
72 checks passed
@dhess dhess deleted the dhess/dry branch April 15, 2024 12:24
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