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

Suggestions to Tests/1153 #24

Merged
merged 3 commits into from
Sep 7, 2023
Merged

Conversation

marioevz
Copy link
Collaborator

@marioevz marioevz commented Sep 7, 2023

  • Modifies PytestParameterEnum to make it a bit simpler to use, by adding a parametrize method which automatically creates the parametrize decorator.
  • Adds some out of gas tests for the TSTORE/TLOAD opcodes

Copy link
Owner

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

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

Thanks for this, love it. Both the changes to PytestParameterEnum and the new test cases.

Comment on lines 65 to 66
if "id" in value:
id = value["id"]
Copy link
Owner

Choose a reason for hiding this comment

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

This is a nice addition, also had it in mind! 😃

@@ -122,16 +122,9 @@ class InitcodeTestCases(PytestParameterEnum):
"expected_storage": {0: 0x0000, 1: 0x0001},
}

def __init__(self, value):
Copy link
Owner

Choose a reason for hiding this comment

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

Very nice that the need for this boiler plate code is eliminated! Yet, it's still possible to modify/define new values in an optional __init__()!

+ Op.SSTORE(
0,
opcode(
Spec.TSTORE_GAS_COST + (PUSH_OPCODE_COST * 2) - 1,
Copy link
Owner

Choose a reason for hiding this comment

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

Nice!

@danceratopz danceratopz merged commit 80243fb into danceratopz:tests/1153 Sep 7, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants