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

LFVM: Add test for mcopy #853

Merged
merged 7 commits into from
Oct 14, 2024
Merged

LFVM: Add test for mcopy #853

merged 7 commits into from
Oct 14, 2024

Conversation

LuisPH3
Copy link
Contributor

@LuisPH3 LuisPH3 commented Oct 9, 2024

part of #751

Old test is replaced with new ones:

  • min version is tested for all ops in "TestInterpreter_InstructionsFailWhenExecutedInRevisionsEarlierThanIntroducedIn"
  • memory expansion is tested in memory tests.
  • add overlapping range test
  • test for errors happening both on read and write.
  • test gas cost for word count.

@LuisPH3
Copy link
Contributor Author

LuisPH3 commented Oct 9, 2024

this tests need to be factored with existing ones.

@LuisPH3 LuisPH3 closed this Oct 9, 2024
@LuisPH3 LuisPH3 reopened this Oct 9, 2024
HerbertJordan
HerbertJordan previously approved these changes Oct 9, 2024
go/interpreter/lfvm/instructions_test.go Outdated Show resolved Hide resolved
go/interpreter/lfvm/instructions_test.go Show resolved Hide resolved
Copy link
Contributor

@facuMH facuMH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few things I think can be to done a little better

go/interpreter/lfvm/instructions_test.go Outdated Show resolved Hide resolved
go/interpreter/lfvm/instructions_test.go Outdated Show resolved Hide resolved
go/interpreter/lfvm/instructions_test.go Show resolved Hide resolved
@LuisPH3 LuisPH3 requested a review from facuMH October 14, 2024 07:51
@LuisPH3
Copy link
Contributor Author

LuisPH3 commented Oct 14, 2024

@facuMH
I dont think hard-coding values for a parametric test brings any value. If we hardcode gas or memory contets, there is no point on having test cases in the table.

@LuisPH3
Copy link
Contributor Author

LuisPH3 commented Oct 14, 2024

@facuMH I dont think hard-coding values for a parametric test brings any value. If we hardcode gas or memory contets, there is no point on having test cases in the table.

As discussed offline,

  • test name does not fit pattern. "does-nothing" test gets its own function.
  • compare complete memory to test out-of-range access violations.

HerbertJordan
HerbertJordan previously approved these changes Oct 14, 2024
go/interpreter/lfvm/instructions_test.go Outdated Show resolved Hide resolved
@LuisPH3 LuisPH3 merged commit 315af9c into main Oct 14, 2024
5 checks passed
@LuisPH3 LuisPH3 deleted the luis/lfvm_test_mcopy branch October 14, 2024 12:01
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.

3 participants