-
Notifications
You must be signed in to change notification settings - Fork 293
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
evmone-statetest tool with JSON test loading #479
Conversation
9ec1223
to
48d216a
Compare
32936b6
to
990b972
Compare
The evmone-statetest will be the tool to execute official Ethereum State Tests.
ba16bf7
to
0b3286d
Compare
|
||
struct TestCase | ||
{ | ||
struct Case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a bit inconsistent that TestCase
has a vector of nested TestCase::Case
, but StateTransitionTest
has a vector of not-nested TestCase
.
So maybe this shouln't be nested?
And renamin suggestion; Case
=> Expectation
or CaseExpectation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually moved structs into StateTransitionTest
. Usually I don't do this but here this looks nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall.
Suprisingly not that many weird hacks required to parse a test.
Codecov Report
@@ Coverage Diff @@
## master #479 +/- ##
==========================================
- Coverage 99.55% 99.45% -0.11%
==========================================
Files 46 51 +5
Lines 4992 5118 +126
==========================================
+ Hits 4970 5090 +120
- Misses 22 28 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
53399fb
to
88c21d3
Compare
o.block = from_json<state::BlockInfo>(j_t.at("env")); | ||
|
||
for (const auto& [rev_name, expectations] : j_t.at("post").items()) | ||
o.cases.push_back({to_rev(rev_name), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
emplace_back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try, but this may not work because this class does not have explicit constructor. I believe this is fixed in C++20 or C++23 where S(a, b)
is valid initialization for an aggregate S
.
No description provided.