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

enable use of Context in tests and misc test refactoring #871

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

g-r-a-n-t
Copy link
Member

@g-r-a-n-t g-r-a-n-t commented Apr 17, 2023

  • updated the test runner to enable context-related operations
  • moved a handful of tests from the legacy-tests crate to the tests crate

@@ -184,7 +184,6 @@ test_analysis! { erc20_token, "demos/erc20_token.fe"}
test_analysis! { guest_book, "demos/guest_book.fe"}
test_analysis! { simple_open_auction, "demos/simple_open_auction.fe"}
test_analysis! { uniswap, "demos/uniswap.fe"}
test_analysis! { address_bytes10_map, "features/address_bytes10_map.fe"}
Copy link
Member Author

Choose a reason for hiding this comment

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

Im ok with removing most of these

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to talk more about these snapshot tests at the next meeting

crates/test-runner/src/lib.rs Outdated Show resolved Hide resolved
crates/test-runner/src/lib.rs Outdated Show resolved Hide resolved
crates/tests-legacy/src/features.rs Outdated Show resolved Hide resolved
crates/tests/fixtures/files/call_fn.fe Outdated Show resolved Hide resolved
@g-r-a-n-t g-r-a-n-t force-pushed the ctx-tests branch 3 times, most recently from b5e712d to 8aedab0 Compare April 17, 2023 21:01
@@ -53,11 +53,8 @@ fn mir_lower_std_lib() {
test_lowering! { mir_erc20_token, "demos/erc20_token.fe"}
test_lowering! { mir_guest_book, "demos/guest_book.fe"}
test_lowering! { mir_uniswap, "demos/uniswap.fe"}
test_lowering! { mir_address_bytes10_map, "features/address_bytes10_map.fe"}
Copy link
Member Author

Choose a reason for hiding this comment

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

same for these

@g-r-a-n-t g-r-a-n-t marked this pull request as ready for review April 17, 2023 21:06
Copy link
Collaborator

@cburgdorf cburgdorf left a comment

Choose a reason for hiding this comment

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

Looks good, just left a comment regarding loss of assertions of revert error.

input_len: 0,
output_offset: 0,
output_len: 0
) == 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like the old tests also covered that the correct error code is returned whereas these tests simply check that it reverts but do not check the actual error that was returned. Maybe we can add this back?

@g-r-a-n-t g-r-a-n-t merged commit 7054185 into ethereum:master Apr 21, 2023
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.

2 participants