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

EVM: memory read tests #1187

Merged
merged 1 commit into from
Feb 9, 2023
Merged

EVM: memory read tests #1187

merged 1 commit into from
Feb 9, 2023

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Feb 9, 2023

@vyzo vyzo requested a review from Stebalien February 9, 2023 13:28
@codecov-commenter
Copy link

Codecov Report

Merging #1187 (f33bac3) into next (8dbe068) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1187      +/-   ##
==========================================
- Coverage   90.84%   90.77%   -0.08%     
==========================================
  Files         132      132              
  Lines       26377    26447      +70     
==========================================
+ Hits        23963    24008      +45     
- Misses       2414     2439      +25     
Impacted Files Coverage Δ
actors/evm/src/interpreter/instructions/memory.rs 98.96% <100.00%> (+0.17%) ⬆️
actors/miner/src/deadline_info.rs 79.77% <0.00%> (-16.86%) ⬇️
actors/init/src/testing.rs 76.78% <0.00%> (-5.36%) ⬇️
actors/miner/src/vesting_state.rs 96.90% <0.00%> (-2.07%) ⬇️
actors/power/src/lib.rs 83.58% <0.00%> (-0.44%) ⬇️
test_vm/src/lib.rs 84.38% <0.00%> (-0.39%) ⬇️
state/src/check.rs 86.35% <0.00%> (+0.26%) ⬆️

@@ -493,4 +494,107 @@ mod tests {
assert_eq!(m.state.stack.pop().unwrap(), U256::from(32));
};
}

macro_rules! check_mem {
Copy link
Member

Choose a reason for hiding this comment

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

can't this be a function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes but we lose location info on failure in asserts, hence a macro.

Copy link
Member

Choose a reason for hiding this comment

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

Ah... Ew. Ok, fair enough.

@Stebalien Stebalien merged commit e2db47c into next Feb 9, 2023
@Stebalien Stebalien deleted the next-unit-tests-1650 branch February 9, 2023 19:04
arajasek added a commit that referenced this pull request Feb 10, 2023
test memory reads

Co-authored-by: vyzo <vyzo@hackzen.org>
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